From: Hanxiao Li <li.hanxiao@zte.com.cn>
To: dev@dpdk.org
Cc: wang.yong19@zte.com.cn, gakhil@marvell.com,
Hanxiao Li <li.hanxiao@zte.com.cn>
Subject: [PATCH v1 1/2] cryptodev: add SM4-XTS
Date: Fri, 11 Oct 2024 09:17:04 +0800 [thread overview]
Message-ID: <20241011011705.1428108-2-li.hanxiao@zte.com.cn> (raw)
In-Reply-To: <20241011011705.1428108-1-li.hanxiao@zte.com.cn>
[-- Attachment #1.1.1: Type: text/plain, Size: 2422 bytes --]
add sm4-xts algo for crypto.
Signed-off-by: Hanxiao Li <li.hanxiao@zte.com.cn>
---
doc/guides/cryptodevs/features/default.ini | 1 +
doc/guides/rel_notes/release_24_11.rst | 4 ++++
lib/cryptodev/rte_crypto_sym.h | 4 +++-
lib/cryptodev/rte_cryptodev.c | 3 ++-
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index f411d4bab7..0d62bb0d4a 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -67,6 +67,7 @@ SM4 CBC =
SM4 CTR =
SM4 CFB =
SM4 OFB =
+SM4 XTS =
;
; Supported authentication algorithms of a default crypto driver.
diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst
index 0ff70d9057..65c5e13136 100644
--- a/doc/guides/rel_notes/release_24_11.rst
+++ b/doc/guides/rel_notes/release_24_11.rst
@@ -24,6 +24,10 @@ DPDK Release 24.11
New Features
------------
+* **Added new algorithms to cryptodev.**
+
+ * Added symmetric cipher algorithm ShangMi 4 (SM4) in XTS modes.
+
.. This section should contain new features added in this release.
Sample format:
diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
index 53b18b9412..b34d041fe0 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -176,8 +176,10 @@ enum rte_crypto_cipher_algorithm {
/**< ShangMi 4 (SM4) algorithm in CTR mode */
RTE_CRYPTO_CIPHER_SM4_OFB,
/**< ShangMi 4 (SM4) algorithm in OFB mode */
- RTE_CRYPTO_CIPHER_SM4_CFB
+ RTE_CRYPTO_CIPHER_SM4_CFB,
/**< ShangMi 4 (SM4) algorithm in CFB mode */
+ RTE_CRYPTO_CIPHER_SM4_XTS
+ /**< ShangMi 4 (SM4) algorithm in XTS mode */
};
/** Symmetric Cipher Direction */
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 682c9f49d0..83ead956a8 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -97,7 +97,8 @@ crypto_cipher_algorithm_strings[] = {
[RTE_CRYPTO_CIPHER_SM4_CBC] = "sm4-cbc",
[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_OFB] = "sm4-ofb",
+ [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts"
};
/**
--
2.27.0
[-- Attachment #1.1.2: Type: text/html , Size: 4559 bytes --]
next prev parent reply other threads:[~2024-10-11 1:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 1:17 [PATCH v1 0/2] cryptodev: add SM4-XTS algo and test cases Hanxiao Li
2024-10-11 1:17 ` Hanxiao Li [this message]
2024-10-11 12:21 ` [EXTERNAL] [PATCH v1 1/2] cryptodev: add SM4-XTS Akhil Goyal
2024-10-11 1:17 ` [PATCH v1 2/2] app/test: add SM4-XTS test cases Hanxiao Li
2024-10-11 12:22 ` [EXTERNAL] [PATCH v1 0/2] cryptodev: add SM4-XTS algo and " Akhil Goyal
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=20241011011705.1428108-2-li.hanxiao@zte.com.cn \
--to=li.hanxiao@zte.com.cn \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=wang.yong19@zte.com.cn \
/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).