DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] lib/cryptodev/: Add SM3_HMAC/SM4_CFB/SM4_OFB support in DPDK
@ 2023-03-16  3:10 Sunyang Wu
  2023-03-16  3:10 ` [PATCH 2/2] test/crypto: Add SM3/SM4 test vectors for verification in test app Sunyang Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Sunyang Wu @ 2023-03-16  3:10 UTC (permalink / raw)
  To: dev; +Cc: kai.ji, gakhil

Add SM3_HMAC/SM4_CFB/SM4_OFB support in DPDK.

Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
---
 lib/cryptodev/rte_crypto_sym.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
index 2cfe66530c..c4572106dc 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -172,8 +172,12 @@ enum rte_crypto_cipher_algorithm {
 	/**< ShangMi 4 (SM4) algorithm in ECB mode */
 	RTE_CRYPTO_CIPHER_SM4_CBC,
 	/**< ShangMi 4 (SM4) algorithm in CBC mode */
-	RTE_CRYPTO_CIPHER_SM4_CTR
+	RTE_CRYPTO_CIPHER_SM4_CTR,
 	/**< ShangMi 4 (SM4) algorithm in CTR mode */
+	RTE_CRYPTO_CIPHER_SM4_OFB,
+	/**< ShangMi 4 (SM4) algorithm in OFB mode */
+	RTE_CRYPTO_CIPHER_SM4_CFB
+	/**< ShangMi 4 (SM4) algorithm in CFB mode */
 };
 
 /** Cipher algorithm name strings */
@@ -376,6 +380,8 @@ enum rte_crypto_auth_algorithm {
 	/**< HMAC using 512 bit SHA3 algorithm. */
 	RTE_CRYPTO_AUTH_SM3,
 	/**< ShangMi 3 (SM3) algorithm */
+	RTE_CRYPTO_AUTH_SM3_HMAC,
+	/** < HMAC using Chinese SM3 algorithm */
 
 	RTE_CRYPTO_AUTH_SHAKE_128,
 	/**< 128 bit SHAKE algorithm. */
-- 
2.19.0.rc0.windows.1


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 1/2] lib/cryptodev/: Add SM3_HMAC/SM4_CFB/SM4_OFB support in DPDK
@ 2023-05-25  8:52 Sunyang Wu
  0 siblings, 0 replies; 12+ messages in thread
From: Sunyang Wu @ 2023-05-25  8:52 UTC (permalink / raw)
  To: dev; +Cc: kai.ji, gakhil

Add crypto mode: SM4_CFB/SM4_OFB support in DPDK.
Add auth mode: SM3_HMAC support in DPDK.

Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
---
 doc/guides/cryptodevs/features/default.ini | 3 +++
 lib/cryptodev/rte_crypto_sym.h             | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 523da0cfa8..8f54d4a2a5 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -64,6 +64,8 @@ ZUC EEA3       =
 SM4 ECB        =
 SM4 CBC        =
 SM4 CTR        =
+SM4 CFB        =
+SM4 OFB        =
 
 ;
 ; Supported authentication algorithms of a default crypto driver.
@@ -99,6 +101,7 @@ SHA3_384 HMAC   =
 SHA3_512        =
 SHA3_512 HMAC   =
 SM3             =
+SM3 HMAC        =
 SHAKE_128       =
 SHAKE_256       =
 
diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
index b43174dbec..428603d06e 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -172,8 +172,12 @@ enum rte_crypto_cipher_algorithm {
 	/**< ShangMi 4 (SM4) algorithm in ECB mode */
 	RTE_CRYPTO_CIPHER_SM4_CBC,
 	/**< ShangMi 4 (SM4) algorithm in CBC mode */
-	RTE_CRYPTO_CIPHER_SM4_CTR
+	RTE_CRYPTO_CIPHER_SM4_CTR,
 	/**< ShangMi 4 (SM4) algorithm in CTR mode */
+	RTE_CRYPTO_CIPHER_SM4_OFB,
+	/**< ShangMi 4 (SM4) algorithm in OFB mode */
+	RTE_CRYPTO_CIPHER_SM4_CFB
+	/**< ShangMi 4 (SM4) algorithm in CFB mode */
 };
 
 /** Cipher algorithm name strings */
@@ -376,6 +380,8 @@ enum rte_crypto_auth_algorithm {
 	/**< HMAC using 512 bit SHA3 algorithm. */
 	RTE_CRYPTO_AUTH_SM3,
 	/**< ShangMi 3 (SM3) algorithm */
+	RTE_CRYPTO_AUTH_SM3_HMAC,
+	/** < HMAC using ShangMi 3 (SM3) algorithm */
 
 	RTE_CRYPTO_AUTH_SHAKE_128,
 	/**< 128 bit SHAKE algorithm. */
-- 
2.19.0.rc0.windows.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-05-25  9:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16  3:10 [PATCH 1/2] lib/cryptodev/: Add SM3_HMAC/SM4_CFB/SM4_OFB support in DPDK Sunyang Wu
2023-03-16  3:10 ` [PATCH 2/2] test/crypto: Add SM3/SM4 test vectors for verification in test app Sunyang Wu
2023-03-16 10:42 ` [EXT] [PATCH 1/2] lib/cryptodev/: Add SM3_HMAC/SM4_CFB/SM4_OFB support in DPDK Akhil Goyal
2023-03-18 13:00   ` 回复: " Sunyang Wu
2023-04-19 19:41     ` Kusztal, ArkadiuszX
2023-05-17  7:04 ` Akhil Goyal
2023-05-25  8:27   ` Akhil Goyal
2023-05-25  9:00     ` 回复: " Sunyang Wu
2023-05-25  9:04       ` Akhil Goyal
2023-05-25  9:25         ` 回复: " Sunyang Wu
2023-05-25  9:45           ` Akhil Goyal
2023-05-25  8:52 Sunyang Wu

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).