[dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add rsa priv key feature flag

Ayuj Verma ayverma at marvell.com
Mon Mar 18 19:05:39 CET 2019


Hi Akhil, Arek,

Sure, I'll rebase the patch and will send v3 along with doc changes.

Thanks and regards
Ayuj Verma

-----Original Message-----
From: Akhil Goyal <akhil.goyal at nxp.com> 
Sent: Sunday, March 17, 2019 11:17 PM
To: Ayuj Verma <ayverma at marvell.com>
Cc: arkadiuszx.kusztal at intel.com; fiona.trahe at intel.com; Shally Verma <shallyv at marvell.com>; Sunila Sahu <ssahu at marvell.com>; Kanaka Durga Kotamarthy <kkotamarthy at marvell.com>; Arvind Desai <adesai at marvell.com>; dev at dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add rsa priv key feature flag

Hi Ayuj,

On 2/27/2019 7:03 PM, Ayuj Verma wrote:
> Add feature flag to reflect RSA private key operation support using 
> quintuple (crt) or exponent type key. if PMD support both, then it 
> should set both.
>
> App should query cryptodev feature flag to check if Sign and Decryt 
> with CRT keys or exponent is supported, thus call operation with 
> relevant key type.
>
> Signed-off-by: Ayuj Verma <ayverma at marvell.com>
> Signed-off-by: Shally Verma <shallyv at marvell.com>
> ---
>   lib/librte_cryptodev/rte_cryptodev.c | 4 ++++
>   lib/librte_cryptodev/rte_cryptodev.h | 4 ++++
>   2 files changed, 8 insertions(+)
>
> diff --git a/lib/librte_cryptodev/rte_cryptodev.c 
> b/lib/librte_cryptodev/rte_cryptodev.c
> index 700973530..bb90ac939 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -486,6 +486,10 @@ rte_cryptodev_get_feature_name(uint64_t flag)
>   		return "CPU_ARM_CE";
>   	case RTE_CRYPTODEV_FF_SECURITY:
>   		return "SECURITY_PROTOCOL";
> +	case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP:
> +		return "RSA_PRIV_OP_KEY_EXP";
> +	case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT:
> +		return "RSA_PRIV_OP_KEY_QT";
>   	default:
>   		return NULL;
>   	}
> diff --git a/lib/librte_cryptodev/rte_cryptodev.h 
> b/lib/librte_cryptodev/rte_cryptodev.h
> index a0bbcf932..298b35217 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -438,6 +438,10 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
>   /**< Utilises ARM CPU Cryptographic Extensions */
>   #define	RTE_CRYPTODEV_FF_SECURITY			(1ULL << 16)
>   /**< Support Security Protocol Processing */
> +#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP		(1ULL << 17)
> +/**< Support RSA Private Key OP with exponent */
> +#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT		(1ULL << 18)
> +/**< Support RSA Private Key OP with CRT (quintuple) Keys */
I believe these feature flags should be explained a bit in the
documentation(doc/guides/cryptodevs/)
>   
>   
>   /**



More information about the dev mailing list