All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sucharitha Sarananaga <ssarananaga@marvell.com>
To: <dev@dpdk.org>
Cc: <gakhil@marvell.com>, <fanzhang.oss@gmail.com>,
	<adwivedi@marvell.com>, <anoobj@marvell.com>,
	<ktejasree@marvell.com>, <kai.ji@intel.com>,
	<jianjay.zhou@huawei.com>, <radu.nicolau@intel.com>,
	<gmuthukrishn@marvell.com>,
	Sucharitha Sarananaga <ssarananaga@marvell.com>
Subject: [PATCH 05/10] crypto/qat: advertise RSA padding capabilities
Date: Mon, 31 Aug 2026 10:23:23 +0000	[thread overview]
Message-ID: <20260831102328.2813604-6-ssarananaga@marvell.com> (raw)
In-Reply-To: <20260831102328.2813604-1-ssarananaga@marvell.com>

Add QAT_ASYM_RSA_CAP macro to report RSA asymmetric capabilities
using rsa_capa, including modulus length and padding schemes.

Update Gen1 and Gen4 QAT asymmetric PMDs to advertise
RTE_CRYPTO_RSA_PADDING_NONE via pad_types, matching the padding
mode supported by the QAT RSA implementation.

Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
---
 drivers/crypto/qat/asym/qat_asym.h           | 20 ++++++++++++++++++++
 drivers/crypto/qat/dev/qat_asym_pmd_gen1.c   |  5 +++--
 drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c |  5 +++--
 3 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/qat/asym/qat_asym.h b/drivers/crypto/qat/asym/qat_asym.h
index 0ecbc47548..cf40d445df 100644
--- a/drivers/crypto/qat/asym/qat_asym.h
+++ b/drivers/crypto/qat/asym/qat_asym.h
@@ -56,6 +56,26 @@ typedef uint64_t large_int_ptr;
 		}							\
 	}
 
+#define QAT_ASYM_RSA_CAP(o, l, r, i, p)					\
+	{								\
+		.op = RTE_CRYPTO_OP_TYPE_ASYMMETRIC,			\
+		{.asym = {						\
+			.xform_capa = {					\
+				.xform_type = RTE_CRYPTO_ASYM_XFORM_RSA, \
+				.op_types = o,				\
+				.rsa_capa = {				\
+				.modlen = {				\
+				.min = l,				\
+				.max = r,				\
+				.increment = i				\
+				},					\
+				.pad_types = p,				\
+				},					\
+			}						\
+		},							\
+		}							\
+	}
+
 struct __rte_aligned(8) qat_asym_op_cookie {
 	uint64_t error;
 	uint32_t alg_bytesize; /* Bytesize of algorithm */
diff --git a/drivers/crypto/qat/dev/qat_asym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_asym_pmd_gen1.c
index c96608dd37..5b93cf374b 100644
--- a/drivers/crypto/qat/dev/qat_asym_pmd_gen1.c
+++ b/drivers/crypto/qat/dev/qat_asym_pmd_gen1.c
@@ -32,12 +32,13 @@ static struct rte_cryptodev_capabilities qat_asym_crypto_caps_gen1[] = {
 		0, 1, 512, 1),
 	QAT_ASYM_CAP(MODINV,
 		0, 1, 512, 1),
-	QAT_ASYM_CAP(RSA,
+	QAT_ASYM_RSA_CAP(
 			((1 << RTE_CRYPTO_ASYM_OP_SIGN) |
 			(1 << RTE_CRYPTO_ASYM_OP_VERIFY) |
 			(1 << RTE_CRYPTO_ASYM_OP_ENCRYPT) |
 			(1 << RTE_CRYPTO_ASYM_OP_DECRYPT)),
-			64, 512, 64),
+			64, 512, 64,
+			(1 << RTE_CRYPTO_RSA_PADDING_NONE)),
 	QAT_ASYM_CAP(ECDH,
 			((1 << RTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE) |
 			(1 << RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE) |
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
index 41cad29142..106c512a06 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
@@ -121,12 +121,13 @@ static struct rte_cryptodev_capabilities qat_asym_crypto_caps_gen4[] = {
 		0, 1, 512, 1),
 	QAT_ASYM_CAP(MODINV,
 		0, 1, 512, 1),
-	QAT_ASYM_CAP(RSA,
+	QAT_ASYM_RSA_CAP(
 			((1 << RTE_CRYPTO_ASYM_OP_SIGN) |
 			(1 << RTE_CRYPTO_ASYM_OP_VERIFY) |
 			(1 << RTE_CRYPTO_ASYM_OP_ENCRYPT) |
 			(1 << RTE_CRYPTO_ASYM_OP_DECRYPT)),
-			64, 512, 64),
+			64, 512, 64,
+			(1 << RTE_CRYPTO_RSA_PADDING_NONE)),
 	{	/* SM2 */
 		.op = RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
 		{.asym = {
-- 
2.54.0


  parent reply	other threads:[~2026-08-31 10:24 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 10:23 [PATCH 00/10] cryptodev: add RSA-OAEP and RSA-PSS padding support Sucharitha Sarananaga
2026-08-31 10:23 ` [PATCH 01/10] crypto: add RSA-specific capability parameters Sucharitha Sarananaga
2026-08-31 10:23 ` [PATCH 02/10] crypto/virtio: advertise RSA padding and hash capabilities Sucharitha Sarananaga
2026-08-31 10:23 ` [PATCH 03/10] crypto/octeontx: advertise RSA PKCS#1 v1.5 padding support Sucharitha Sarananaga
2026-08-31 10:23 ` [PATCH 04/10] crypto/cnxk: " Sucharitha Sarananaga
2026-08-31 10:23 ` Sucharitha Sarananaga [this message]
2026-08-31 12:11   ` [PATCH 05/10] crypto/qat: advertise RSA padding capabilities Radu Nicolau
2026-08-31 10:23 ` [PATCH 06/10] crypto/openssl: advertise RSA padding and hash capabilities Sucharitha Sarananaga
2026-08-31 10:23 ` [PATCH 07/10] crypto/openssl: add RSA-OAEP support for OpenSSL PMD Sucharitha Sarananaga
2026-08-31 10:23 ` [PATCH 08/10] app/test: add RSA OAEP asymmetric test cases Sucharitha Sarananaga
2026-08-31 10:23 ` [PATCH 09/10] crypto/openssl: add RSA-PSS support for RSA operations Sucharitha Sarananaga
2026-08-31 10:23 ` [PATCH 10/10] app/test: add RSA-PSS sign and verify test cases Sucharitha Sarananaga
2026-09-03  8:26 ` [PATCH v2 0/8] cryptodev: add RSA-OAEP and RSA-PSS padding support Sucharitha Sarananaga
2026-09-03  8:26   ` [PATCH v2 1/8] crypto: add RSA-specific capability parameters Sucharitha Sarananaga
2026-09-08 14:05     ` Radu Nicolau
2026-09-03  8:26   ` [PATCH v2 2/8] crypto/octeontx: advertise RSA PKCS#1 v1.5 padding support Sucharitha Sarananaga
2026-09-03  8:26   ` [PATCH v2 3/8] crypto/cnxk: " Sucharitha Sarananaga
2026-09-03  8:26   ` [PATCH v2 4/8] crypto/openssl: advertise RSA padding and hash capabilities Sucharitha Sarananaga
2026-09-03  8:26   ` [PATCH v2 5/8] crypto/openssl: add RSA-OAEP support for OpenSSL PMD Sucharitha Sarananaga
2026-09-24 12:14     ` Akhil Goyal
2026-09-03  8:26   ` [PATCH v2 6/8] app/test: add RSA OAEP asymmetric test cases Sucharitha Sarananaga
2026-09-03  8:26   ` [PATCH v2 7/8] crypto/openssl: add RSA-PSS support for RSA operations Sucharitha Sarananaga
2026-09-03  8:26   ` [PATCH v2 8/8] app/test: add RSA-PSS sign and verify test cases Sucharitha Sarananaga
2026-09-24 13:31     ` Akhil Goyal
2026-09-25  8:14   ` [PATCH v3 0/8] cryptodev: add RSA-OAEP and RSA-PSS padding support Sucharitha Sarananaga
2026-09-25  8:14     ` [PATCH v3 1/8] crypto: add RSA-specific capability parameters Sucharitha Sarananaga
2026-09-25  8:14     ` [PATCH v3 2/8] crypto/octeontx: advertise RSA PKCS#1 v1.5 padding support Sucharitha Sarananaga
2026-09-25  8:14     ` [PATCH v3 3/8] crypto/cnxk: " Sucharitha Sarananaga
2026-09-25  8:14     ` [PATCH v3 4/8] crypto/openssl: advertise RSA padding and hash capabilities Sucharitha Sarananaga
2026-09-25  8:14     ` [PATCH v3 5/8] crypto/openssl: support RSA-OAEP Sucharitha Sarananaga
2026-09-25  8:14     ` [PATCH v3 6/8] test/crypto: add RSA OAEP asymmetric test cases Sucharitha Sarananaga
2026-09-25  8:14     ` [PATCH v3 7/8] crypto/openssl: support RSA-PSS Sucharitha Sarananaga
2026-09-25  8:15     ` [PATCH v3 8/8] test/crypto: add RSA-PSS sign and verify test cases Sucharitha Sarananaga
2026-09-28  5:04     ` [PATCH v4 0/8] cryptodev: add RSA-OAEP and RSA-PSS padding support Sucharitha Sarananaga
2026-09-28  5:04       ` [PATCH v4 1/8] crypto: add RSA-specific capability parameters Sucharitha Sarananaga
2026-09-28  5:04       ` [PATCH v4 2/8] crypto/octeontx: advertise RSA PKCS#1 v1.5 padding support Sucharitha Sarananaga
2026-09-28  5:04       ` [PATCH v4 3/8] crypto/cnxk: " Sucharitha Sarananaga
2026-09-28  5:04       ` [PATCH v4 4/8] crypto/openssl: advertise RSA padding and hash capabilities Sucharitha Sarananaga
2026-09-28  5:04       ` [PATCH v4 5/8] crypto/openssl: support RSA-OAEP Sucharitha Sarananaga
2026-09-28  5:04       ` [PATCH v4 6/8] test/crypto: add RSA OAEP asymmetric test cases Sucharitha Sarananaga
2026-09-28  5:04       ` [PATCH v4 7/8] crypto/openssl: support RSA-PSS Sucharitha Sarananaga
2026-09-28  5:04       ` [PATCH v4 8/8] test/crypto: add RSA-PSS sign and verify test cases Sucharitha Sarananaga
2026-09-28  9:21       ` [PATCH v4 0/8] cryptodev: add RSA-OAEP and RSA-PSS padding support Akhil Goyal
2026-09-28  9:37         ` Thomas Monjalon
2026-09-28  9:57           ` [EXTERNAL] " 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=20260831102328.2813604-6-ssarananaga@marvell.com \
    --to=ssarananaga@marvell.com \
    --cc=adwivedi@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=gmuthukrishn@marvell.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=kai.ji@intel.com \
    --cc=ktejasree@marvell.com \
    --cc=radu.nicolau@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.