From: Radu Nicolau <radu.nicolau@intel.com>
To: Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>
Cc: dev@dpdk.org, kai.ji@intel.com, Radu Nicolau <radu.nicolau@intel.com>
Subject: [PATCH] cryptodev: add SNOW-V algorithms
Date: Tue, 8 Apr 2025 12:08:51 +0100 [thread overview]
Message-ID: <20250408110851.2952910-1-radu.nicolau@intel.com> (raw)
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
next reply other threads:[~2025-04-08 11:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 11:08 Radu Nicolau [this message]
2025-04-10 15:08 ` Ji, Kai
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=20250408110851.2952910-1-radu.nicolau@intel.com \
--to=radu.nicolau@intel.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=gakhil@marvell.com \
--cc=kai.ji@intel.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).