From: Radu Nicolau <radu.nicolau@intel.com>
To: dev@dpdk.org
Cc: nkaithakadan@marvell.com, kai.ji@intel.com, anoobj@marvell.com,
stephen@networkplumber.org, Radu Nicolau <radu.nicolau@intel.com>,
Akhil Goyal <gakhil@marvell.com>,
Fan Zhang <fanzhang.oss@gmail.com>
Subject: [PATCH v4 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms
Date: Wed, 21 Jan 2026 15:15:39 +0000 [thread overview]
Message-ID: <20260121151703.2501018-1-radu.nicolau@intel.com> (raw)
In-Reply-To: <20260107105649.1708347-1-radu.nicolau@intel.com>
Add support for
NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes
NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes
NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
v4: fix wrong algorithm names in comments
doc/guides/cryptodevs/features/default.ini | 9 ++++
lib/cryptodev/rte_crypto_sym.h | 52 ++++++++++++++++++----
lib/cryptodev/rte_cryptodev.c | 13 +++++-
3 files changed, 64 insertions(+), 10 deletions(-)
diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 64198f013a..d8026c3750 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -68,6 +68,9 @@ SM4 CTR =
SM4 CFB =
SM4 OFB =
SM4 XTS =
+SNOW5G NEA4 =
+AES NEA5 =
+ZUC-256 NEA6 =
;
; Supported authentication algorithms of a default crypto driver.
@@ -106,6 +109,9 @@ SM3 =
SM3 HMAC =
SHAKE_128 =
SHAKE_256 =
+SNOW5G NIA4 =
+AES NIA5 =
+ZUC-256 NIA6 =
;
; Supported AEAD algorithms of a default crypto driver.
@@ -119,6 +125,9 @@ AES CCM (192) =
AES CCM (256) =
CHACHA20-POLY1305 =
SM4 GCM =
+SNOW5G NCA4 =
+AES NCA5 =
+ZUC-256 NCA6 =
;
; Supported Asymmetric algorithms of a default crypto driver.
diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
index 6268bab327..630fd153bd 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -178,8 +178,15 @@ enum rte_crypto_cipher_algorithm {
/**< ShangMi 4 (SM4) algorithm in OFB mode */
RTE_CRYPTO_CIPHER_SM4_CFB,
/**< ShangMi 4 (SM4) algorithm in CFB mode */
- RTE_CRYPTO_CIPHER_SM4_XTS
+ RTE_CRYPTO_CIPHER_SM4_XTS,
/**< ShangMi 4 (SM4) algorithm in XTS mode */
+
+ RTE_CRYPTO_CIPHER_SNOW5G_NEA4,
+ /**< Snow 5G algorithm in NEA4 mode */
+ RTE_CRYPTO_CIPHER_AES_NEA5,
+ /**< AES algorithm in NEA5 mode */
+ RTE_CRYPTO_CIPHER_ZUC_NEA6,
+ /**< ZUC-256 algorithm in NEA6 mode */
};
/** Symmetric Cipher Direction */
@@ -384,6 +391,14 @@ enum rte_crypto_auth_algorithm {
/**< 256 bit SHAKE algorithm. */
RTE_CRYPTO_AUTH_SM3_HMAC,
/** < HMAC using ShangMi 3 (SM3) algorithm */
+
+ RTE_CRYPTO_AUTH_SNOW5G_NIA4,
+ /**< Snow 5G algorithm in NIA4 mode */
+ RTE_CRYPTO_AUTH_AES_NIA5,
+ /**< AES algorithm in NIA5 mode */
+ RTE_CRYPTO_AUTH_ZUC_NIA6,
+ /**< ZUC-256 algorithm in NIA6 mode */
+
};
/** Symmetric Authentication / Hash Operations */
@@ -486,6 +501,13 @@ enum rte_crypto_aead_algorithm {
/**< Chacha20 cipher with poly1305 authenticator */
RTE_CRYPTO_AEAD_SM4_GCM,
/**< SM4 cipher in GCM mode */
+
+ RTE_CRYPTO_AEAD_SNOW5G_NCA4,
+ /**< Snow 5G algorithm in NCA4 mode */
+ RTE_CRYPTO_AEAD_AES_NCA5,
+ /**< AES algorithm in NCA5 mode */
+ RTE_CRYPTO_AEAD_ZUC_NCA6,
+ /**< ZUC-256 algorithm in NCA6 mode */
};
/** Symmetric AEAD Operations */
@@ -714,8 +736,11 @@ struct rte_crypto_sym_op {
*
* @note
* For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
- * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8
- * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3,
+ * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8,
+ * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3,
+ * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4,
+ * AES @ RTE_CRYPTO_CIPHER_AES_NEA5
+ * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6
* this field should be in bits. For
* digest-encrypted cases this must be
* an 8-bit multiple.
@@ -732,8 +757,11 @@ struct rte_crypto_sym_op {
*
* @note
* For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2,
- * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8
- * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3,
+ * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8,
+ * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3,
+ * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4,
+ * AES @ RTE_CRYPTO_CIPHER_AES_NEA5
+ * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6
* this field should be in bits. For
* digest-encrypted cases this must be
* an 8-bit multiple.
@@ -750,8 +778,11 @@ struct rte_crypto_sym_op {
*
* @note
* For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2,
- * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9
- * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3,
+ * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9,
+ * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3,
+ * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4,
+ * AES @ RTE_CRYPTO_AUTH_AES_NIA5
+ * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6
* this field should be in bits. For
* digest-encrypted cases this must be
* an 8-bit multiple.
@@ -775,8 +806,11 @@ struct rte_crypto_sym_op {
*
* @note
* For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2,
- * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9
- * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3,
+ * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9,
+ * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3,
+ * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4,
+ * AES @ RTE_CRYPTO_AUTH_AES_NIA5
+ * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6
* this field should be in bits. For
* digest-encrypted cases this must be
* an 8-bit multiple.
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index f4c6f692f0..7bddb154c2 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -102,7 +102,10 @@ crypto_cipher_algorithm_strings[] = {
[RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr",
[RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb",
[RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb",
- [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts"
+ [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts",
+ [RTE_CRYPTO_CIPHER_SNOW5G_NEA4] = "snow5g-nea4",
+ [RTE_CRYPTO_CIPHER_AES_NEA5] = "aes-nea5",
+ [RTE_CRYPTO_CIPHER_ZUC_NEA6] = "zuc-nea6",
};
/**
@@ -162,6 +165,10 @@ crypto_auth_algorithm_strings[] = {
[RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128",
[RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256",
+
+ [RTE_CRYPTO_AUTH_SNOW5G_NIA4] = "snow5g-nia4",
+ [RTE_CRYPTO_AUTH_AES_NIA5] = "aes-nia5",
+ [RTE_CRYPTO_AUTH_ZUC_NIA6] = "zuc-nia6",
};
/**
@@ -175,6 +182,10 @@ crypto_aead_algorithm_strings[] = {
[RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm",
[RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305",
[RTE_CRYPTO_AEAD_SM4_GCM] = "sm4-gcm",
+
+ [RTE_CRYPTO_AEAD_SNOW5G_NCA4] = "snow5g-nca4",
+ [RTE_CRYPTO_AEAD_AES_NCA5] = "aes-nca5",
+ [RTE_CRYPTO_AEAD_ZUC_NCA6] = "zuc-nca6",
};
--
2.50.1
next prev parent reply other threads:[~2026-01-21 15:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau
2026-01-07 10:56 ` [PATCH 2/2] test/crypto: add tests " Radu Nicolau
2026-01-19 8:12 ` [EXTERNAL] " Nithinsen Kaithakadan
2026-01-19 11:28 ` [PATCH v2 1/2] cryptodev: add support " Radu Nicolau
2026-01-19 11:28 ` [PATCH v2 2/2] test/crypto: add tests " Radu Nicolau
2026-01-19 17:05 ` Stephen Hemminger
2026-01-21 10:18 ` [PATCH v3 1/2] cryptodev: add support " Radu Nicolau
2026-01-21 10:18 ` [PATCH v3 2/2] test/crypto: add tests " Radu Nicolau
2026-01-21 15:15 ` Radu Nicolau [this message]
2026-01-21 15:15 ` [PATCH v4 " Radu Nicolau
2026-01-22 7:02 ` [EXTERNAL] " Nithinsen Kaithakadan
2026-01-22 10:25 ` [PATCH v5 1/2] cryptodev: add support " Radu Nicolau
2026-01-22 10:25 ` [PATCH v5 2/2] test/crypto: add tests " Radu Nicolau
2026-01-23 0:23 ` [PATCH v5 1/2] cryptodev: add support " Stephen Hemminger
2026-01-23 10:44 ` Radu Nicolau
2026-01-23 12:48 ` [PATCH v6 " Radu Nicolau
2026-01-23 12:48 ` [PATCH v6 2/2] test/crypto: add tests " Radu Nicolau
2026-01-29 4:29 ` [EXTERNAL] " Nithinsen Kaithakadan
2026-01-29 11:59 ` [PATCH v7 1/2] cryptodev: add support " Radu Nicolau
2026-01-29 11:59 ` [PATCH v7 2/2] test/crypto: add tests " Radu Nicolau
2026-01-30 11:12 ` [EXTERNAL] " Nithinsen Kaithakadan
2026-02-03 11:21 ` Radu Nicolau
2026-02-03 11:13 ` [PATCH v8 1/2] cryptodev: add support " Radu Nicolau
2026-02-03 11:13 ` [PATCH v8 2/2] test/crypto: add tests " Radu Nicolau
2026-02-03 14:00 ` [EXTERNAL] " Nithinsen Kaithakadan
2026-02-03 13:59 ` [EXTERNAL] [PATCH v8 1/2] cryptodev: add support " Nithinsen Kaithakadan
2026-02-06 19:48 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260121151703.2501018-1-radu.nicolau@intel.com \
--to=radu.nicolau@intel.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=gakhil@marvell.com \
--cc=kai.ji@intel.com \
--cc=nkaithakadan@marvell.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox