[PATCH 02/10] crypto/virtio: advertise RSA padding and hash capabilities
Sucharitha Sarananaga
ssarananaga at marvell.com
Mon Aug 31 12:23:20 CEST 2026
Update the virtio cryptodev RSA asymmetric capability to use
rsa_capa and report supported padding schemes and primary hash
algorithms.
Advertise RTE_CRYPTO_RSA_PADDING_NONE and
RTE_CRYPTO_RSA_PADDING_PKCS1_5 via pad_types, and MD5, SHA-1,
SHA-224, SHA-256, and SHA-512 via hash_algos to match PKCS#1
v1.5 hash support in the PMD.
Signed-off-by: Sucharitha Sarananaga <ssarananaga at marvell.com>
---
.../virtio/virtio_crypto_capabilities.h | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/virtio/virtio_crypto_capabilities.h b/drivers/crypto/virtio/virtio_crypto_capabilities.h
index 1b26ff6720..7d5eea1f9d 100644
--- a/drivers/crypto/virtio/virtio_crypto_capabilities.h
+++ b/drivers/crypto/virtio/virtio_crypto_capabilities.h
@@ -58,11 +58,20 @@
(1 << RTE_CRYPTO_ASYM_OP_VERIFY) | \
(1 << RTE_CRYPTO_ASYM_OP_ENCRYPT) | \
(1 << RTE_CRYPTO_ASYM_OP_DECRYPT)), \
- {.modlen = { \
- .min = 1, \
- .max = 1024, \
- .increment = 1 \
- }, } \
+ .rsa_capa = { \
+ .modlen = { \
+ .min = 1, \
+ .max = 1024, \
+ .increment = 1 \
+ }, \
+ .pad_types = ((1 << RTE_CRYPTO_RSA_PADDING_NONE) | \
+ (1 << RTE_CRYPTO_RSA_PADDING_PKCS1_5)), \
+ }, \
+ .hash_algos = (RTE_BIT64(RTE_CRYPTO_AUTH_MD5) | \
+ RTE_BIT64(RTE_CRYPTO_AUTH_SHA1) | \
+ RTE_BIT64(RTE_CRYPTO_AUTH_SHA224) | \
+ RTE_BIT64(RTE_CRYPTO_AUTH_SHA256) | \
+ RTE_BIT64(RTE_CRYPTO_AUTH_SHA512)), \
} \
}, } \
}
--
2.54.0
More information about the dev
mailing list