From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 0F97F1BE87 for ; Tue, 3 Jul 2018 17:12:04 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2018 08:11:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,304,1526367600"; d="scan'208";a="213106408" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga004.jf.intel.com with ESMTP; 03 Jul 2018 08:11:49 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.148]) by IRSMSX109.ger.corp.intel.com ([169.254.13.225]) with mapi id 14.03.0319.002; Tue, 3 Jul 2018 16:11:30 +0100 From: "Trahe, Fiona" To: "Verma, Shally" , "De Lara Guarch, Pablo" CC: "akhil.goyal@nxp.com" , "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Sahu, Sunila" , "Gupta, Ashish" Thread-Topic: [PATCH v3 5/6] crypto/openssl: add asym crypto support Thread-Index: AQHT7NwQexWmg1KfOU6id1qa68jy/aR93z1w///zM4CAABMxkA== Date: Tue, 3 Jul 2018 15:11:29 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435895BACB9@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> <348A99DA5F5B7549AA880327E580B435895BAC50@IRSMSX101.ger.corp.intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDI0NzAzZTUtMmU4Yy00NmQ2LWJjNzAtNzIwMDBhOTcxNGU1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiREptRFNMTVRYandqcXlkY0FkKzBkSzVXXC9Sa2t5OXRxTjVhcnh3SjNBckhBXC82VzlXOU9ZcGp2aTFOVXJVNlwvNyJ9 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 15:12:05 -0000 > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Tuesday, July 3, 2018 4:00 PM > To: Trahe, Fiona ; De Lara Guarch, Pablo > Cc: akhil.goyal@nxp.com; dev@dpdk.org; Athreya, Narayana Prasad > ; Sahu, Sunila ; Gupta, Ashish > > Subject: RE: [PATCH v3 5/6] crypto/openssl: add asym crypto support >=20 >=20 >=20 > >-----Original Message----- > >From: Trahe, Fiona [mailto:fiona.trahe@intel.com] > >Sent: 03 July 2018 20:21 > >To: Verma, Shally ; De Lara Guarch, Pablo > > >Cc: akhil.goyal@nxp.com; dev@dpdk.org; Athreya, Narayana Prasad > ; Sahu, Sunila > >; Gupta, Ashish ; Trahe= , Fiona > > >Subject: RE: [PATCH v3 5/6] crypto/openssl: add asym crypto support > > > >External Email > > > >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@dpd= k.org; > >> pathreya@caviumnetworks.com; Sunila Sahu ; Ashish Gupta > >> > >> 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 > >> 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? > > > >//snip// > Yes. It will because we were not claiming OAEP/PSS support in 1st cut. Al= so, 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. >=20 [Fiona] ok. I'd suggest leaving out the "pad =3D " in the 2 fall-through ca= ses. And expanding comment to=20 "Not supported yet, so fall-through" for more clarity.