* [PATCH] cryptodev: add SNOW-V algorithms
@ 2025-04-08 11:08 Radu Nicolau
2025-04-10 15:08 ` Ji, Kai
0 siblings, 1 reply; 2+ messages in thread
From: Radu Nicolau @ 2025-04-08 11:08 UTC (permalink / raw)
To: Akhil Goyal, Fan Zhang; +Cc: dev, kai.ji, Radu Nicolau
Add SNOW-V and SNOW-V AEAD mode algorithms to cryptodev API.
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
lib/cryptodev/rte_crypto_sym.h | 17 ++++++++++++-----
lib/cryptodev/rte_cryptodev.c | 4 +++-
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
index 6268bab327..d6033ac4a1 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -178,8 +178,11 @@ 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_SNOW_V,
+ /**< SNOW V algorithm */
};
/** Symmetric Cipher Direction */
@@ -486,6 +489,8 @@ enum rte_crypto_aead_algorithm {
/**< Chacha20 cipher with poly1305 authenticator */
RTE_CRYPTO_AEAD_SM4_GCM,
/**< SM4 cipher in GCM mode */
+ RTE_CRYPTO_AEAD_SNOW_V,
+ /**< SNOW V algorithm in GCM mode */
};
/** Symmetric AEAD Operations */
@@ -714,8 +719,9 @@ 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 and
+ * SNOW V @ RTE_CRYPTO_CIPHER_SNOW_V
* this field should be in bits. For
* digest-encrypted cases this must be
* an 8-bit multiple.
@@ -732,8 +738,9 @@ 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 and
+ * SNOW V @ RTE_CRYPTO_CIPHER_SNOW_V
* 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 bb7bab4dd5..ae44c5f385 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -102,7 +102,8 @@ 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_SNOW_V] = "snow-v",
};
/**
@@ -175,6 +176,7 @@ 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_SNOW_V] = "snow-v-aead",
};
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] cryptodev: add SNOW-V algorithms
2025-04-08 11:08 [PATCH] cryptodev: add SNOW-V algorithms Radu Nicolau
@ 2025-04-10 15:08 ` Ji, Kai
0 siblings, 0 replies; 2+ messages in thread
From: Ji, Kai @ 2025-04-10 15:08 UTC (permalink / raw)
To: Nicolau, Radu, Akhil Goyal, Fan Zhang; +Cc: dev
[-- Attachment #1: Type: text/plain, Size: 4238 bytes --]
Acked-by: Kai Ji <kai.ji@intel.com>
________________________________
From: Nicolau, Radu <radu.nicolau@intel.com>
Sent: 08 April 2025 12:08
To: Akhil Goyal <gakhil@marvell.com>; Fan Zhang <fanzhang.oss@gmail.com>
Cc: dev@dpdk.org <dev@dpdk.org>; Ji, Kai <kai.ji@intel.com>; Nicolau, Radu <radu.nicolau@intel.com>
Subject: [PATCH] cryptodev: add SNOW-V algorithms
Add SNOW-V and SNOW-V AEAD mode algorithms to cryptodev API.
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
lib/cryptodev/rte_crypto_sym.h | 17 ++++++++++++-----
lib/cryptodev/rte_cryptodev.c | 4 +++-
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
index 6268bab327..d6033ac4a1 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -178,8 +178,11 @@ 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_SNOW_V,
+ /**< SNOW V algorithm */
};
/** Symmetric Cipher Direction */
@@ -486,6 +489,8 @@ enum rte_crypto_aead_algorithm {
/**< Chacha20 cipher with poly1305 authenticator */
RTE_CRYPTO_AEAD_SM4_GCM,
/**< SM4 cipher in GCM mode */
+ RTE_CRYPTO_AEAD_SNOW_V,
+ /**< SNOW V algorithm in GCM mode */
};
/** Symmetric AEAD Operations */
@@ -714,8 +719,9 @@ 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 and
+ * SNOW V @ RTE_CRYPTO_CIPHER_SNOW_V
* this field should be in bits. For
* digest-encrypted cases this must be
* an 8-bit multiple.
@@ -732,8 +738,9 @@ 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 and
+ * SNOW V @ RTE_CRYPTO_CIPHER_SNOW_V
* 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 bb7bab4dd5..ae44c5f385 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -102,7 +102,8 @@ 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_SNOW_V] = "snow-v",
};
/**
@@ -175,6 +176,7 @@ 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_SNOW_V] = "snow-v-aead",
};
--
2.43.0
[-- Attachment #2: Type: text/html, Size: 11189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-10 15:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-08 11:08 [PATCH] cryptodev: add SNOW-V algorithms Radu Nicolau
2025-04-10 15:08 ` Ji, Kai
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).