[v2] cryptodev: add chacha20-poly1305 aead algorithm
Checks
Commit Message
This patch adds Chacha20-Poly1305 AEAD algorithm to Cryptodev.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
v2:
- moved release notes to 20.02
doc/guides/cryptodevs/features/default.ini | 13 +++++++------
doc/guides/rel_notes/release_20_02.rst | 4 ++++
lib/librte_cryptodev/rte_crypto_sym.h | 9 +++++++++
3 files changed, 20 insertions(+), 6 deletions(-)
Comments
> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Friday, December 6, 2019 6:02 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v2] cryptodev: add chacha20-poly1305 aead algorithm
>
> This patch adds Chacha20-Poly1305 AEAD algorithm to Cryptodev.
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
> -----Original Message-----
> From: Trahe, Fiona <fiona.trahe@intel.com>
> Sent: Friday, December 6, 2019 7:17 PM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>
> Subject: RE: [PATCH v2] cryptodev: add chacha20-poly1305 aead algorithm
>
>
>
> > -----Original Message-----
> > From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> > Sent: Friday, December 6, 2019 6:02 PM
> > To: dev@dpdk.org
> > Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>;
> > Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> > Subject: [PATCH v2] cryptodev: add chacha20-poly1305 aead algorithm
> >
> > This patch adds Chacha20-Poly1305 AEAD algorithm to Cryptodev.
> >
> > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Self NACK
Need to add algorithm strings to cryptodev.c
@@ -93,12 +93,13 @@ SHA3_512 HMAC =
; Supported AEAD algorithms of a default crypto driver.
;
[AEAD]
-AES GCM (128) =
-AES GCM (192) =
-AES GCM (256) =
-AES CCM (128) =
-AES CCM (192) =
-AES CCM (256) =
+AES GCM (128) =
+AES GCM (192) =
+AES GCM (256) =
+AES CCM (128) =
+AES CCM (192) =
+AES CCM (256) =
+CHACHA20-POLY1305 =
;
; Supported Asymmetric algorithms of a default crypto driver.
;
@@ -56,6 +56,10 @@ New Features
Also, make sure to start the actual text at the margin.
=========================================================
+* **Added Chacha20-Poly1305 algorithm to Cryptodev API.**
+
+ Chacha20-Poly1305 AEAD algorithm can now be supported in Cryptodev.
+
Removed Items
-------------
@@ -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
};
@@ -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 */