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 9A6E9A3160 for ; Wed, 9 Oct 2019 10:29:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E4811C20B; Wed, 9 Oct 2019 10:29:39 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 3E32B1C1DA for ; Wed, 9 Oct 2019 10:29:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 01:29:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,273,1566889200"; d="scan'208,217";a="206830952" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 09 Oct 2019 01:29:37 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 9 Oct 2019 01:29:36 -0700 Received: from lcsmsx153.ger.corp.intel.com (10.186.165.228) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 9 Oct 2019 01:29:36 -0700 Received: from HASMSX109.ger.corp.intel.com ([169.254.3.38]) by LCSMSX153.ger.corp.intel.com ([169.254.8.223]) with mapi id 14.03.0439.000; Wed, 9 Oct 2019 11:29:34 +0300 From: "Kusztal, ArkadiuszX" To: "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Zhang, Roy Fan" , Shally Verma , "Trahe, Fiona" , Anoob Joseph , "De Lara Guarch, Pablo" , "Doherty, Declan" , "tdu@semihalf.com" Thread-Topic: [RFC] Chacha20 Poly1305 Support Thread-Index: AdV+edRLvl/CZXEDQ/uoyGQBqnN5NQ== Date: Wed, 9 Oct 2019 08:29:33 +0000 Message-ID: <06EE24DD0B19E248B53F6DC8657831551B29FD13@hasmsx109.ger.corp.intel.com> Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.184.70.10] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] [RFC] Chacha20 Poly1305 Support 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, due to increasing interest of crypto protocols in Chacha20-Poly1305 algorit= hm I would like to start discussion about adding it to cryptodev. I would suggest adding something like: @@ -348,6 +348,8 @@ enum rte_crypto_aead_algorithm { /**< AES algorithm in CCM mode. */ RTE_CRYPTO_AEAD_AES_GCM, /**< AES algorithm in GCM mode. */ + RTE_CRYPTO_AEAD_CHACHA20_POLY1305, + /**< Chacha20 encryption cipher with poly1305 authenticator */ In 'iv offset' of aead xform + * - For Chacha20-Poly1305 it is 96-bit nonce. I= nitial counter + * value for Chacha20 encryption is set by PMD t= o 1, meanwhile + * for Poly1305 is set to 0 as per rfc7539 2.8.= AEAD construction. In 'iv length' of aead xform + * - For Chacha20-Poly1305 this field is always = 12. It is AEAD instead of cipher + auth as rfc7539 explicitly specifies initial= counters to one and zero with AEAD construction, which is not done for Chacha and Poly separately. If in future someone would like to add thes= e algorithms to cipher and auth enums additional field that holds initial c= ounter should be added as well. I have tested it with openssl pmd implementation I have created for test pu= rposes (Chacha Poly is supported since OpenSSL 1.1.0 version) which I may a= ttach if needed. (Sorry if I have not included someone in cc, please cc any interested perso= n) Regards, Arek