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

Verma, Shally Shally.Verma at cavium.com
Tue Jul 3 17:14:13 CEST 2018



>-----Original Message-----
>From: Trahe, Fiona [mailto:fiona.trahe at intel.com]
>Sent: 03 July 2018 20:41
>To: Verma, Shally <Shally.Verma at cavium.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
>Cc: akhil.goyal at nxp.com; dev at dpdk.org; Athreya, Narayana Prasad <NarayanaPrasad.Athreya at cavium.com>; Sahu, Sunila
><Sunila.Sahu at cavium.com>; Gupta, Ashish <Ashish.Gupta at cavium.com>
>Subject: RE: [PATCH v3 5/6] crypto/openssl: add asym crypto support
>
>External Email
>
//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//
>> Yes. It will because we were not claiming OAEP/PSS support in 1st cut. Also, So, made them switched to
>> no-padding.
>> However, openssl PMD asym changes , as such, is on hold until it is moved that to 1.1.0. So, we will
>> submit  PMD and testapp as a separate patches from
>> Lib patch series.
>>
>[Fiona] ok. I'd suggest leaving out the "pad = " in the 2 fall-through cases. And expanding comment to
>"Not supported yet, so fall-through" for more clarity.
All right. noted.

Thanks
Shally


More information about the dev mailing list