From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690083.outbound.protection.outlook.com [40.107.69.83]) by dpdk.org (Postfix) with ESMTP id 0CD7B1B55A for ; Tue, 26 Jun 2018 13:54:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=77m12D3TlydAPDIWbLxoJFkBHuewt0wFa6ntyuYM6co=; b=I4jjwLpVohMpiKITfmRksqc4i9EeAbcxV9dSxPgcXwkvd3PVM0Y/8iSwVkIyOER5RMn6x/SMkd9yiF7YoKQ7MoOeCodJakpb1hpHaOv92QVIuGdcX+kUUDlfy5GDsdAgJCJkjil5dCj3g8CW4Rwtbcqem+h/RhC0kTFwjU4fyWI= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3699.namprd07.prod.outlook.com (52.132.102.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.20; Tue, 26 Jun 2018 11:54:11 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f55a:7354:8d2f:cf0b]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f55a:7354:8d2f:cf0b%4]) with mapi id 15.20.0884.025; Tue, 26 Jun 2018 11:54:11 +0000 From: "Verma, Shally" To: "De Lara Guarch, Pablo" CC: "Trahe, Fiona" , "akhil.goyal@nxp.com" , "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Sahu, Sunila" , "Gupta, Ashish" Thread-Topic: [PATCH v3 1/6] lib/cryptodev: add asymmetric algos in cryptodev Thread-Index: AQHUBISJn4XNb0gGrEGR0hFud4zi3qRsbcXQgAUhuACAAOdpQA== Date: Tue, 26 Jun 2018 11:54:10 +0000 Message-ID: References: <1526450713-17299-1-git-send-email-shally.verma@caviumnetworks.com> <1526450713-17299-2-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3699; 7:aqLhA+9zDucgfhtwkOaLa/I8PYjbmRJs6FdSELMilT0dhg5DzMgglfHFBfRfhX1LaMUGFw7bq7sy5U/bwJ3OMlIGs/aEkGcMFakRurc7TKXG06FVWF8RumD/i7gCRXeEWcObnB04FYtmWfB0HmNOotNe2jZunMhOFu0yXs5ATJlcoSF2mFxUtDQJIbrT2GSGZ8oFOJjqHhz+xxQ6/zem+DZzdsGFn7XOckZLcxuuBsGyrRQc/wTb4Cn5kgGdly71 x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(396003)(39860400002)(366004)(136003)(376002)(346002)(199004)(189003)(13464003)(25786009)(478600001)(8676002)(476003)(486006)(11346002)(256004)(446003)(6436002)(55016002)(66066001)(53936002)(74316002)(6246003)(107886003)(305945005)(7736002)(8936002)(81166006)(86362001)(2900100001)(6916009)(81156014)(105586002)(6116002)(3846002)(99286004)(5660300001)(93886005)(316002)(54906003)(68736007)(106356001)(2906002)(72206003)(26005)(7696005)(76176011)(229853002)(4326008)(9686003)(186003)(55236004)(97736004)(14454004)(102836004)(53546011)(6506007)(33656002)(5250100002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3699; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-correlation-id: 64de180e-d909-44a3-28fe-08d5db5b87e1 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3699; x-ms-traffictypediagnostic: CY4PR0701MB3699: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3699; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3699; x-forefront-prvs: 071518EF63 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: +cvuOhwL5+KuKq4oGDWRF1DwUMQ31qnRh4aeNm+k23n7Awx7YNZy0P72yeMGtLHimQi5kODrWhe/6tmOS+Y+C/8QQnkFkceKu6flX5BX/fY+UtVxbef/IJr9eIIx76N8J9J8sjSlxFun/s4i68hucTopLarfNftR4uMW98OugOamHos2fUTX1xdWWGhojagSi9iXjJSzb20RSLzQLUhBTo7dsc8LMfV6AAKheA3jlOdMRjyAEknmr7h/fndBTR5stB8uqL382merexhkC0a4XWjTKf9q2ioLt5RiZJhui0xcDyd1EP8OqQvckRAcu44KNZATPlO+Rzycs2nInENXVfNR9kZCrYVGOASO7zqoGCk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64de180e-d909-44a3-28fe-08d5db5b87e1 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jun 2018 11:54:10.9169 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3699 Subject: Re: [dpdk-dev] [PATCH v3 1/6] lib/cryptodev: add asymmetric algos in cryptodev 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, 26 Jun 2018 11:54:14 -0000 >-----Original Message----- >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] >Sent: 26 June 2018 03:04 >To: Verma, Shally >Cc: Trahe, Fiona ; akhil.goyal@nxp.com; dev@dpdk.or= g; Athreya, Narayana Prasad >; Sahu, Sunila = ; Gupta, Ashish >Subject: RE: [PATCH v3 1/6] lib/cryptodev: add asymmetric algos in cryptod= ev > >External Email > >Hi Shally, > >> -----Original Message----- >> From: Verma, Shally [mailto:Shally.Verma@cavium.com] >> Sent: Friday, June 22, 2018 4:39 PM >> To: De Lara Guarch, Pablo >> Cc: Trahe, Fiona ; akhil.goyal@nxp.com; >> dev@dpdk.org; Athreya, Narayana Prasad >> ; Sahu, Sunila >> ; Gupta, Ashish >> Subject: RE: [PATCH v3 1/6] lib/cryptodev: add asymmetric algos in crypt= odev >> >> Hi Pablo >> >> >-----Original Message----- >> >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] >> >Sent: 15 June 2018 14:10 >> >To: Verma, Shally >> >Cc: Trahe, Fiona ; akhil.goyal@nxp.com; >> >dev@dpdk.org; Athreya, Narayana Prasad >> >; Sahu, Sunila >> >; Gupta, Ashish >> >Subject: RE: [PATCH v3 1/6] lib/cryptodev: add asymmetric algos in >> >cryptodev >> > >> //snip >> >> > >> >... >> > >> >> +/** >> >> + * Asymmetric Cryptographic Operation. >> >> + * >> >> + * Structure describing asymmetric crypto operation params. >> >> + * >> >> + */ >> >> +struct rte_crypto_asym_op { >> >> + struct rte_cryptodev_asym_session *session; >> >> + /**< Handle for the initialised session context */ >> >> + >> > >> >Looking at the xform structure, it looks like a chain of xforms is poss= ible. >> >Looking at this union, this case wouldn't be possible, as only one item= from the >> union can be set. >> >> [Shally] xforms, which support chaining, would need to have op_type in t= heir >> respective xform struct. >> Example struct rte_crypto_dh_xform, where app can chain Deffie-hellman >> public and/or shared secret compute and DSA sign compute. >> >> +struct rte_crypto_dh_xform { >> + enum rte_crypto_asym_op_type type; >> + /**< Setup xform for key generate or shared secret compute */ and = DSA >> +xforms struct >> >> test_cryptodev_asym illustrates how to setup chained dh+dsa ops. > >Are you talking about test_dh_gen_kp? Because this is the only function >where I see that there is a chain of xforms. >In this case, both xforms are the same type (RTE_CRYPTO_ASYM_XFORM_DH), >and the operation only sets parameters for rte_crypto_dh_op_param. [Shally] Ya you right. Testapp illustrates chaining for dh public and priva= te key pair generation. Not DH followed by DSA. Currently, DH key pair generation was only identified requirement for chain= ing, so only that is illustrated. If other xforms are to be extended for ch= aining, then respective struct might need modification based on exact requirement. >I would expect that dh_op_param and dsa_op_param would need to be set, whi= ch couldn't be done. [Shally] No change would be required in either. if app want to DSA sign dat= a using internally generated DH private key, then PMD input DH params and s= etup DSA to use key generated by DH. In such case, since end operation is D= SA_SIGN, so app will enqueue only DSA op with op_type =3D DSA_SIGN and resp= ective dsa_op_param for processing. > >Thanks, >Pablo > >> >> Thanks >> Shally >> >> >> > >> //snip