[dpdk-dev] [PATCH v3 5/6] crypto/openssl: add asym crypto support

Trahe, Fiona fiona.trahe at intel.com
Tue Jul 3 16:50:40 CEST 2018


Hi Shally,

> -----Original Message-----
> From: Shally Verma [mailto:shally.verma at caviumnetworks.com]
> Sent: Wednesday, May 16, 2018 7:05 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
> Cc: Trahe, Fiona <fiona.trahe at intel.com>; akhil.goyal at nxp.com; dev at dpdk.org;
> pathreya at caviumnetworks.com; Sunila Sahu <sunila.sahu at caviumnetworks.com>; Ashish Gupta
> <ashish.gupta at caviumnetworks.com>
> Subject: [PATCH v3 5/6] crypto/openssl: add asym crypto support
> 
> Add asymmetric crypto operation support in openssl PMD.
> Current list of supported asym xforms:
> * RSA
> * DSA
> * Deffie-hellman
> * Modular Operations
> 
> changes from v2:
> - Update the pmd capability as per new capability structure
> 
> changes from v1:
> - resolve new line error in dod/guides/cryptodevs/openssl.rst
> 
> Signed-off-by: Shally Verma <shally.verma at caviumnetworks.com>
> Signed-off-by: Sunila Sahu <sunila.sahu at caviumnetworks.com>
> Signed-off-by: Ashish Gupta <ashish.gupta at caviumnetworks.com>


//snip//
> +/* process rsa operations */
> +static int process_openssl_rsa_op(struct rte_crypto_op *cop,
> +				  struct openssl_asym_session *sess)
> +{
> +	int ret = 0;
> +	struct rte_crypto_asym_op *op = cop->asym;
> +	RSA *rsa = sess->u.r.rsa;
> +	uint32_t pad = (op->rsa.pad);
> +
> +	switch (pad) {
> +	case RTE_CRYPTO_RSA_PKCS1_V1_5_BT1:
> +	case RTE_CRYPTO_RSA_PKCS1_V1_5_BT2:
> +		pad = RSA_PKCS1_PADDING;
> +		break;
> +	case RTE_CRYPTO_RSA_PADDING_PSS:
> +		pad = RSA_PKCS1_PSS_PADDING;
> +		/* fall through */
> +	case RTE_CRYPTO_RSA_PADDING_OAEP:
> +		pad = RSA_PKCS1_OAEP_PADDING;
> +		/* fall through */
> +	default:
> +		pad = RSA_NO_PADDING;
> +		break;
[Fiona] Maybe I'm missing something, but won't this fall through to RSA_NO_PADDING for OAEP and PSS cases?
 
//snip//



More information about the dev mailing list