From: Radu Nicolau <radu.nicolau@intel.com>
To: dev@dpdk.org
Cc: nkaithakadan@marvell.com, kai.ji@intel.com, anoobj@marvell.com,
Radu Nicolau <radu.nicolau@intel.com>,
Akhil Goyal <gakhil@marvell.com>,
Fan Zhang <fanzhang.oss@gmail.com>
Subject: [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms
Date: Wed, 7 Jan 2026 10:56:48 +0000 [thread overview]
Message-ID: <20260107105649.1708347-1-radu.nicolau@intel.com> (raw)
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>
---
doc/guides/cryptodevs/features/default.ini | 9 ++++++++
lib/cryptodev/rte_crypto_sym.h | 24 +++++++++++++++++++++-
lib/cryptodev/rte_cryptodev.c | 13 +++++++++++-
3 files changed, 44 insertions(+), 2 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..f7b29ccf9a 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 NEA4 mode */
+ RTE_CRYPTO_CIPHER_ZUC_NEA6,
+ /**< ZUC-256 algorithm in NEA4 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 NIA4 mode */
+ RTE_CRYPTO_AUTH_ZUC_NIA6,
+ /**< ZUC-256 algorithm in NIA4 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 NCA4 mode */
+ RTE_CRYPTO_AEAD_ZUC_NCA6,
+ /**< ZUC-256 algorithm in NCA4 mode */
};
/** Symmetric AEAD Operations */
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 reply other threads:[~2026-01-07 10:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 10:56 Radu Nicolau [this message]
2026-01-07 10:56 ` [PATCH 2/2] test/crypto: add tests " Radu Nicolau
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=20260107105649.1708347-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 \
/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;
as well as URLs for NNTP newsgroup(s).