From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 264E92BB8 for ; Mon, 29 May 2017 16:51:15 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 May 2017 07:51:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,415,1491289200"; d="scan'208";a="92597835" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by orsmga004.jf.intel.com with ESMTP; 29 May 2017 07:51:13 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.242]) by IRSMSX108.ger.corp.intel.com ([169.254.11.133]) with mapi id 14.03.0319.002; Mon, 29 May 2017 15:51:12 +0100 From: "Trahe, Fiona" To: Umesh Kartha CC: "dev@dpdk.org" , Jerin Jacob , Balasubramanian Manoharan , Ram Kumar , Murthy Nidadavolu , "Doherty, Declan" , "De Lara Guarch, Pablo" , "Trahe, Fiona" Thread-Topic: [RFC PATCH v2 1/3] cryptodev: added asymmetric algorithms Thread-Index: AQHSylNB6CS41jndQUmTIE8MZjbIeaIFQ1PwgAD3yoCABULeQA== Date: Mon, 29 May 2017 14:51:11 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B4358920B3C5@IRSMSX101.ger.corp.intel.com> References: <1490177802-13398-1-git-send-email-Umesh.Kartha@caviumnetworks.com> <1494506132-23107-1-git-send-email-Umesh.Kartha@caviumnetworks.com> <1494506132-23107-2-git-send-email-Umesh.Kartha@caviumnetworks.com> <348A99DA5F5B7549AA880327E580B435891FCF16@IRSMSX101.ger.corp.intel.com> <20170526071822.GA28794@ukw0rk.in.caveonetworks.com> In-Reply-To: <20170526071822.GA28794@ukw0rk.in.caveonetworks.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC PATCH v2 1/3] cryptodev: added asymmetric algorithms 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: Mon, 29 May 2017 14:51:16 -0000 Hi Umesh, > -----Original Message----- > From: Umesh Kartha [mailto:Umesh.Kartha@caviumnetworks.com] > Sent: Friday, May 26, 2017 8:18 AM > To: Trahe, Fiona > Cc: dev@dpdk.org; Jerin Jacob ; Bala= subramanian Manoharan > ; Ram Kumar ;= Murthy > Nidadavolu ; Doherty, Declan ; De Lara > Guarch, Pablo > Subject: Re: [RFC PATCH v2 1/3] cryptodev: added asymmetric algorithms >=20 > Hi Fiona, >=20 >=20 > On Thu, May 25, 2017 at 04:00:42PM +0000, Trahe, Fiona wrote: > > Hi Umesh, > > > > > > > -----Original Message----- > > > From: Umesh Kartha [mailto:Umesh.Kartha@caviumnetworks.com] > > > Sent: Thursday, May 11, 2017 1:36 PM > > > To: dev@dpdk.org > > > Cc: Jerin Jacob ; Balasubramania= n Manoharan > > > ; Ram Kumar ; Murthy > > > Nidadavolu ; Doherty, Declan ; De > Lara > > > Guarch, Pablo ; Trahe, Fiona > > > Subject: [RFC PATCH v2 1/3] cryptodev: added asymmetric algorithms > > > > > > Added asymmetric xform structures, operation definitions, operation > > > parameters. Added asymmetric algorithms RSA, DH, ECDH, DSA, ECDSA, > > > MODEXP, FECC, MOD-INVERSE. Added curves (all curves supported by > > > libcrypto as of now). > > > > > > Signed-off-by: Umesh Kartha > > > --- > > > lib/librte_cryptodev/rte_crypto_asym.h | 1124 ++++++++++++++++++++++= ++++++++++ > > > 1 file changed, 1124 insertions(+) > > > create mode 100644 lib/librte_cryptodev/rte_crypto_asym.h > > > > > > diff --git lib/librte_cryptodev/rte_crypto_asym.h lib/librte_cryptode= v/rte_crypto_asym.h > > > new file mode 100644 > > > index 0000000..36a8b4f > > > --- /dev/null > > > +++ lib/librte_cryptodev/rte_crypto_asym.h > > > @@ -0,0 +1,1124 @@ > > > +/* > > > + * BSD LICENSE > > > + * > > > + * Copyright (C) Cavium networks Ltd. 2017. > > > + * > > > + * Redistribution and use in source and binary forms, with or with= out > > > + * modification, are permitted provided that the following conditi= ons > > > + * are met: > > > + * > > > + * * Redistributions of source code must retain the above copyri= ght > > > + * notice, this list of conditions and the following disclaime= r. > > > + * * Redistributions in binary form must reproduce the above cop= yright > > > + * notice, this list of conditions and the following disclaime= r in > > > + * the documentation and/or other materials provided with the > > > + * distribution. > > > + * * Neither the name of Cavium Networks nor the names of its > > > + * contributors may be used to endorse or promote products der= ived > > > + * from this software without specific prior written permissio= n. > > > + * > > > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBU= TORS > > > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT N= OT > > > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNE= SS FOR > > > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPY= RIGHT > > > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCID= ENTAL, > > > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NO= T > > > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS O= F USE, > > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND = ON ANY > > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR = TORT > > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T= HE USE > > > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DA= MAGE. > > > + */ > > > + > > > +#ifndef _RTE_CRYPTO_ASYM_H_ > > > +#define _RTE_CRYPTO_ASYM_H_ > > > + > > > +/** > > > + * @file rte_crypto_asym.h > > > + * > > > + * RTE Definitions for Asymmetric Cryptography > > > + * > > > + * Defines asymmetric algorithms and modes, as well as supported > > > + * asymmetric crypto operations. > > > + */ > > > + > > > +#ifdef __cplusplus > > > +extern "C" { > > > +#endif > > > + > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include "rte_crypto_sym.h" > > > + > > > +typedef struct rte_crypto_xform_param_t { > > > + uint8_t *data; > > > + size_t length; > > > +} rte_crypto_xform_param; > > > + > > > +typedef struct rte_crypto_op_param_t { > > > + uint8_t *data; > > > + phys_addr_t phys_addr; > > > + size_t length; > > > +} rte_crypto_op_param; > > [Fiona] Are both above lengths in bytes ? > > > > > [Umesh] Yes, they are in bytes. Will add note for this to avoid any > confusion. [Fiona] Thanks. Re your v1 question re sessionless, I don't see a strong need to support se= ssions in Asymm crypto and we would probably initially just implement the SESSIONL= ESS case. For that case, the rte_crypto_xform_param_t would be used to provide data t= o the op. So providing a phys_addr would save an internal alloc and copy and= =20 be necessary to optimise performance.=20 What do you think of adding this? In that case the structs are identical, so can be combined.=20 Regards, Fiona