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 0EA25A0563; Wed, 15 Apr 2020 21:22:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56D991D9F8; Wed, 15 Apr 2020 21:22:35 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20076.outbound.protection.outlook.com [40.107.2.76]) by dpdk.org (Postfix) with ESMTP id 5C8911D9CF; Wed, 15 Apr 2020 21:22:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IbCzu7qNeFluXuPC8C8ZsRSEsccdaVGXX3L8YTpQabQXjS3oM7kpYoLcg8/KPTsN3A0ojzkWR9AUIysqtNanlc3uALQLFPrF3dbHXhUB3jefRrHa5XB6dagcv1wSp21DQ9YnYQ04r7hZeNg32PJ67wypWBGmB0O8azKc0K2kQpWe6fDEyS9MD0T1cp1SUzg6vhJY9xo6gpAX4Y6hgOz/ALkU0LDAlsu8BzY8deqOcl7oQQFswlOwcYr0eDP88clKN9aryrvnmMJ3KH8fURGJu6I01bXNTZN46z/sGeAolMrA1nakuiwNSM95epROcsadqP9pA/TIiH/KAnfChBoUXg== 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=ZXhS+zU8gkYcryIhOnVEOHqD4eYrDgWPI4GaRbg/YkQ=; b=eQB4hla/XjF3E8QfQW66lfQnXo0wKBCvlgHcFUGNsSVlGo0xUvnDZJA5jPWO3qvxtv2u3bd78CXhBIIVdkbR+gppegT+p7WUicA3naGwjjYIeuPLMCnAiOT9lU7AkJ0Gtk3r+5JjHhP7CdPTAnKXjoP6A/tbXB76lqnt7JGEcph5ZHIlJPzRSuSbKkNH8Wrv8hgPblSxI4wDfnkkQlFL1S3rE8WuitoPaYNxqrktndTcp211sCef0kmFc8A6tP4Y4mjaT0FOnermRi4UHJOy8D6pmhoNg8buXV0UXwk21vMZyOgDtN/wDiMTcCMHbFfSzl3z+VFRmyYt895QTR3fuA== 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=ZXhS+zU8gkYcryIhOnVEOHqD4eYrDgWPI4GaRbg/YkQ=; b=JOmAsvkJtijPp9JGdZlbplIJ63yVcR3RPhj72GtkI9Tfpcg6/xFPA3JPoESiJtwr7tEtDX5r+zoCDrSKFpZhlY+DkJduuT5ZonPskp4RR3Z2z5aRudahnZTp7BV5JVAt+pwR+Xe1FmhHLqWO61/J4YovFLQe004NzfT/th2x168= Received: from VI1PR04MB3168.eurprd04.prod.outlook.com (2603:10a6:802:6::10) by VI1PR04MB4077.eurprd04.prod.outlook.com (2603:10a6:803:4b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.26; Wed, 15 Apr 2020 19:22:32 +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.2900.028; Wed, 15 Apr 2020 19:22:32 +0000 From: Akhil Goyal To: Pablo de Lara , "declan.doherty@intel.com" CC: "roy.fan.zhang@intel.com" , "dev@dpdk.org" , "akhil.goyal@intel.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] crypto/openssl: fix out-of-place encryption Thread-Index: AQHWEoHKHs0a+rURFEelCbafD1I0gKh6kRyA Date: Wed, 15 Apr 2020 19:22:32 +0000 Message-ID: References: <1586885155-163682-1-git-send-email-pablo.de.lara.guarch@intel.com> In-Reply-To: <1586885155-163682-1-git-send-email-pablo.de.lara.guarch@intel.com> 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.166.69] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 160948f2-c9ba-4f83-bdca-08d7e1725874 x-ms-traffictypediagnostic: VI1PR04MB4077: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0374433C81 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)(376002)(366004)(396003)(346002)(39860400002)(136003)(8676002)(8936002)(81156014)(66946007)(4326008)(2906002)(86362001)(9686003)(71200400001)(55016002)(33656002)(26005)(186003)(5660300002)(64756008)(44832011)(66556008)(4744005)(66476007)(316002)(52536014)(110136005)(6506007)(76116006)(7696005)(478600001)(54906003)(66446008); 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: PT0etJ0VmksZviuut1/f/P9HzTSZioy0bVzrBkI2cYCs+2yQ9pdZDwZj1kNYLXJUycZLnXHmIInbqBnXZOl4pWddVgbBP7p0cILkpxx3SPRTzN0l9QCLQZQA2jmn4D4HvioJ+lEaPIV1Kr3oA3pmtPxABoQiqMWFYpKj28I4uEK0ICwiHbfPV7xH4NwN+Mi5mqNe3ti1ug85AiE3qSj362Yjf7HW+4ewH2M54y5N82jwCp930uAC120rheWKYmpbGT7nyu4rdqusld12cXeXjs34/TvdIRCPcZ5ZZXdwgSRkp/6iKN5o6WieGbi6mzwI6nOZslpPqbovsD/s5EPL7sv4Qsq3+4TKxEwajgW/dVLGi0YCTaa/SyccKHX2Xz0f+E25kqRM2LzAOC9r4NzsNWWe4lr8bkgqrTAQnJFBV4/NY2GLE5ElBelH0iH39JKW x-ms-exchange-antispam-messagedata: A++kanSL5uoaOAWm1/nlZnDrdRq5xu2nby8BLSpOyG1Q8xnbBBM2Zuau3P1LVJH4c4QRX+FCCti9kkOcYxY7OAe3291grPqkTT4sZis6kROQnxkfQGAnVnbDRWbEqJRffw5hdaGWmNCXwHaI589bBw== 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: 160948f2-c9ba-4f83-bdca-08d7e1725874 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2020 19:22:32.1042 (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: tHqPdpyPhExFsejuvg7oVfTEVhXlNaUS7X6cI57VnC2bMZmJ8LpAD2kpJeHodPA4FNn/U6c1rprsoCTx0cbVfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4077 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" 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 this needs to get copied to the > destination buffer, or the result will be incorrect. >=20 > Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library") > Cc: stable@dpdk.org >=20 > Signed-off-by: Pablo de Lara Do we have a test case in app/test for this case? If not, we should probabl= y add it.