DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Radu Nicolau <radu.nicolau@intel.com>
To: Sucharitha Sarananaga <ssarananaga@marvell.com>, <dev@dpdk.org>
Cc: <anoobj@marvell.com>, <gakhil@marvell.com>,
	<gmuthukrishn@marvell.com>, <fanzhang.oss@gmail.com>
Subject: Re: [RFC PATCH] crypto: add RSA-specific capability parameters
Date: Tue, 11 Aug 2026 15:02:18 +0100	[thread overview]
Message-ID: <7a291c7c-5c45-4bf7-95d9-3894711d181a@intel.com> (raw)
In-Reply-To: <20260731091146.602320-1-ssarananaga@marvell.com>


On 31-Jul-26 10:11 AM, Sucharitha Sarananaga wrote:
> The existing asymmetric capability structure reports generic
> modulus length and hash algorithm support, but it cannot
> describe RSA-specific parameters required by OAEP and PSS.
>
> RSA operations may support different padding schemes and MGF1
> hash algorithms independent of the primary hash algorithm.
> Applications currently have no standard way to discover these
> capabilities from a PMD.
>
> Add rsa_capa to report RSA modulus length, supported padding
> schemes, and MGF1 hash algorithms. Keep hash_algos for reporting
> primary digest support.
>
> Also clarify that the generic modlen field applies to other
> modulus-based transforms such as MODEXP, MODINV, DH, and DSA.
>
> Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
> ---
>   lib/cryptodev/rte_cryptodev.h | 42 +++++++++++++++++++++++++++++++++--
>   1 file changed, 40 insertions(+), 2 deletions(-)
>
> diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
> index 37a6a5e49b..e577dd8553 100644
> --- a/lib/cryptodev/rte_cryptodev.h
> +++ b/lib/cryptodev/rte_cryptodev.h
> @@ -157,6 +157,40 @@ struct rte_cryptodev_symmetric_capability {
>   	};
>   };
>   
> +/**
> + * RSA transform capability parameters.
> + *
> + * Used when rte_cryptodev_asymmetric_xform_capability::xform_type is
> + * RTE_CRYPTO_ASYM_XFORM_RSA. Advertises supported modulus lengths,
> + * MGF1 hash algorithms, and padding schemes.
> + *
> + * Primary hash algorithms for RSA operations (e.g. OAEP, PSS) are
> + * reported separately via hash_algos in
> + * rte_cryptodev_asymmetric_xform_capability.
> + */
> +struct rte_crypto_rsa_capa {
> +	struct rte_crypto_param_range modlen;
> +	/**< Supported RSA modulus length range, in bits.
> +	 * A min, max, or increment value of 0 means no limit is
> +	 * imposed for that field and the PMD default applies.
> +	 */
> +
> +	uint8_t pad_types;
> +	/**< Bitmask of supported RSA padding schemes.
> +	 * Each bit corresponds to enum rte_crypto_rsa_padding_type.
> +	 * A value of 0 means padding capability is not reported.

Here and below, would it make sense to add something like " and the PMD 
default may apply"?

Apart from that,

Acked-by: Radu Nicolau <radu.nicolau@intel.com>



  reply	other threads:[~2026-08-11 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31  9:11 [RFC PATCH] crypto: add RSA-specific capability parameters Sucharitha Sarananaga
2026-08-11 14:02 ` Radu Nicolau [this message]
2026-08-19  7:16 ` [PATCH v2] " Sucharitha Sarananaga

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=7a291c7c-5c45-4bf7-95d9-3894711d181a@intel.com \
    --to=radu.nicolau@intel.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=gmuthukrishn@marvell.com \
    --cc=ssarananaga@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox