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 88949A0588; Thu, 16 Apr 2020 10:52:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C4F781D9BD; Thu, 16 Apr 2020 10:52:53 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 535251D9B9; Thu, 16 Apr 2020 10:52:52 +0200 (CEST) IronPort-SDR: ujaws1x/pXvOKvzKtXx1lopcRUaprhq8UWls2QrK3kmesmdnHx7Pghb68hIsivaPO5ctbcv12r ZwCgRKwAAYaw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 01:52:51 -0700 IronPort-SDR: 1znka4vuqZqt3txz2Uy7iPyW/E/M9ye5zp7bhSiSX8svZNXUKljHfp7z39YTd39AaaMXmWsM3T 5tYiCNAC9aEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,390,1580803200"; d="scan'208";a="427759010" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by orsmga005.jf.intel.com with ESMTP; 16 Apr 2020 01:52:51 -0700 Received: from orsmsx157.amr.corp.intel.com (10.22.240.23) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Apr 2020 01:52:50 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX157.amr.corp.intel.com (10.22.240.23) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Apr 2020 01:52:50 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Apr 2020 01:52:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WoNH6lvy+TSuK2mdEpq+ODYc3GribhjDhlvioAPUS5x+bOl3a2yGEjgM5fdfQg5t6xVwhH8ymHyM6khF3UoSUGmij+7Nf7Hk2/YWnvUTNvn216f0wWvIxYBaAKqaLwjUjfeiQGFX2MiLhq26frV0t8yUnP2RMWI0B+MJaresUJsl/gq6B76d+7AbscSPmZ3so7UM+zH34JT7zJDNB3T3f+HoVzE3RITYa/5YMpM1ibrwmbGWcYTa+tzxSf5wGUZefzfnaTHHg/pCakutt/YpNwnnUNLX0sn0KPrWYp00B9suS7RLmZ1nfp1VfhT/874UbYK9KqZH1Q1RkvhwukoJzg== 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=Hs1LdM3rGNcN5yOhwN83iLgZ4QO1b11zPZ+RJztTbu4=; b=gJ3WZh3ZUp3z+HYV/TnToHOhYPBzrxOwtpy+4aOVSweMjXx6b4p21XIVnpandSV7xM69PRllDeWLvA3De8xveqnfPPTEd4TsUVhatdAH0EOmDFJx8mY4ig2MKqZdXwGuMrZxC4W1DUmwZjB5MKECfxzxbKmNfqwfIBdbcNCf6UOStdZg0lnByoAcs6Xuh7h5LdQwC1mF8AdD1Ri72LL+v7nGP5MA6FA/nAjM3KKwN5JpsMuzZicxjR56DjY71ishUkI+JP+Akknjv1iw7xL/3LYfesCYl+7V1z+vBeirobBr5+PSjpdsedsuHga00yo22X3uIK200xkKm4kf1jw54g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hs1LdM3rGNcN5yOhwN83iLgZ4QO1b11zPZ+RJztTbu4=; b=O28fehh1L5NoaUd8EhCJ3N85HjbotNl/2MjXP9LTn0usHHYpnaOx7XMg8wUMKe3ITFM5rra+05eN9iBXZHWdTRUkTsiNMokbKa16EDrglPV+qMfGmvE3lprJ9kfX0SGMFsWICoFHttBEuBP3C8LvKI1T3QRjq0UgS7XCn1nZngo= Received: from SN6PR11MB3101.namprd11.prod.outlook.com (2603:10b6:805:d8::23) by SN6PR11MB3472.namprd11.prod.outlook.com (2603:10b6:805:bd::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.26; Thu, 16 Apr 2020 08:52:49 +0000 Received: from SN6PR11MB3101.namprd11.prod.outlook.com ([fe80::7d0f:735a:8d8b:1d40]) by SN6PR11MB3101.namprd11.prod.outlook.com ([fe80::7d0f:735a:8d8b:1d40%7]) with mapi id 15.20.2900.028; Thu, 16 Apr 2020 08:52:49 +0000 From: "De Lara Guarch, Pablo" To: Akhil Goyal , "Doherty, Declan" CC: "Zhang, Roy Fan" , "dev@dpdk.org" , "akhil.goyal@intel.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] crypto/openssl: fix out-of-place encryption Thread-Index: AQHWEoHAHcaUT0KN30GBapdHQMN0gKh6kWgAgAA7ysA= Date: Thu, 16 Apr 2020 08:52:48 +0000 Message-ID: References: <1586885155-163682-1-git-send-email-pablo.de.lara.guarch@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=pablo.de.lara.guarch@intel.com; x-originating-ip: [109.255.188.24] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b86e3114-f97d-4f41-daa7-08d7e1e38a51 x-ms-traffictypediagnostic: SN6PR11MB3472: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0375972289 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3101.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(136003)(346002)(366004)(396003)(376002)(39860400002)(66446008)(66946007)(5660300002)(9686003)(8676002)(53546011)(4326008)(7696005)(81156014)(8936002)(478600001)(33656002)(66556008)(2906002)(86362001)(55236004)(6506007)(76116006)(66476007)(52536014)(26005)(55016002)(6636002)(110136005)(54906003)(71200400001)(316002)(186003)(64756008); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XhZIRTQ/Z27TJGOa4+BcoPr5/xqryzGvSv1+bJPwKGf909GGrgIPo7tr31kJeizAI/rz86WWMC0ns70eU5USILPFpyga2tm2262tKDoEEvvQ2ADvOV0J8t3FnocokNh1zxbHNvmQ6PuWriT7nlsmv27ZLKhILjP/YtdPF3L3UJTxW6RhseIe0DYoAbzOIWKMN6tZ6MSOJfP46q2LfRshSqy9lINIZsjmvpJ9xN/HCg9Z/cCzonrPELa726i9YlmeeHDBSjVqLNJe6qDJVMndiknowyoghBpIXTg84+JlEeHR4Rn/KO5tNFt6JBmkRqh2oXFxBrZv1tytbHS0JZd1+aLC2y8D/RqJrIyHxHPj/J7FRxIEl3t2QZere/wOdyqEiWglOC4YbdD/VhW4PtCi/vuLFU0sSllylqI8GzpnRnHGiy2hfhVFU6wer2ZqCAHk x-ms-exchange-antispam-messagedata: vOfLzxFEwz4XPyUeIlwsAlaUpwvog7jWTgv7X5sYLkMmKkzVnCNhi/gctsAjIHC7L4gI5bYOdPmBE5bIwCZY+/wctLDwspDTM3cKu+gyHqpQElEn+s25oRNGJ+Un+D0oBqIF9zAV3VT+gXL3oFtWrw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b86e3114-f97d-4f41-daa7-08d7e1e38a51 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2020 08:52:48.9661 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SikM4MqovlRx/pK8jbikBr3fOxkCctk8qrgo+pO0u9LTjKfHRnjfp8HZi/0ypTt7O7xEOsv72cWS+1FxeQ+7MpONasjzF4dV16i76sNcFLA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3472 X-OriginatorOrg: intel.com 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" > -----Original Message----- > From: dev On Behalf Of Akhil Goyal > Sent: Wednesday, April 15, 2020 8:23 PM > To: De Lara Guarch, Pablo ; Doherty, Decl= an > > Cc: Zhang, Roy Fan ; dev@dpdk.org; > akhil.goyal@intel.com; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] crypto/openssl: fix out-of-place encrypti= on >=20 > Hi Pablo, >=20 > > 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 this > > 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 >=20 > Do we have a test case in app/test for this case? If not, we should proba= bly add > it. Hi Akhil, Yes, we do. In test_cryptodev_aes_test_vectors.h, the "AES-128-CBC HMAC-SHA= 1 Encryption Digest OOP Offset" is testing this case, in aes_chain_test_cases[]. Thanks, Pablo