From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DC8CDA09E4; Thu, 21 Jan 2021 18:45:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 635DD140E00; Thu, 21 Jan 2021 18:45:48 +0100 (CET) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mails.dpdk.org (Postfix) with ESMTP id DE1AE140DF7 for ; Thu, 21 Jan 2021 18:45:46 +0100 (CET) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 21 Jan 2021 09:45:46 -0800 Received: from HQMAIL107.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 21 Jan 2021 09:45:46 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 21 Jan 2021 09:45:46 -0800 Received: from HKMAIL101.nvidia.com (10.18.16.10) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 21 Jan 2021 17:45:45 +0000 Received: from HKMAIL103.nvidia.com (10.18.16.12) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 21 Jan 2021 17:45:37 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.109) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 21 Jan 2021 17:45:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mmSYQNE9oLkq1pvCOH8pXbk9WaAv3xSFUPRPOYIzm868fLUCI2O99Wxhxt6db/wjNaejZyUMjCMmFWBNPFd54DQJKPSgqu5+7lwXXcOwmmsKCVFUcEiwb3lS0zva7PkhifGU1FQAgZbrQxjvKuO8yaq0h3fuCGDuKgbw4uFYLqHgp3wiZBDb70vdMS63HtHh4RHDBrlh2Jvct1glL4OEmKubxyHicFJCjsJA3PES49owM9E4TvM0vw9sLJedYppRX4awJjANKiZ0Iy/N+/C6jDUE5PWh+MbjeLxt1j1MU4BVVeXLGPvEMFhCDgF3AIkesbkhKBMMGiQVRhcM8qekiw== 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=G9DJX+f1Zup2YqjVf9fZ9n+hyBfd6q6y4Yhu++WQiHU=; b=NkA7K8bAl6ZTYYth6HZ1tLi2VEQHyKXZnkeJc7bF5aD9+dSaiQKJNHpSLQjRRG2KIu0qQ6P3wFGYKQ4gNSZpb2L5QdwJNp1Wu4Ffi26as0tq9hpQ5V5+1Xn9+0KSAk0h4x+hsax+ruYv52r6LK6dS3VHht1aiIeutICi7M88C8w1gp6DJvIx8hhGkRZ67/3Xz76LYQQbYSfiO3oocRMZ2l4u7mHQBs9jY0POcbAevczG86VKgTS8gF+YWRL7IYDkgC1xfrnrD6Kg/50M28FMuASGdfartOqvsnPlOfT0we72xivyT7ZATsQ9XAQpgJW1SFaOp/9vix1ccCD5p/gBSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MW2PR12MB2492.namprd12.prod.outlook.com (2603:10b6:907:8::19) by MWHPR1201MB0190.namprd12.prod.outlook.com (2603:10b6:301:55::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.13; Thu, 21 Jan 2021 17:45:35 +0000 Received: from MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::680b:7b85:ef35:433b]) by MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::680b:7b85:ef35:433b%6]) with mapi id 15.20.3784.014; Thu, 21 Jan 2021 17:45:35 +0000 From: Matan Azrad To: Akhil Goyal , Declan Doherty CC: "dev@dpdk.org" Thread-Topic: Crypto API for AES-XTS cipher algorithm Thread-Index: AdbtqHaaE85Is7DmS3eiILho6BOhVwABS8mQAJrDvdA= Date: Thu, 21 Jan 2021 17:45:35 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [216.228.117.190] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3d57f5d5-381d-417d-f60f-08d8be345b7e x-ms-traffictypediagnostic: MWHPR1201MB0190: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: a4nRjDdlQgco5OZZPbRioeHWyYXFFrs1m1kd1YJVqgB6D1am0e0iVHS7DLXT0Sa4OpNAFkVfVNAB47W+H1kHI4Sz1mz3/eQYqS7ef8bqNpLtWskz7zLDU5pF6TTUzaKR7ZtakG0hZT4gUTkkwqWN/Yg6HiEYe9Tz+05TFOeNy99dVDC/7itOX0vduQB2w5tJYw+0NCqhnYA/xkXHN6SwAT+ZosefjsKrlncRD54Gx1ZH/pYSp7QE26aCzR7uiPfsoBnV+PeMlM2n1Fn79PnKKdP92Ztzy2gEfJapFGC83tcc6zXigv/U1zFpmTuqrSz5IIFXCesg6IyJLxFi5cEy/wQlkdcgCEKH1fMBXZ3KPwfG95jlDu9dhd89CmdSt5IK/k/i8ECWzUIPYdWa4MMZYg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB2492.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(376002)(396003)(39860400002)(136003)(33656002)(71200400001)(316002)(8676002)(66556008)(110136005)(66946007)(64756008)(66446008)(66476007)(76116006)(5660300002)(52536014)(86362001)(6506007)(53546011)(9686003)(55016002)(7696005)(8936002)(83380400001)(26005)(2906002)(186003)(4326008)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?WVBiQueIrVTLk9sgK6PNHSeKr3lYws3EZixEsdvnW3zKksM684UNF1By2/yv?= =?us-ascii?Q?t0DSma3zenLIOEEIqfZD9r27H69Na/pDmrNdKHzgV58Ps1Kj4ZS9WwDLWEGr?= =?us-ascii?Q?r1dem+bGFiLHxrMP0wOF3vJqDhMrDMqD2ZrnHy17X9CZZwzp2fyDd5DMet1/?= =?us-ascii?Q?jkS8TlEe3cBqZdwTIbanl+/Dwebui0AJbn8d1S9NN7Z4RvsrbExPOUdw34l/?= =?us-ascii?Q?5pjNPGNrAFTg+gtXrAfjznGiteO0StK7qytk4aRfdtqC3PK5WIeEZtIw+iA8?= =?us-ascii?Q?Pp8j0tS/3+SVf1ZlrVT7DDTYzBnhFZpjTrT2k4wD7Mfb3RBIp/RwxsPjlNPj?= =?us-ascii?Q?dea7cpU9/9CpssG1nKgPJM/wSoVc+dfYtVj60rpJf4kuJkLdyAAZmlsvJOQj?= =?us-ascii?Q?n2BnD5GCIi4FCKmyASF7723+AyDw66zjDpOGVSpjgcX2oTQB8vE8CYdHMrRe?= =?us-ascii?Q?SVZWvugIFDw1VFjy+9DtJb5jJiOB1NslIQGYG0QEvuv1I+pOi5Cchczf2T6r?= =?us-ascii?Q?vKLD8XyKCcg9y6WY2U276reoOt5DOjLfAkZq8VidxnxHeudNc/ygqUQPqTNR?= =?us-ascii?Q?uga7kYkCI6UK3mh5CSIBqoBRpo0M4CMbD79EcRVf8j1+oK6bmF1Txt0XrKgp?= =?us-ascii?Q?oNV4o/4sc66ZQuRbPOhuDXZ/DsemZYCyi9ipcBswQfAC3qxJ0vKlGae/HrKa?= =?us-ascii?Q?YgRWVwnDZpPrIzCzMEoCBykWTO1aKG1N8/9cw44occro4Y/Q0r41X97U8THU?= =?us-ascii?Q?WL0bEao5BYbc5IRHHWdwyGyRuFf6XeMb2HYBx5S/zvjjwDMnAvZ9UMqJ23BD?= =?us-ascii?Q?tmgI/ZgVqLBvM1Lmb5J18B5LXjYbaGy1mpmwYPSI71LG3PUKYHTKo+NBEXjp?= =?us-ascii?Q?4Gg7WmF7F2+EeHnvIfUapaZ2hyT147LpHZyeo4YbuO3HfaZp1XjuafaTYt0f?= =?us-ascii?Q?kEhBeEkNTAHejOqXNBSoJ74TVgIBa2l9n0STmW/L+zE=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR12MB2492.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d57f5d5-381d-417d-f60f-08d8be345b7e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2021 17:45:35.4020 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lnS9mcD1IRv3yNBih9rvX7TdQ4PVEZjjqGudHPtIEHpsFti1rQuUbX9raYGDCOvi5eTy3IpeCX9UOKS3svlWJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0190 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1611251146; bh=G9DJX+f1Zup2YqjVf9fZ9n+hyBfd6q6y4Yhu++WQiHU=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: x-ms-exchange-transport-forked:Content-Type:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=e/NMhowwkMk/5ZAlSKA8Kddtw+8Je47W+gtbkD1UWXz3w4vCKBNRWsXF6io+RSx8G KtcixP9RM/mF2OreCPjEo8UKbb2+UWIygO4A41fFrwgIy3SJmqF3Vm0jGn9/odQLxY WHGTV/tfE5LCCz2yvu0yucLivtSU9jx9yv+9MHb09ZKAz9YkeJAq6nZ+pz/aYdVEQq o86rzQMZbrht0kzv3AolryNLjykgjaNskXYOVp5sb1xXE5d5ASietQR9gJ/ZjwXb86 x1dyNyNqck3G0L1q6v6tV4Xbxm+vPyIQ5WjBp0Y8zop7vZu2IGxR5APKX/rCiCFDzo oqMfZYs0PjOBw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] Crypto API for AES-XTS cipher algorithm X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Akhil Yes, you right regards terms of data-unit and block size. My intention was for data-unit. AES-XTS algorithm is a mode of AES so by definition the block size is 16B. So, no need capability for it. Also in the symmetric operation structure, the `length` field is described = as next: /**< The message length, in bytes, of the source buffer * on which the cryptographic operation will be * computed. This must be a multiple of the block size */ It doesn't make sense to limit the user for buffer size which is multiple o= f 16B, one of the main reasons of AES with XTS mode is to remove this limit= ation of AES. Also, the data-unit size is important parameter in AES-XTS, because encrypt= ion and decryption must use the same size of it - so the PMD cannot just gu= ess it from the `length` field. IMO: Instead of block size capability it is better to use data-unit size capabil= ity. Instead of block size limitation it is better to limit the buffer to be mul= tiple of data-units. It even will be good also to add this data-unit size as configuration in th= e transformation structure and to let the user know the supported sizes in = the driver (capability or other mechanism). What do you think? Matan From: Akhil Goyal Sent: Monday, January 18, 2021 5:27 PM To: Matan Azrad ; Declan Doherty Cc: dev@dpdk.org Subject: RE: Crypto API for AES-XTS cipher algorithm External email: Use caution opening links or attachments Hi Matan, Block size is specified in the capability structure and is expected to be s= ame for a particular algorithm. And for AES-XTS it is 16 bytes only if I am not wrong. As per my understanding, data unit is different from block size. Data unit is the input data which may or may not be multiple of block size.= There are different handling of data Unit defined if it a multiple of block size or not. And I believe there is = limitation for the max value of data unit Which the driver can give error if it does not support that particular size= . Regards, Akhil From: Matan Azrad > Sent: Monday, January 18, 2021 8:19 PM To: Declan Doherty >; Akhil Goyal > Cc: dev@dpdk.org Subject: Crypto API for AES-XTS cipher algorithm Hi Declan, Akhil We are going to implement mlx5 crypto PMD to support AES-XTS de\encrypt ope= rations. The algorithm defines block size >=3D 16Bytes (it is called also data-unit)= which should be known for encryption\decryptions. I didn't find this parameter in the cypher xform. How do you suggest to add it? maybe I'm missing something? Matan