DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/aesni_mb: support AES-CCM-256
@ 2020-10-06 10:43 Pablo de Lara
  2020-10-09 12:18 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo de Lara @ 2020-10-06 10:43 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev, Pablo de Lara

This patch adds support for AES-CCM-256 when using AESNI-MB

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/cryptodevs/features/aesni_mb.ini    | 1 +
 doc/guides/rel_notes/release_20_11.rst         | 4 ++++
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 5 +++++
 3 files changed, 10 insertions(+)

diff --git a/doc/guides/cryptodevs/features/aesni_mb.ini b/doc/guides/cryptodevs/features/aesni_mb.ini
index 38d255aff..58afb203e 100644
--- a/doc/guides/cryptodevs/features/aesni_mb.ini
+++ b/doc/guides/cryptodevs/features/aesni_mb.ini
@@ -55,6 +55,7 @@ AES GMAC     = Y
 ;
 [AEAD]
 AES CCM (128) = Y
+AES CCM (256) = Y
 AES GCM (128) = Y
 AES GCM (192) = Y
 AES GCM (256) = Y
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 6d8c24413..6a2d000d3 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -210,6 +210,10 @@ API Changes
 
 * bpf: ``RTE_BPF_XTYPE_NUM`` has been dropped from ``rte_bpf_xtype``.
 
+* **Updated the AESNI MB crypto PMD.**
+
+  * Updated the AESNI MB PMD with AES-256 CCM algorithm.
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 2362f0c3c..7759a9873 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -400,8 +400,13 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 				.block_size = 16,
 				.key_size = {
 					.min = 16,
+#if IMB_VERSION(0, 54, 2) <= IMB_VERSION_NUM
+					.max = 32,
+					.increment = 16
+#else
 					.max = 16,
 					.increment = 0
+#endif
 				},
 				.digest_size = {
 					.min = 4,
-- 
2.25.1


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

* [dpdk-dev] [PATCH v2] crypto/aesni_mb: support AES-CCM-256
  2020-10-06 10:43 [dpdk-dev] [PATCH] crypto/aesni_mb: support AES-CCM-256 Pablo de Lara
@ 2020-10-09 12:18 ` Pablo de Lara
  2020-10-12 15:03   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo de Lara @ 2020-10-09 12:18 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev, Pablo de Lara

This patch adds support for AES-CCM-256 when using AESNI-MB

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

---

This patch depends on series http://patches.dpdk.org/project/dpdk/list/?series=12822.

Changes:

v2 :

 - Fixed session creation
 - Rebased on top of crypto subtree

---

 doc/guides/cryptodevs/features/aesni_mb.ini    | 1 +
 doc/guides/rel_notes/release_20_11.rst         | 1 +
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     | 6 ++++++
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 5 +++++
 4 files changed, 13 insertions(+)

diff --git a/doc/guides/cryptodevs/features/aesni_mb.ini b/doc/guides/cryptodevs/features/aesni_mb.ini
index f391c3f38..9ebd32000 100644
--- a/doc/guides/cryptodevs/features/aesni_mb.ini
+++ b/doc/guides/cryptodevs/features/aesni_mb.ini
@@ -64,6 +64,7 @@ KASUMI F9    = Y
 ;
 [AEAD]
 AES CCM (128)     = Y
+AES CCM (256)     = Y
 AES GCM (128)     = Y
 AES GCM (192)     = Y
 AES GCM (256)     = Y
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 0e0b741b3..efae5784c 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -81,6 +81,7 @@ New Features
   * Added support for SNOW3G-UEA2/UIA2 algorithms.
   * Added support for KASUMI-F8/F9 algorithms.
   * Added support for Chacha20-Poly1305.
+  * Added support for AES-256 CCM algorithm.
 
 * **Updated the aesni_gcm crypto PMD.**
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 42c23201a..db0910915 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -686,6 +686,12 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 					sess->cipher.expanded_aes_keys.encode,
 					sess->cipher.expanded_aes_keys.decode);
 			break;
+		case AES_256_BYTES:
+			sess->cipher.key_length_in_bytes = AES_256_BYTES;
+			IMB_AES_KEYEXP_256(mb_mgr, xform->aead.key.data,
+					sess->cipher.expanded_aes_keys.encode,
+					sess->cipher.expanded_aes_keys.decode);
+			break;
 		default:
 			AESNI_MB_LOG(ERR, "Invalid cipher key length");
 			return -EINVAL;
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index e8cb57ea9..3eb46d714 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -400,8 +400,13 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 				.block_size = 16,
 				.key_size = {
 					.min = 16,
+#if IMB_VERSION(0, 54, 2) <= IMB_VERSION_NUM
+					.max = 32,
+					.increment = 16
+#else
 					.max = 16,
 					.increment = 0
+#endif
 				},
 				.digest_size = {
 					.min = 4,
-- 
2.25.1


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

* Re: [dpdk-dev] [PATCH v2] crypto/aesni_mb: support AES-CCM-256
  2020-10-09 12:18 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
@ 2020-10-12 15:03   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2020-10-12 15:03 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty; +Cc: dev



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Pablo de Lara
> Sent: Friday, October 9, 2020 5:49 PM
> To: declan.doherty@intel.com
> Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH v2] crypto/aesni_mb: support AES-CCM-256
> 
> This patch adds support for AES-CCM-256 when using AESNI-MB
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> ---

Applied to dpdk-next-crypto

Thanks.

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

end of thread, other threads:[~2020-10-12 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 10:43 [dpdk-dev] [PATCH] crypto/aesni_mb: support AES-CCM-256 Pablo de Lara
2020-10-09 12:18 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2020-10-12 15:03   ` Akhil Goyal

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git