From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 1CD931B42D for ; Tue, 3 Jul 2018 16:50:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2018 07:50:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,303,1526367600"; d="scan'208";a="54814020" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by orsmga006.jf.intel.com with ESMTP; 03 Jul 2018 07:50:42 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.148]) by IRSMSX108.ger.corp.intel.com ([169.254.11.139]) with mapi id 14.03.0319.002; Tue, 3 Jul 2018 15:50:41 +0100 From: "Trahe, Fiona" To: Shally Verma , "De Lara Guarch, Pablo" CC: "akhil.goyal@nxp.com" , "dev@dpdk.org" , "pathreya@caviumnetworks.com" , Sunila Sahu , Ashish Gupta , "Trahe, Fiona" Thread-Topic: [PATCH v3 5/6] crypto/openssl: add asym crypto support Thread-Index: AQHT7NwQexWmg1KfOU6id1qa68jy/aR93z1w Date: Tue, 3 Jul 2018 14:50:40 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435895BAC50@IRSMSX101.ger.corp.intel.com> References: <1526450713-17299-1-git-send-email-shally.verma@caviumnetworks.com> <1526450713-17299-6-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: <1526450713-17299-6-git-send-email-shally.verma@caviumnetworks.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTE5ZDM0YTctOTZmNi00MzJhLTg5ZTctNGJkMzA3NGRjMjZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidUJhcnhCSkRFK2FjbjhjY1dVZXdhRWxkV2J6V0k5WDNvMnpUYlROZjBtMUNSTW81SUNWcFgzbmVZUExRU3Q2dyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 5/6] crypto/openssl: add asym crypto support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 14:50:45 -0000 Hi Shally, > -----Original Message----- > From: Shally Verma [mailto:shally.verma@caviumnetworks.com] > Sent: Wednesday, May 16, 2018 7:05 AM > To: De Lara Guarch, Pablo > Cc: Trahe, Fiona ; akhil.goyal@nxp.com; dev@dpdk.o= rg; > pathreya@caviumnetworks.com; Sunila Sahu = ; Ashish Gupta > > Subject: [PATCH v3 5/6] crypto/openssl: add asym crypto support >=20 > Add asymmetric crypto operation support in openssl PMD. > Current list of supported asym xforms: > * RSA > * DSA > * Deffie-hellman > * Modular Operations >=20 > changes from v2: > - Update the pmd capability as per new capability structure >=20 > changes from v1: > - resolve new line error in dod/guides/cryptodevs/openssl.rst >=20 > Signed-off-by: Shally Verma > Signed-off-by: Sunila Sahu > Signed-off-by: Ashish Gupta //snip// > +/* process rsa operations */ > +static int process_openssl_rsa_op(struct rte_crypto_op *cop, > + struct openssl_asym_session *sess) > +{ > + int ret =3D 0; > + struct rte_crypto_asym_op *op =3D cop->asym; > + RSA *rsa =3D sess->u.r.rsa; > + uint32_t pad =3D (op->rsa.pad); > + > + switch (pad) { > + case RTE_CRYPTO_RSA_PKCS1_V1_5_BT1: > + case RTE_CRYPTO_RSA_PKCS1_V1_5_BT2: > + pad =3D RSA_PKCS1_PADDING; > + break; > + case RTE_CRYPTO_RSA_PADDING_PSS: > + pad =3D RSA_PKCS1_PSS_PADDING; > + /* fall through */ > + case RTE_CRYPTO_RSA_PADDING_OAEP: > + pad =3D RSA_PKCS1_OAEP_PADDING; > + /* fall through */ > + default: > + pad =3D 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? =20 //snip//