* [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
@ 2020-01-13 10:43 Arek Kusztal
2020-01-14 12:49 ` Trahe, Fiona
2020-01-14 13:18 ` Anoob Joseph
0 siblings, 2 replies; 9+ messages in thread
From: Arek Kusztal @ 2020-01-13 10:43 UTC (permalink / raw)
To: dev; +Cc: akhil.goyal, fiona.trahe, Arek Kusztal
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>
---
v2:
- moved release notes to 20.02
v3:
- added algorithm strings
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(-)
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 =
; 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.
;
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.
=========================================================
+* **Added Chacha20-Poly1305 algorithm to Cryptodev API.**
+
+ Chacha20-Poly1305 AEAD algorithm can now be supported in Cryptodev.
+
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
};
@@ -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 */
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[] = {
[RTE_CRYPTO_AEAD_AES_CCM] = "aes-ccm",
[RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm",
+ [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305"
};
/**
--
2.1.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
2020-01-13 10:43 [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm Arek Kusztal
@ 2020-01-14 12:49 ` Trahe, Fiona
2020-01-14 12:52 ` Trahe, Fiona
2020-01-14 13:18 ` Anoob Joseph
1 sibling, 1 reply; 9+ messages in thread
From: Trahe, Fiona @ 2020-01-14 12:49 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, dev; +Cc: akhil.goyal
Hi Arek,
There's a bunch of checkpatch warnings about line length that can be easily fixed.
Can you send a v4 please.
Fiona
> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Monday, January 13, 2020 10:44 AM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v3] 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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
2020-01-14 12:49 ` Trahe, Fiona
@ 2020-01-14 12:52 ` Trahe, Fiona
0 siblings, 0 replies; 9+ messages in thread
From: Trahe, Fiona @ 2020-01-14 12:52 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, dev; +Cc: akhil.goyal
Hi Arek,
Sorry, my bad.
That comment was not for this patch - it was intended for the QAT patch.
This patch has no checkpatch warnings.
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Tuesday, January 14, 2020 12:50 PM
> To: Kusztal, ArkadiuszX <ArkadiuszX.Kusztal@intel.com>; dev@dpdk.org
> Cc: akhil.goyal@nxp.com
> Subject: RE: [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
>
> Hi Arek,
>
> There's a bunch of checkpatch warnings about line length that can be easily fixed.
> Can you send a v4 please.
>
> Fiona
>
> > -----Original Message-----
> > From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> > Sent: Monday, January 13, 2020 10:44 AM
> > To: dev@dpdk.org
> > Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Kusztal, ArkadiuszX
> > <arkadiuszx.kusztal@intel.com>
> > Subject: [PATCH v3] 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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
2020-01-13 10:43 [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm Arek Kusztal
2020-01-14 12:49 ` Trahe, Fiona
@ 2020-01-14 13:18 ` Anoob Joseph
2020-01-15 15:53 ` Akhil Goyal
1 sibling, 1 reply; 9+ messages in thread
From: Anoob Joseph @ 2020-01-14 13:18 UTC (permalink / raw)
To: Arek Kusztal, dev
Cc: akhil.goyal, fiona.trahe, Narayana Prasad Raju Athreya,
Tejasree Kondoj, Jerin Jacob Kollanukkaran
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> 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
> <arkadiuszx.kusztal@intel.com>
> Subject: [dpdk-dev] [PATCH v3] 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>
Acked-by: Anoob Joseph <anoobj@marvell.com>
> ---
> v2:
> - moved release notes to 20.02
> v3:
> - added algorithm strings
>
> 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(-)
>
> 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 =
> ; 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.
> ;
> 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.
> =========================================================
>
> +* **Added Chacha20-Poly1305 algorithm to Cryptodev API.**
> +
> + Chacha20-Poly1305 AEAD algorithm can now be supported in Cryptodev.
> +
>
> 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
> };
>
> @@ -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 */
>
> 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[] = {
> [RTE_CRYPTO_AEAD_AES_CCM] = "aes-ccm",
> [RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm",
> + [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305"
> };
>
> /**
> --
> 2.1.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
2020-01-14 13:18 ` Anoob Joseph
@ 2020-01-15 15:53 ` Akhil Goyal
2020-02-05 14:28 ` Thomas Monjalon
0 siblings, 1 reply; 9+ messages in thread
From: Akhil Goyal @ 2020-01-15 15:53 UTC (permalink / raw)
To: Anoob Joseph, Arek Kusztal, dev
Cc: fiona.trahe, Narayana Prasad Raju Athreya, Tejasree Kondoj,
Jerin Jacob Kollanukkaran
> >
> > 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>
>
> Acked-by: Anoob Joseph <anoobj@marvell.com>
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
2020-01-15 15:53 ` Akhil Goyal
@ 2020-02-05 14:28 ` Thomas Monjalon
2020-02-05 14:41 ` Trahe, Fiona
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2020-02-05 14:28 UTC (permalink / raw)
To: Anoob Joseph, Arek Kusztal, fiona.trahe, Akhil Goyal
Cc: dev, Narayana Prasad Raju Athreya, Tejasree Kondoj,
Jerin Jacob Kollanukkaran, bluca, ktraynor, david.marchand,
nhorman, ray.kinsella, ferruh.yigit, bruce.richardson
15/01/2020 16:53, Akhil Goyal:
> > > 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>
> >
> > Acked-by: Anoob Joseph <anoobj@marvell.com>
> >
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
>
> Applied to dpdk-next-crypto
As discussed in other email threads,
this patch was causing an ABI breakage and had to be reverted:
http://git.dpdk.org/dpdk/commit/?id=f5862ae99
Sorry, this feature will miss 20.02 release I'm afraid.
2 actions should be taken:
- try to re-intoduce the feature with function versioning
- improve ABI stability in DPDK 20.11 for future features
We are all (hardly) learning how to maintain ABI compatibility,
as this is our first real issue since the new ABI policy.
Thanks for understanding.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
2020-02-05 14:28 ` Thomas Monjalon
@ 2020-02-05 14:41 ` Trahe, Fiona
2020-02-05 15:21 ` Thomas Monjalon
0 siblings, 1 reply; 9+ messages in thread
From: Trahe, Fiona @ 2020-02-05 14:41 UTC (permalink / raw)
To: Thomas Monjalon, Anoob Joseph, Kusztal, ArkadiuszX, Akhil Goyal
Cc: dev, Narayana Prasad Raju Athreya, Tejasree Kondoj,
Jerin Jacob Kollanukkaran, bluca, ktraynor, david.marchand,
nhorman, Kinsella, Ray, Yigit, Ferruh, Richardson, Bruce, Trahe,
Fiona
Hi Thomas,
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, February 5, 2020 2:29 PM
> To: Anoob Joseph <anoobj@marvell.com>; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Trahe,
> Fiona <fiona.trahe@intel.com>; Akhil Goyal <akhil.goyal@nxp.com>
> Cc: dev@dpdk.org; Narayana Prasad Raju Athreya <pathreya@marvell.com>; Tejasree Kondoj
> <ktejasree@marvell.com>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; bluca@debian.org;
> ktraynor@redhat.com; david.marchand@redhat.com; nhorman@tuxdriver.com; Kinsella, Ray
> <ray.kinsella@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
>
> 15/01/2020 16:53, Akhil Goyal:
> > > > 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>
> > >
> > > Acked-by: Anoob Joseph <anoobj@marvell.com>
> > >
> > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> >
> > Applied to dpdk-next-crypto
>
> As discussed in other email threads,
> this patch was causing an ABI breakage and had to be reverted:
> http://git.dpdk.org/dpdk/commit/?id=f5862ae99
> Sorry, this feature will miss 20.02 release I'm afraid.
>
> 2 actions should be taken:
> - try to re-intoduce the feature with function versioning
> - improve ABI stability in DPDK 20.11 for future features
[Fiona] Agreed, it's underway.
The QAT ChaChaPoly patchset including the unit tests will also need to be reverted.
https://patches.dpdk.org/patch/64729/
https://patches.dpdk.org/patch/64730/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
2020-02-05 14:41 ` Trahe, Fiona
@ 2020-02-05 15:21 ` Thomas Monjalon
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2020-02-05 15:21 UTC (permalink / raw)
To: Trahe, Fiona
Cc: Anoob Joseph, Kusztal, ArkadiuszX, Akhil Goyal, dev,
Narayana Prasad Raju Athreya, Tejasree Kondoj,
Jerin Jacob Kollanukkaran, bluca, ktraynor, david.marchand,
nhorman, Kinsella, Ray, Yigit, Ferruh, Richardson, Bruce
05/02/2020 15:41, Trahe, Fiona:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 15/01/2020 16:53, Akhil Goyal:
> > > > > 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>
> > > >
> > > > Acked-by: Anoob Joseph <anoobj@marvell.com>
> > > >
> > > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> > >
> > > Applied to dpdk-next-crypto
> >
> > As discussed in other email threads,
> > this patch was causing an ABI breakage and had to be reverted:
> > http://git.dpdk.org/dpdk/commit/?id=f5862ae99
> > Sorry, this feature will miss 20.02 release I'm afraid.
> >
> > 2 actions should be taken:
> > - try to re-intoduce the feature with function versioning
> > - improve ABI stability in DPDK 20.11 for future features
>
> [Fiona] Agreed, it's underway.
Any estimation of time?
I expect a lot of discussions on the solution,
especially because it is a primer.
> The QAT ChaChaPoly patchset including the unit tests will also need to be reverted.
> https://patches.dpdk.org/patch/64729/
> https://patches.dpdk.org/patch/64730/
Yes, this is what I did in one commit.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm
@ 2020-04-17 15:43 Arek Kusztal
0 siblings, 0 replies; 9+ messages in thread
From: Arek Kusztal @ 2020-04-17 15:43 UTC (permalink / raw)
To: dev; +Cc: akhil.goyal, fiona.trahe, Arek Kusztal
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>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/cryptodevs/features/default.ini | 13 +++++++------
doc/guides/rel_notes/release_20_05.rst | 4 ++++
lib/librte_cryptodev/rte_crypto_sym.h | 9 +++++++++
lib/librte_cryptodev/rte_cryptodev.c | 1 +
4 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index db427af..a14ee87 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -94,12 +94,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.
;
diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
index 1849678..afc943b 100644
--- a/doc/guides/rel_notes/release_20_05.rst
+++ b/doc/guides/rel_notes/release_20_05.rst
@@ -81,6 +81,10 @@ New Features
by making use of the event device capabilities. The event mode currently supports
only inline IPsec protocol offload.
+* **Added Chacha20-Poly1305 algorithm to Cryptodev API.**
+
+ Chacha20-Poly1305 AEAD algorithm can now be supported in Cryptodev.
+
Removed Items
-------------
diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index 9e887c1..d9585ec 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -409,6 +409,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
};
@@ -452,6 +454,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.
*/
@@ -468,6 +475,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 */
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 65d61a3..262f26d 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[] = {
[RTE_CRYPTO_AEAD_AES_CCM] = "aes-ccm",
[RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm",
+ [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305"
};
/**
--
2.1.0
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-04-17 15:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-13 10:43 [dpdk-dev] [PATCH v3] cryptodev: add chacha20-poly1305 aead algorithm Arek Kusztal
2020-01-14 12:49 ` Trahe, Fiona
2020-01-14 12:52 ` Trahe, Fiona
2020-01-14 13:18 ` Anoob Joseph
2020-01-15 15:53 ` Akhil Goyal
2020-02-05 14:28 ` Thomas Monjalon
2020-02-05 14:41 ` Trahe, Fiona
2020-02-05 15:21 ` Thomas Monjalon
2020-04-17 15:43 Arek Kusztal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).