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 08C07A04FF; Tue, 14 Jan 2020 14:18:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8F6081C0BF; Tue, 14 Jan 2020 14:18:27 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 2738C1C08C for ; Tue, 14 Jan 2020 14:18:25 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00EDGcHb019416; Tue, 14 Jan 2020 05:18:24 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=6Fm4yunegqa047m2Qdp/zwX6mTI1XWcfVNqdUnBhuj4=; b=WAe0EmQCubt1evuTaq6biXNn44dUSfy627EnXPEVwKBEEtcJ/ZSl3pGFMI7unOP9xWtq pxl1Fb292IRJWNyHk4PCRrLvhajut7LRANDiH4NnX3e2MaWU5HmGRPetHBDon3ipcj1p UBnFnx5eNaU8jcn+bBLQxXPPxBuezIk27v27l7ofFa7IWAypiSsV0Wx7Ilte/VMS3Z8T GyrGQP/BjXL7DR7FJswghyhphKqkTuvShX6WSjl0SJDOSVAqw+DCYyZPgzOJE0BZC1do BOQuTPy+O4VlCyTTdMSFLqLbuqFG04LjILldywuVqC1Necyi5xCYxo/GoKKs6yBWoe46 EQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2xhc6sgcwt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 14 Jan 2020 05:18:24 -0800 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 14 Jan 2020 05:18:22 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.107) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 14 Jan 2020 05:18:22 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gJNncAjj7M1G7dS0nveldLDFExecOhUzvg5gvnhKgf2ajpZEp/6mwTOK+5J4Eg4Y4b/gyqRw8aP1Y3juDI0EGZbylH/J65teeqE2ceUPsJdxTlEztzO98tFeddQDrjRTlIfevfvqfDoTqZGEFVQUxdBz/hGbjq7MKHxoPPqaLX173X7OgHt6owl8mu63wQpCftSgqE5pNClTgKSbaWjdiCHLoBwlJX8Pd8oQfLJDWK4v9p2KHpR7HJrBG8ACbUT/ZYdNDyds1WXNZ1wXtOR/lkmx+jymZznHoPx2pXB4s4OsBUHrwuLREkSQbS0G1AZD9J2EFz4sqhOpO2iAoR8ptg== 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=6Fm4yunegqa047m2Qdp/zwX6mTI1XWcfVNqdUnBhuj4=; b=nierDZOgsk5Nl0K5NPQTKw9x3UayJVOo/dYQvPRDP66G1+UwxO3fIVoAtDPzLkSqqpjNnrs9zGNRBh72qXycH9CY615XBL0VK2UbGMNQ+42EYzfErfasYiiaLouNJsj0dvsxBU+s5VqT71p3n05COOtUFrKa59wjD9JfCk5C2Ll+b09ITzEhthCX/8DxdIQk7vJDhsEJCOeLibnIVtWJUryPaUFy3PuO2ye5VWSC0NLmnTPw9FDplCgkfWf4Lh0LnfZ6nIzGEcrPXWNwp2A9sDD/t3QM2gc10MF5jlb01QLL3zsrTzuncp6x8i+iG6ZaQfxaa/r5fSI/FG/6Oc6/Zw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6Fm4yunegqa047m2Qdp/zwX6mTI1XWcfVNqdUnBhuj4=; b=Aoe4j1ACPVrFfRpzhXh2SxuoW6ELnKWhDTplZcvV84KhxYf3is4I7Xgci/kDUXofnNtco2y18eh8P9+ZvffAMkzhZ/H/uoTklCq77ZzJoa3P3P6WNxHLAbIX29O1Sx0JrnZUfi9T5jmVXjkDNq9ez5X6w9oQ8+lgwSR9ND9Mp18= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (20.179.20.218) by MN2PR18MB3392.namprd18.prod.outlook.com (10.255.239.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18; Tue, 14 Jan 2020 13:18:21 +0000 Received: from MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::5db5:d179:8a01:4636]) by MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::5db5:d179:8a01:4636%7]) with mapi id 15.20.2623.017; Tue, 14 Jan 2020 13:18:21 +0000 From: Anoob Joseph To: Arek Kusztal , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "fiona.trahe@intel.com" , Narayana Prasad Raju Athreya , Tejasree Kondoj , Jerin Jacob Kollanukkaran Thread-Topic: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm Thread-Index: AQHVyf59LlmOr9jIc0+5OyxCHLGJ6KfqJccA Date: Tue, 14 Jan 2020 13:18:21 +0000 Message-ID: References: <20200113104347.7308-1-arkadiuszx.kusztal@intel.com> In-Reply-To: <20200113104347.7308-1-arkadiuszx.kusztal@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [111.125.206.208] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 26b472f6-fc47-4e05-41d1-08d798f43a6c x-ms-traffictypediagnostic: MN2PR18MB3392: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 028256169F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(346002)(376002)(366004)(39860400002)(189003)(199004)(478600001)(33656002)(5660300002)(52536014)(4326008)(71200400001)(53546011)(81156014)(81166006)(107886003)(8936002)(186003)(55236004)(7696005)(66476007)(66556008)(26005)(9686003)(66946007)(64756008)(66446008)(76116006)(55016002)(86362001)(110136005)(316002)(54906003)(6506007)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3392; H:MN2PR18MB2877.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8pvXLmVCj8vVmuz14SK6Upu/SqfHFJpxZXJJOxqnqzLnMFuiwNDTY+LXmYkVeUyn2RGeT0GQgt8yKD+YrfMilAaAd8G3vh8xWEZGN9B2KRhrYVI0riG2eAKbmVR8Ano/oJvXo6xV0Z1JjkOAFMFI2KnqWNdJbzyOvMl63Lb+BU1MJaXXzmAUZ9Xe6acaqeTQc1826Sn8VWIunIkTCOy+AqczpqSI1j51gMn6Azw2qRGiZdBf8+9uPxSvKfS6dp3a4G5bI0OKf+o1Vk0h0B+VgJjown/bZDyLOnP/mD2oiv53yNdb9ISU36pAxrDuKqFaZn/N6WF8UmeZUZzs850EvBaHaUIJEsW5PC7vBd1JP5hbmUjCOMGPBtroCk5/6JAGs8LrXpzCHfhgnp0I486NCHMQzpQqIg+6XXH+2vEEFancRuPpmii+S1gPG0RpjUDu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 26b472f6-fc47-4e05-41d1-08d798f43a6c X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2020 13:18:21.4800 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GiqVlnQm5RpEFY7nBRMRX6cZQfZXQa+fjQvI81Y4sYR2tfWIRchAU4nLbwMXWLD6aP976Bzi+I7Tgq5K8pqiWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3392 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-01-14_03:2020-01-13, 2020-01-14 signatures=0 Subject: Re: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm 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" > -----Original Message----- > From: dev On Behalf Of Arek Kusztal > Sent: Monday, January 13, 2020 4:14 PM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Arek Kusztal > > Subject: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead > algorithm >=20 > This patch adds Chacha20-Poly1305 AEAD algorithm to Cryptodev. >=20 > Signed-off-by: Arek Kusztal > Acked-by: Fiona Trahe Acked-by: Anoob Joseph > --- > v2: > - moved release notes to 20.02 > v3: > - added algorithm strings >=20 > doc/guides/cryptodevs/features/default.ini | 13 +++++++------ > doc/guides/rel_notes/release_20_02.rst | 4 ++++ > lib/librte_cryptodev/rte_crypto_sym.h | 9 +++++++++ > lib/librte_cryptodev/rte_cryptodev.c | 1 + > 4 files changed, 21 insertions(+), 6 deletions(-) >=20 > diff --git a/doc/guides/cryptodevs/features/default.ini > b/doc/guides/cryptodevs/features/default.ini > index b7f9a0a..2a3ff48 100644 > --- a/doc/guides/cryptodevs/features/default.ini > +++ b/doc/guides/cryptodevs/features/default.ini > @@ -93,12 +93,13 @@ SHA3_512 HMAC =3D > ; Supported AEAD algorithms of a default crypto driver. > ; > [AEAD] > -AES GCM (128) =3D > -AES GCM (192) =3D > -AES GCM (256) =3D > -AES CCM (128) =3D > -AES CCM (192) =3D > -AES CCM (256) =3D > +AES GCM (128) =3D > +AES GCM (192) =3D > +AES GCM (256) =3D > +AES CCM (128) =3D > +AES CCM (192) =3D > +AES CCM (256) =3D > +CHACHA20-POLY1305 =3D > ; > ; Supported Asymmetric algorithms of a default crypto driver. > ; > diff --git a/doc/guides/rel_notes/release_20_02.rst > b/doc/guides/rel_notes/release_20_02.rst > index 0eaa45a..6b60f47 100644 > --- a/doc/guides/rel_notes/release_20_02.rst > +++ b/doc/guides/rel_notes/release_20_02.rst > @@ -56,6 +56,10 @@ New Features > Also, make sure to start the actual text at the margin. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > +* **Added Chacha20-Poly1305 algorithm to Cryptodev API.** > + > + Chacha20-Poly1305 AEAD algorithm can now be supported in Cryptodev. > + >=20 > Removed Items > ------------- > diff --git a/lib/librte_cryptodev/rte_crypto_sym.h > b/lib/librte_cryptodev/rte_crypto_sym.h > index ffa038d..bc356f6 100644 > --- a/lib/librte_cryptodev/rte_crypto_sym.h > +++ b/lib/librte_cryptodev/rte_crypto_sym.h > @@ -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 cipher with poly1305 authenticator */ > RTE_CRYPTO_AEAD_LIST_END > }; >=20 > @@ -391,6 +393,11 @@ struct rte_crypto_aead_xform { > * be allocated, even though the length field will > * have a value less than this. > * > + * - For Chacha20-Poly1305 it is 96-bit nonce. > + * PMD sets initial counter for Poly1305 key generation > + * part to 0 and for Chacha20 encryption to 1 as per > + * rfc8439 2.8. AEAD construction. > + * > * For optimum performance, the data pointed to SHOULD > * be 8-byte aligned. > */ > @@ -407,6 +414,8 @@ struct rte_crypto_aead_xform { > * > * - For CCM mode, this is the length of the nonce, > * which can be in the range 7 to 13 inclusive. > + * > + * - For Chacha20-Poly1305 this field is always 12. > */ > } iv; /**< Initialisation vector parameters */ >=20 > diff --git a/lib/librte_cryptodev/rte_cryptodev.c > b/lib/librte_cryptodev/rte_cryptodev.c > index 89aa2ed..410520f 100644 > --- a/lib/librte_cryptodev/rte_cryptodev.c > +++ b/lib/librte_cryptodev/rte_cryptodev.c > @@ -151,6 +151,7 @@ const char * > rte_crypto_aead_algorithm_strings[] =3D { > [RTE_CRYPTO_AEAD_AES_CCM] =3D "aes-ccm", > [RTE_CRYPTO_AEAD_AES_GCM] =3D "aes-gcm", > + [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] =3D "chacha20-poly1305" > }; >=20 > /** > -- > 2.1.0