[2/4] cryptodev: add SM3 hash algorithm
Checks
Commit Message
SM3 is a cryptographic hash function used in
the Chinese National Standard.
- Added SM3 algorithm
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
doc/guides/cryptodevs/features/default.ini | 1 +
doc/guides/rel_notes/release_22_11.rst | 5 +++++
lib/cryptodev/rte_crypto_sym.h | 4 +++-
lib/cryptodev/rte_cryptodev.c | 3 ++-
4 files changed, 11 insertions(+), 2 deletions(-)
Comments
Hi Arek,
Please see inline.
Thanks,
Anoob
>
> External Email
>
> ----------------------------------------------------------------------
> SM3 is a cryptographic hash function used in the Chinese National Standard.
>
> - Added SM3 algorithm
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
[snip]
> a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index
> 266804f0fe..2b6c7de930 100644
> --- a/lib/cryptodev/rte_cryptodev.c
> +++ b/lib/cryptodev/rte_cryptodev.c
> @@ -135,7 +135,8 @@ rte_crypto_auth_algorithm_strings[] = {
>
> [RTE_CRYPTO_AUTH_KASUMI_F9] = "kasumi-f9",
> [RTE_CRYPTO_AUTH_SNOW3G_UIA2] = "snow3g-uia2",
> - [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3"
> + [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3",
> + [RTE_CRYPTO_AUTH_SM3] = "zuc-sm3"
[Anoob] Should the string be "sm3" instead of "zuc-sm3"?
@@ -98,6 +98,7 @@ SHA3_384 =
SHA3_384 HMAC =
SHA3_512 =
SHA3_512 HMAC =
+SM3 =
;
; Supported AEAD algorithms of a default crypto driver.
@@ -60,6 +60,11 @@ New Features
Added SM4 encryption algorithm to the Cryptodev API.
Supported modes are ECB, CBC and CTR.
+* **Added SM3 hash algorithm.**
+
+ Added SM3 hash algorithm to the Cryptodev API.
+
+
Removed Items
-------------
@@ -370,8 +370,10 @@ enum rte_crypto_auth_algorithm {
/**< HMAC using 384 bit SHA3 algorithm. */
RTE_CRYPTO_AUTH_SHA3_512,
/**< 512 bit SHA3 algorithm. */
- RTE_CRYPTO_AUTH_SHA3_512_HMAC
+ RTE_CRYPTO_AUTH_SHA3_512_HMAC,
/**< HMAC using 512 bit SHA3 algorithm. */
+ RTE_CRYPTO_AUTH_SM3
+ /**< SM3 algorithm */
};
/** Authentication algorithm name strings */
@@ -135,7 +135,8 @@ rte_crypto_auth_algorithm_strings[] = {
[RTE_CRYPTO_AUTH_KASUMI_F9] = "kasumi-f9",
[RTE_CRYPTO_AUTH_SNOW3G_UIA2] = "snow3g-uia2",
- [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3"
+ [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3",
+ [RTE_CRYPTO_AUTH_SM3] = "zuc-sm3"
};
/**