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>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This commit is contained in:
Arek Kusztal 2020-05-07 12:57:02 +02:00 committed by Akhil Goyal
parent e62893f5ec
commit b922dbd38c
4 changed files with 21 additions and 6 deletions

View File

@ -96,12 +96,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.
;

View File

@ -145,6 +145,10 @@ New Features
* Optimized the memory consumption of flow.
* Added support for flow aging based on hardware counter.
* **Added Chacha20-Poly1305 algorithm to Cryptodev API.**
Chacha20-Poly1305 AEAD algorithm can now be supported in Cryptodev.
* **Updated the AESNI MB crypto PMD.**
* Added support for intel-ipsec-mb version 0.54.

View File

@ -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 */

View File

@ -152,6 +152,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"
};
/**