> Subject: [PATCH v4 0/8] cryptodev: add RSA-OAEP and RSA-PSS padding support > > The asymmetric crypto capability structure currently reports only a > generic modulus length and primary hash algorithm for RSA, with no > way for a PMD to advertise which padding schemes (NONE, PKCS#1 v1.5, > OAEP, PSS) or MGF1 hash algorithms it supports. Applications have no > standard way to discover this, and the OpenSSL PMD itself only > implements NONE and PKCS#1 v1.5 padding. > > This series first extends the capability API with a dedicated > rte_crypto_rsa_capa (modulus length, pad_types, mgf1_hash_algos, and > an explicit-PSS-salt flag), then updates the capability reporting in > the octeontx, cnxk, and openssl PMDs to use it. > > On top of that, it adds actual RSA-OAEP and RSA-PSS support to the > OpenSSL PMD: > - RSA-OAEP encrypt/decrypt, with configurable OAEP hash, MGF1 hash, > and an optional label, defaulting MGF1 to the OAEP hash when > unset. > - RSA-PSS sign/verify, with configurable hash, MGF1 hash, and salt > length (rte_crypto_rsa_padding::pss_saltlen), using a dedicated > EVP_PKEY_verify()-based verification path since PSS does not > support verify-recover. The PSS salt itself is always generated > internally by the PMD; an application-supplied salt > (rte_crypto_rsa_op_param::pss_salt, gated by the new > pss_explicit_salt capability bit) is introduced by this series > for future PMD support but is not yet implemented here, so it is > rejected with RTE_CRYPTO_OP_STATUS_INVALID_ARGS. > > Test coverage for both OAEP (encrypt/decrypt, default and custom > MGF1, with and without a label) and PSS (digest-length, maximum, and > zero-length salt) is added to the cryptodev asymmetric test suite. > > v2: > - Dropped the virtio and qat capability-advertisement patches from > this series; they will be sent separately. > - Documented the new rsa_capa/pss_salt fields in release_26_11.rst > (this series' target release) instead of the already-released > 26.07 notes. > > v3: > - Renamed rsa_oaep_supported()/rsa_pss_supported() test helpers to > is_rsa_oaep_supported()/is_rsa_pss_supported() and switched them > to bool. > - Minor OpenSSL PMD cleanups: hoisted the mgf1 variable declaration > and used memcpy() instead of rte_memcpy() for the OAEP label. > - Reworded a few patch subjects for consistency (app/test -> > test/crypto; shortened the OAEP/PSS OpenSSL commit titles). > > v4: > - Fixed a build error in the test suite by making rsa_pss_digest_sha256 > a const struct. > > Sucharitha Sarananaga (8): > crypto: add RSA-specific capability parameters > crypto/octeontx: advertise RSA PKCS#1 v1.5 padding support > crypto/cnxk: advertise RSA PKCS#1 v1.5 padding support > crypto/openssl: advertise RSA padding and hash capabilities > crypto/openssl: support RSA-OAEP > test/crypto: add RSA OAEP asymmetric test cases > crypto/openssl: support RSA-PSS > test/crypto: add RSA-PSS sign and verify test cases > > app/test/test_cryptodev_asym.c | 663 ++++++++++++++++++ > app/test/test_cryptodev_rsa_test_vectors.h | 317 +++++++++ > doc/guides/rel_notes/release_26_11.rst | 16 + > .../crypto/cnxk/cnxk_cryptodev_capabilities.c | 8 +- > .../octeontx/otx_cryptodev_capabilities.c | 8 +- > drivers/crypto/openssl/openssl_pmd_private.h | 10 + > drivers/crypto/openssl/rte_openssl_pmd.c | 367 ++++++++-- > drivers/crypto/openssl/rte_openssl_pmd_ops.c | 140 +++- > lib/cryptodev/rte_crypto_asym.h | 18 + > lib/cryptodev/rte_cryptodev.h | 50 +- > 10 files changed, 1535 insertions(+), 62 deletions(-) > Series Acked-by: Akhil Goyal <[email protected]>
Taken Ack from Radu on v2. Applied to dpdk-next-crypto @[email protected]: This patchset has a ABI break which was highlighted in deprecation notice in last release. Since this is an ABI break Cycle, I think we can merge this set if no objections.

