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 5D14CA09E4; Thu, 21 Jan 2021 19:33:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D457A140E22; Thu, 21 Jan 2021 19:33:33 +0100 (CET) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50054.outbound.protection.outlook.com [40.107.5.54]) by mails.dpdk.org (Postfix) with ESMTP id 7BD45140E1D for ; Thu, 21 Jan 2021 19:33:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mhh2nO3xKJ7hcOPDqQhqgy2NX7xVbIi+toh/WeV9PvPok6WZpvVbg0dFSdTBxceuLq48k30mk+bNqKv53tx4Fic77zRGnq0Qa/OafsolbzufOTf5MxbKL+7R+WMA0TFytEYS+H76S8tL/i6ib51QqAUNS0ZnYCVu+hnUeOfwWX2xSmd9tAL3uPtI7ngt6Ypduuf/qrpFLSPyEQZ1eW4RKJNMFkTKD8/1DlbTg7hkRQgpfKln2JNwbcwvnRa7C3bFrrU0IYJbIdqkArDQhitwPOLEcwjWyqTASxK2KHGRVgnM4Cj3hPDArZ2VVGTY621ZVgNMt9kKayXbrRWLT+TJgA== 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=tB2fPxCWRJJ8vhS0IqUK7DZLh5lfGFCgtg6dwJisGQI=; b=S71kifrls0afYO8tdHcUk4x0MpgBvasSf7mHwEDlNiCr59YI1DWp6BjFp3QlVpTb1PGk+tja6oe1hvhNDgnmuv+wUyczhduV0lih4YWN32qU+z4EzKVSI65wqiJV6SBryMFNSgum2fVkH/UWkQtPrllSS94LspzoXnHQBi5gE6kD3nI0vUk9EAuTInNHDUiwHNNYrzVMLFlI031P68iy1HZvAvlMJr83NEAgf07WeLy0f4AKxJmRSxUD1M2Ns4haWyCWAAoCmq2CoZC+mfmxXRfGR8E3B7YKCs/48Vd0XoSbeVC/MvMvZ3sO3MK12qB6p0Rk15ynOKjWB53bmR35Bw== 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=tB2fPxCWRJJ8vhS0IqUK7DZLh5lfGFCgtg6dwJisGQI=; b=rPzqoNDcwOgcLgLJK8N/BZT6CofM9U5AIyini+6b6ulVKpCh403qZzx1qQuUkCkv2sTQWf2hR3k7pdD7fPHLNohjOVCsRXi60PEDJXJb+kjhtmhEKcC2vHrCST9Aood7GDehqtS4rHeyjt5R8PO+nhktVh99gFSGiXHKpUJF0EU= Received: from VI1PR04MB3168.eurprd04.prod.outlook.com (2603:10a6:802:6::10) by VE1PR04MB6605.eurprd04.prod.outlook.com (2603:10a6:803:124::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.12; Thu, 21 Jan 2021 18:33:30 +0000 Received: from VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::a0c4:dab6:4fb5:5a8f]) by VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::a0c4:dab6:4fb5:5a8f%5]) with mapi id 15.20.3784.011; Thu, 21 Jan 2021 18:33:29 +0000 From: Akhil Goyal To: Matan Azrad , Declan Doherty CC: "dev@dpdk.org" Thread-Topic: Crypto API for AES-XTS cipher algorithm Thread-Index: AdbtqHaaE85Is7DmS3eiILho6BOhVwABS8mQAJrDvdAAAsExcA== Date: Thu, 21 Jan 2021 18:33:29 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [117.99.187.59] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 782e6d7b-1525-47dc-a34b-08d8be3b0cbd x-ms-traffictypediagnostic: VE1PR04MB6605: 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: eDNEpTEuNCqHqgDyJYloLc7QGAGZ5lNlmBUKNgFfPbCAZpelcJ6+6mhrs1V+jBmPJyuS+dCvtBpuPaMs18Bgb9ZX38AEW7AIZa7HgdxFTnWa91LCA4P9JBaxS4b0RF12ruYdkoRoQvTVKe7CNePFOaDvpjPh+Lv3rq+qSYjDdeUjYkmhyANbgYMASsEBAT0fHFhEos3rc+G8/fVEl1CnvZSHzLg0ioNmOxxdVCrsmn4d+e0bfce44o5gWbbL8QHCG/1NESVXt85FwbmRaDzpoQXOSQSvly4IChf8ClIgg1Jf8jjJr2AW8tzvVJzauST76lleyTRt6hXQ10cdqDWVXcdMnpvJk7q6PsufAiHiOqvRJ+gv1KuvtJlyTlmzA8BzHgitkm0tubVdYO2dA/BnbQ== 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; SFS:(4636009)(396003)(366004)(346002)(39840400004)(376002)(136003)(66476007)(110136005)(66946007)(9326002)(478600001)(4326008)(9686003)(8676002)(83380400001)(44832011)(6506007)(64756008)(33656002)(76116006)(8936002)(55016002)(66556008)(316002)(86362001)(186003)(5660300002)(52536014)(53546011)(2906002)(26005)(66446008)(71200400001)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?xZgNOpp4kHRIsziY8ugKuCaenSEe+LWPEbcQrLKgfqtzC6QlRBP/68EGPx50?= =?us-ascii?Q?QQVpeIxnZSx1s4frv0Sdi0aPyzzZLRjgFpK+O2A/aE14yAkw+WMHelslgX6Y?= =?us-ascii?Q?AuRjZwgBs5M9YrRKqoQJGuuy3Hi1NlEI069aeHOrVPbCUdPma4LQI4lS5w1x?= =?us-ascii?Q?6NIcZDdadoJ96Dc0ByOnQczXkWjr/a4hVuTzDVaoaAcKLHEShgUumFpkb1eG?= =?us-ascii?Q?8tdvs9eqXasypescPWYCePHqih/gGHaDsg/4qazNfe4XKCrwpLXFFftErlRj?= =?us-ascii?Q?iJcDeVAeoZM0CaPn4zzWoRzIuSUu+OLGO6HfxiERHyjL0i6KZROSMAI8xVn3?= =?us-ascii?Q?RxF8P1UloidoK6o6KoBlq5JXSYniSvgh5I50HGrgv6RO8QVjN40L3++1mcdD?= =?us-ascii?Q?/nEOOkKcXvNkoEQm8NWUwExJsFebWh36ebxCbC0RKY3AwzAu6gDqb6C9frVq?= =?us-ascii?Q?1KfE6XKUnUdpPFv7KpYCOOST016g+8Bu66MIIGlBAO79zXnXLkvi1sVHMbKr?= =?us-ascii?Q?Z+x8XqzyOj4jGaEmr8E2wQnJI8ji6x8MOBS/0lyGK5wbwjC23B3nrm+2yMBj?= =?us-ascii?Q?08Qi30n7MKeHgMBXTrg6y9gcgKstlwjukeCALfSca+tryvX3V/Zl6wL9DFYm?= =?us-ascii?Q?O1Y/rQGX9FndOHenqkuI+KxFzRwoaEmNhU9TQkHdltMx2qlvi713YlMDWNIV?= =?us-ascii?Q?rRQiIHmjGBgS+I+cQgcmt4SCMrj25NW/p1tjpo/KBs6TUfGlALgPOGClFcQP?= =?us-ascii?Q?8vEM8n5UUEJwNm1kB3obzUlsBdzPUUIKGDO+FBnWbqAmNZK6TtIsi7OPicT6?= =?us-ascii?Q?Ikvk8TRIul6q6Q0lAqpcQzqZ6QBcrGkw1mFMXejcjmJBSQw7hYlsn1VcFb6p?= =?us-ascii?Q?DaO/PHp87kYeEbuqQmXSNDrryvn0HHI8dSRBwVsV5+VMQbAmkJhdxdtI2BII?= =?us-ascii?Q?jAmexOmlF3b/9Q4k1d7pVUcB+CCuvJfiOQPOjIGBAHE=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB3168.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 782e6d7b-1525-47dc-a34b-08d8be3b0cbd X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2021 18:33:29.7338 (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: 7p1NdQMCkoni/hmTlSYEYbfNOKBc39Mp4hV5oiIWn71gkfXU2jy597vKhV0NsuqrITLWz3wabmlGLuOFbruzbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6605 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 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 Doherty 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