DPDK patches and discussions
 help / color / mirror / Atom feed
From: Brian Dooley <brian.dooley@intel.com>
To: Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>
Cc: dev@dpdk.org, kai.ji@intel.com, pablo.de.lara.guarch@intel.com,
	Brian Dooley <brian.dooley@intel.com>
Subject: [PATCH v4 2/3] cryptodev: add SM4 GCM
Date: Wed, 19 Feb 2025 11:50:00 +0000	[thread overview]
Message-ID: <20250219115001.1047145-2-brian.dooley@intel.com> (raw)
In-Reply-To: <20250219115001.1047145-1-brian.dooley@intel.com>

Added support for symmetric algorithm SM4 GCM in cryptodev.

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
 doc/guides/cryptodevs/features/default.ini | 2 ++
 lib/cryptodev/rte_crypto_sym.h             | 4 +++-
 lib/cryptodev/rte_cryptodev.c              | 3 ++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 592af48026..116ffce249 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -118,6 +118,8 @@ AES CCM (128)     =
 AES CCM (192)     =
 AES CCM (256)     =
 CHACHA20-POLY1305 =
+SM4 GCM           =
+
 ;
 ; 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 505356ff44..b47e52f63b 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -482,8 +482,10 @@ enum rte_crypto_aead_algorithm {
 	/**< AES algorithm in CCM mode. */
 	RTE_CRYPTO_AEAD_AES_GCM,
 	/**< AES algorithm in GCM mode. */
-	RTE_CRYPTO_AEAD_CHACHA20_POLY1305
+	RTE_CRYPTO_AEAD_CHACHA20_POLY1305,
 	/**< Chacha20 cipher with poly1305 authenticator */
+	RTE_CRYPTO_AEAD_SM4_GCM
+	/**< SM4 cipher with GCM mode */
 };
 
 /** Symmetric AEAD Operations */
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index a49b0662f3..7b5236ad41 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -168,7 +168,8 @@ static const char *
 crypto_aead_algorithm_strings[] = {
 	[RTE_CRYPTO_AEAD_AES_CCM]	= "aes-ccm",
 	[RTE_CRYPTO_AEAD_AES_GCM]	= "aes-gcm",
-	[RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305"
+	[RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305",
+	[RTE_CRYPTO_AEAD_SM4_GCM]   = "sm4-gcm"
 };
 
 
-- 
2.25.1


  reply	other threads:[~2025-02-19 11:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-13 12:58 [PATCH v1 1/2] crypto/ipsec_mb: add SM4 GCM support Brian Dooley
2024-12-13 12:58 ` [PATCH v1 2/2] app/test: add SM4 GCM tests Brian Dooley
2025-01-13 16:39 ` [PATCH v2 1/2] crypto/ipsec_mb: add SM4 GCM support Brian Dooley
2025-01-13 16:39   ` Brian Dooley
2025-01-13 17:10 ` [PATCH v3 " Brian Dooley
2025-01-13 17:10   ` [PATCH v3 2/2] app/test: add SM4 GCM tests Brian Dooley
2025-01-29  9:32     ` Dooley, Brian
2025-02-18 11:01     ` De Lara Guarch, Pablo
2025-02-06 12:51   ` [EXTERNAL] [PATCH v3 1/2] crypto/ipsec_mb: add SM4 GCM support Akhil Goyal
2025-02-18 10:48   ` De Lara Guarch, Pablo
2025-02-19 11:49 ` [PATCH v4 1/3] " Brian Dooley
2025-02-19 11:50   ` Brian Dooley [this message]
2025-02-20 15:40     ` [PATCH v4 2/3] cryptodev: add SM4 GCM De Lara Guarch, Pablo
2025-02-19 11:50   ` [PATCH v4 3/3] app/test: add SM4 GCM tests Brian Dooley
2025-02-20 15:39   ` [PATCH v4 1/3] crypto/ipsec_mb: add SM4 GCM support De Lara Guarch, Pablo

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=20250219115001.1047145-2-brian.dooley@intel.com \
    --to=brian.dooley@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=pablo.de.lara.guarch@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).