From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Verma, Shally" Subject: Re: [PATCH v3 5/6] crypto/openssl: add asym crypto support Date: Tue, 3 Jul 2018 14:59:37 +0000 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "akhil.goyal@nxp.com" , "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Sahu, Sunila" , "Gupta, Ashish" To: "Trahe, Fiona" , "De Lara Guarch, Pablo" Return-path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700071.outbound.protection.outlook.com [40.107.70.71]) by dpdk.org (Postfix) with ESMTP id 7CE8A1BF16 for ; Tue, 3 Jul 2018 16:59:40 +0200 (CEST) In-Reply-To: <348A99DA5F5B7549AA880327E580B435895BAC50@IRSMSX101.ger.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >-----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@dpdk.= 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. Also= , So, made them switched to no-padding.=20 However, openssl PMD asym changes , as such, is on hold until it is moved t= hat to 1.1.0. So, we will submit PMD and testapp as a separate patches fro= m=20 Lib patch series.