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 02B64A052A; Tue, 2 Feb 2021 15:11:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F7C62402DD; Tue, 2 Feb 2021 15:11:08 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by mails.dpdk.org (Postfix) with ESMTP id 416412402DB for ; Tue, 2 Feb 2021 15:11:06 +0100 (CET) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 02 Feb 2021 06:11:05 -0800 Received: from HQMAIL107.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Tue, 02 Feb 2021 06:11:05 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Tue, 02 Feb 2021 06:11:05 -0800 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 2 Feb 2021 14:11:05 +0000 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 2 Feb 2021 14:10:55 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.170) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 2 Feb 2021 14:10:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jCcKcKN7lZjALNtuokDq/v+VsNvK9FhJ8mpPKWCUvrXEt2tpSGbrOmPocIQL8SOx8PWvFGdUSUiMBwhiil8JaZKDZSsNfbgaVvvBUq4GQyE4fx8GscxRQPAjz3lN0Xtto/IT0jD0t1dDSh7OXMktGlald7mhYinCwS67OxKFu4anGIcHMuOWXNhW99YMwmd75GWphqPrsE5mV/0lb/8IVC6RXWkeGBnNIZkdrFEOqQ3kfhfO5eoATYiV6hu68RcytjDuJmInFd1GQm/fpElxgvTKtXG0AXYv3ZAhSY3RCDN2cKHOETR4UfAUeuEm0aGjOM+m8KVEsgsLWDDm47EyWA== 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=AqJ5NrJFUqzOSTHiylfWAqLZPjuXEwfk0PN4La+YtRs=; b=b46l4U4X6HpQlwIQ4ZYS0k7n7qVSPckDkYdQOY/JOlvkstfFjVO1UmaOg6dPS/fEKsFkWHpntMTZIWxAB3gSSeFXOAcqTuP8dxVQxUZsHdfjkx0pJwJ+OKArfyHYvQIXiZ43Yr+LHOEESHY4mTRt9WkE5OhtktcRViKuFHkI9h+JeDCTxnxX6KG0Hu/9L4f3Ct8OcC1jHycpSxpNlAyGsE7CLR0PvSmsLqaIJvDX0/jhlVUQYMrt0xACuR8fpPidhJFKjfYmB3nfDIx4BGlusNoU1s5OcgzZgZX2fF8/8cjnHRgzj5Udqo2WfkU5cy2VcAoBy3rmVPy6xJBCE3iEZw== 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 MWHPR1201MB0032.namprd12.prod.outlook.com (2603:10b6:301:4f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.17; Tue, 2 Feb 2021 14:10:53 +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.3805.024; Tue, 2 Feb 2021 14:10:53 +0000 From: Matan Azrad To: Akhil Goyal , Declan Doherty CC: "dev@dpdk.org" Thread-Topic: Crypto API for AES-XTS cipher algorithm Thread-Index: AdbtqHaaE85Is7DmS3eiILho6BOhVwABS8mQAJrDvdAAAsExcAJSXD5A Date: Tue, 2 Feb 2021 14:10:53 +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: [12.154.207.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7b54f8dd-86b2-44e2-677e-08d8c7845a57 x-ms-traffictypediagnostic: MWHPR1201MB0032: x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XtgY7iaSzum+UMkqFloitP74AlauwkI8MPSy1N3Stue9R6+CAax2Nn0xv7/Jj8gt58rAhB0AVBe7VGXiFlfTNqm7e1KwREyZdjZw2hBq18OgScHn2N7jR7VMSmXc7KoUyvVzpc7J3Q2VwI8DFyxJStKyHtQivSijBxXoViO3ayBXs8uMObdPEgzEMVA9IfKsCgdQ97H/QPkBFM7U5pesEE9vkRUmkGVD5dzxlsaxeCnL5zOyTpHuUUgwtJ9DT8pnxJ3q4tExuw8Qh2mUA5X43avJmBHbBZqJ105lT4a8uOPJT30m1oNet5dxFz2sPF5holChdvAIK58zMUV7KafyaXqPL7l3w7ygwrb2yaWQK0sxEKLl4HOiLkkx3hr8FB4/ynX61W292F5z4UxFdOZB6R5scsS6SKtoQ2jrkyXlEeKmnSNMmmrWpinCNZEY7bz764TB8slIoz51WNUAb1OM7UutiUt7jFI0vxAuR7+hFkRiOH9GBk1w1IXQcG7C6MHaEyDGm2m6lW6v4cvoBgQJUw== 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)(346002)(376002)(136003)(396003)(39860400002)(366004)(110136005)(7696005)(8936002)(5660300002)(76116006)(8676002)(9686003)(478600001)(52536014)(71200400001)(33656002)(55016002)(66946007)(66476007)(64756008)(316002)(66556008)(83380400001)(186003)(26005)(53546011)(6506007)(66446008)(86362001)(2906002)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?AlQXArJS6yUkePn4IctHph/M6JqpTHtrUG8nsOj9QZ0SJBsogU+87a3gpUl3?= =?us-ascii?Q?BAUKmKMAzjH+Em/MSEqhGDRDAyeXAyUTso1P2sAG55k0Cb47Mk+f6ZaRa3o0?= =?us-ascii?Q?Gq5JYCJVYCpRTGU0fF/XmD/+CtltuFlqIFGS6MBgGHpGaGqIJaGnYY+P6Wtv?= =?us-ascii?Q?Njqpxi09YetCjYCTW7253RdjsgZ2NRVxCqg66NYhZooDL9ghQHEGFVRb/lob?= =?us-ascii?Q?5JYijRh/d8lRtkoJ0sk5AGBT4GJDwQzpu4zkZYF3wnqCZgeRWnzTrAAY7bUk?= =?us-ascii?Q?xXdp1KAUvgGhdWQx1kfOvLMbpFQ7jqgD6b/duFbSToUwWuxM1ujPmsEa+cZa?= =?us-ascii?Q?+5bqwJQhq6W3vpSrtRvkIVtIGNO1tCfvpxqd+Atrvtbh3AIk49flBctoITvf?= =?us-ascii?Q?5iqDG3wNAIf7fRPm2kG6WWxdNfYiF43D18kqJBq4ye3D6b0BKFriZYTdslek?= =?us-ascii?Q?TTs9Zy6oOKlAQGVE4qXLSFcCPrZy5GNGLAu1MEQyzQRJPFlyNsq8M710VzZA?= =?us-ascii?Q?BMBaEvZ1XgkAYG3uKY+UbUz8uPexa3UX745KoBAhdHbo3dtKTwdC+TSuyJNh?= =?us-ascii?Q?9tms0miNcdze/O1k9GExyUOSsIhUxG9AoDvZrXbFpnTb4+ekLyWdQKgStk8Q?= =?us-ascii?Q?1rN2G666LBCM7sReh5wxBtn9WaaG1PCi5o+TPHJv4+BGI+A+kJj00r394AsL?= =?us-ascii?Q?JW7hGynHi4oSro5e923Kp7wCw50pxVWrgYQNn/cVk5OOnV7bFTLPeJw/PsgS?= =?us-ascii?Q?Q6sL5XrI1NrMtA4TIeQDXoNCE9PTvtZLY61Q3lB+V0S0+dsxTXuGgOJu0Ds5?= =?us-ascii?Q?uOSV5DcKyajfkwASNcGbbg4ql80onfMG+VEt+ymJ4FEQCUKXePjXcUUyEjR7?= =?us-ascii?Q?sLweB4H8Ns4iSATIleVMAoy7099f/eWhxlEtgqSVkB+2UhnjH5xVSmW4nAtU?= =?us-ascii?Q?nFAVgDDI5EycRZHS1fTVCZJIMwzwUQ8ygOrdlP/yseDxcyeOCUrC6reKuNn/?= =?us-ascii?Q?GGkA3MmcLaCSljHuD/iRtpfpmSb5V86xksIIb32Ku9kisbOEXwUmvLfcR/Z2?= =?us-ascii?Q?q2BNayis?= 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: 7b54f8dd-86b2-44e2-677e-08d8c7845a57 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2021 14:10:53.7023 (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: kdvwPcqSx0UU4emWFfPqDDx5jvvh3WTXxTLpCrucqcnhasij4yOQpXtybZiZhl+nHrVYyPudaDixrnrnCaraJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0032 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612275065; bh=AqJ5NrJFUqzOSTHiylfWAqLZPjuXEwfk0PN4La+YtRs=; 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-header: 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=W2DL8TU+rU1WFW/008XacdS8AsvEa1YEgHjDyqQboSjfGyjPY/11slNwIF6KCOdo5 ftlCloOTRUsAMmSV0NwcolgZxR2E+3pknCrRmqRLWqThZjbNQhpEa6GqXqX8upNH3x 4sS8dkw9j/m7CDmVs8wGnmaC1P2MHHuz4P7wfz6REjN1nGMbZ7x+EW4/7Ku5rWapyP 5A9JlJUvCmeeQmbGCV8EGXB8Trle6y7vdWAnmOsDnKQcRgbhVPIaJ0fmc+VcDcqT2z eTl7/ACQebARpiCr7Z9WpgIk2dfbOGyGFzd33LDdJV06IVw/Ni1cLEtwyws2cI6iBa k3EZ5OgPDqbaQ== 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" Yes. I'll do soon. From: Akhil Goyal Sent: Thursday, January 21, 2021 8:33 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, Can you send an RFC patch for the changes you are looking forward in the cr= yptodev lib. Regards, Akhil From: Matan Azrad > Sent: Thursday, January 21, 2021 11:16 PM To: Akhil Goyal >; Declan D= oherty > Cc: dev@dpdk.org Subject: RE: Crypto API for AES-XTS cipher algorithm 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