From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F175DA0597; Fri, 17 Apr 2020 22:56:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8DA7A1EAE1; Fri, 17 Apr 2020 22:56:42 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2081.outbound.protection.outlook.com [40.107.21.81]) by dpdk.org (Postfix) with ESMTP id E0E741DBAA; Fri, 17 Apr 2020 22:56:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TyknzP9qqdMU7H1J9qrvBgkiNmBt69LR4JEbmpDFMOjKoCJdL2B1wUkKDzgZ3dLTAQfhfemBokU+8ggOy6vEMOMGDPJJ+SgUuEWD7ZG4VI3jT/OVr3D9Z97+2XiBcSHzc1dM98B5DS9iSXf90UxYCAA9FHuD67qiCMeOqt6YVcigZ/JZy65hen2YkXVTgqbO1atlgZRnpcP6l1bd6vMan17ZVWZbq5aRUKtlFluwDVUx16bnxYNdCz9EXguyeF7PDVU0/h98rvUbXI8JB3F4hkvehc1gNVz8T8l3+kH0w5c35KtL9Xuns8feqB9xpmmp3/XNKK+Yd8akkE17wruQRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vrb2eENkEgEwFIBW9fRotV5ldmssLuXV4pQgV2OfUUA=; b=Pdkfzz5RZNLJcL3nL+Jafx1UfDPsCvrcOZIdok9J4PUcGZbOiJ2B7Sc1oqx4eQQqTj2WspraDqQjvqAnyoDBn8hMaMZg2ebsJP6o5y3ydSWug2iL+fnywilNNTUlk0vpqCAbs4aoq0xH7SWH5hia6Yk6bllilI4SkcIbVGNj4CMGtJRyEMfP3QB8NHOXeHULCtEIdpPP3xscWoBXbnPsscEaXaUX9GziKFN7NoTnNxrcwnkDQ/cJIYczKqC7nLILB0pXa/ZhjWufG0fL9Pe0DRnbxehGuiD2Kx0vpwX0tYrBXY7lyc321XW2HRx3nZrGGoFZq3E+gjuVSEx3FEE0RQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vrb2eENkEgEwFIBW9fRotV5ldmssLuXV4pQgV2OfUUA=; b=ijrgMDEuy3xuIJsagpbakKhSZgLwyf1XSN3jXuqd9zUny+XxTSzSVhdMMll4gUZ+90Djky1Bo8C8vvqBFtCqze0pli65sAw5J2BKq25vBYn/0n+9jNECFx0UJzlwy4aVOhlTwMMwGt1ds92uioNkBIlZQahTo6EoEt10JSQhYfg= Received: from VI1PR04MB3168.eurprd04.prod.outlook.com (2603:10a6:802:6::10) by VI1PR04MB4992.eurprd04.prod.outlook.com (2603:10a6:803:51::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.26; Fri, 17 Apr 2020 20:56:39 +0000 Received: from VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::8c03:2f5:3b48:ba74]) by VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::8c03:2f5:3b48:ba74%7]) with mapi id 15.20.2921.027; Fri, 17 Apr 2020 20:56:39 +0000 From: Akhil Goyal To: "De Lara Guarch, Pablo" , "Doherty, Declan" CC: "Zhang, Roy Fan" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] crypto/openssl: fix out-of-place encryption Thread-Index: AQHWEoHKHs0a+rURFEelCbafD1I0gKh6kRyAgADirgCAACNYQA== Date: Fri, 17 Apr 2020 20:56:38 +0000 Message-ID: References: <1586885155-163682-1-git-send-email-pablo.de.lara.guarch@intel.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [45.118.167.79] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 585f1c91-f553-4b98-ba9c-08d7e311d328 x-ms-traffictypediagnostic: VI1PR04MB4992: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0376ECF4DD x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB3168.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(136003)(346002)(396003)(39860400002)(366004)(376002)(26005)(186003)(66556008)(44832011)(64756008)(66446008)(66476007)(76116006)(52536014)(33656002)(5660300002)(66946007)(4744005)(4326008)(7696005)(316002)(478600001)(8936002)(71200400001)(110136005)(8676002)(54906003)(81156014)(2906002)(6506007)(55016002)(86362001)(9686003); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uLqn53GSHumjzfDfynf9x/GBdQurUnO3FVPfus4q3XlHL9j2pQrG7jAQKo06B3vkjwN5TDOFT6xNZZ1+RhlDpAgcD8HGJ3YSknX+njFu9ILZ31r3oaGnk2KmSG95/TeRpbQx2YytrsgeFUiYA9/E8IziN6rXbPHY1KkqlnM1pqlNNx7FiE8GUkM/0k8XSmiFKDfeex33V2O5TeMvDXlqAVN8MXf0gbfN5D3vSRl26zYdhE/ODCI0xJRWicwgKi8lKXXOQXtHzlgv70QvhuDHPHodcmKaGJOSXCX39Dm7BhlPm38p4ufv+ZSEhw5D1PJ1s/1YcVjkpts6hgwaBmXk9xVxK/edVmiknVLT04BSh/ImnSgHi+uzZ6oRwYOARrB3cUuAuEXwnjm9XtSrjghuj0vYtJT+nwlUnzcO7U3YeWTf+Opr1CDNrqfT45DtySbM x-ms-exchange-antispam-messagedata: st1lG1hW0fWE+HZbKVSsUBphhHSLGrex+xXFgzv0O0jaruVxL+A1YLCqGS64yQuU1Xtx874inf11qNcjE5X0Y9ZOATih2u9Ca5DXv5Z49XEQ3HM8A+MvPIBAIexmI7YP5V3aw0ZWMNZwNA+BshWXKA== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 585f1c91-f553-4b98-ba9c-08d7e311d328 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2020 20:56:39.1656 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: p6CeNzhCxSZthdvEkWqdCV6g4aTSGjaDmvRGMaqU8MmlXano2itp23JbdIA6Iz4rjlLxuU/Pl7e8gsQOZfmvsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4992 Subject: Re: [dpdk-dev] [PATCH] crypto/openssl: fix out-of-place encryption X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=20 >=20 > > Hi Pablo, > > > > > When authenticating after encrypting, if the operation is > > > out-of-place, the destination buffer is the one that will get > > > authenticated. > > > If the cipher offset is higher than the authentication offset, it > > > means that part of the text to authenticate will be plaintext, so thi= s > > > needs to get copied to the destination buffer, or the result will be > > > incorrect. > > > > > > Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL > > > library") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Pablo de Lara > > > > Do we have a test case in app/test for this case? If not, we should pro= bably > add > > it. >=20 > Hi Akhil, >=20 > Yes, we do. In test_cryptodev_aes_test_vectors.h, the "AES-128-CBC HMAC- > SHA1 Encryption Digest OOP Offset" > is testing this case, in aes_chain_test_cases[]. >=20 Acked-by: Akhil Goyal Applied to dpdk-next-crypto Thanks.