From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 916ABA054D; Thu, 26 May 2022 13:29:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 319F340151; Thu, 26 May 2022 13:29:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 3732240150 for ; Thu, 26 May 2022 13:29:13 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24Q2AfhC003176; Thu, 26 May 2022 04:29:12 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3g9jap5dfg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 May 2022 04:29:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fCoibGwlGs8KoZcxhyJX1MHpSJ7dE2vmcL5Gq5V2bBvOv3WliL2kbTm/GPA6RakX6iVMuo4dOaD1tdi6Vz2vE7mpbO8/sU6BT1NbNnRB4ztPoQedHh9xNKwza1n4zbzsvParGnwwtRgnnjb+SiAjrfXwUB84w0adO7kZnqHrCLSrShFDZEmjxPyKMKoXmzn3TWyPv4ppcDLyHNtervKxp1RjBRYxcoYnIr2iWlWMVQQQw1KOJ9YEp0JdIa5z0TsuN8D6+zrm5c7x8dejMsVqnHffZIxn3kkwwjnm6LNQIS69pXw7AJRBmkb+3qfeKA4/PBV1dLvoFBCHI7uElUbW8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=85+dpH2JTM0BtGmnVxYkCtefGBWvug/Jzth7uRgB5xQ=; b=CiKhwLWQxvKx9sKpyVfSD4LlgdCycxedJFsmfqC2jGicDOd245bDkvDiwtOUXTstrW4ozYA7uuHy6nVCU9CgKsy60stnqlubndQ2SFtzZuWpx3wYZ2fKkJETppzjvkjWgKf4JZOOOO1q62t3DgO/64VC1lfb4n8AAvUkzpD3Z2prSSYjYI05d1Q0tiKmLxN0FIdQRj0GvcfrnrWZED5WUPap1kYn2ZCVGHhqUZ2PZtBcZclX75rfVyTK5z0DW/eJSo7NEDXrUWtLhT8RHgY0IQsdC5rJbuDG9isBmj+nbSYyW+Aqa10oVlaeOW6HFLZn6OnFuYZCbHeUvD2P9kRJcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=85+dpH2JTM0BtGmnVxYkCtefGBWvug/Jzth7uRgB5xQ=; b=urVd09ENLNjALKxGih8b96qc6dTIOCxcvXrrZsirmud3pzu5KLw9xOkeqnd4byrPguMJIHoNgPubY5La5MfykiukOZ7xK7NFtnyxL2w17GVfInC2Y+gNHgpbQx6zxupleUl+RUZ08sHsijh+dCFN/q6g0ylouvv2PjxN7TdrP9Y= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4777.namprd18.prod.outlook.com (2603:10b6:303:ec::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Thu, 26 May 2022 11:29:10 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f154:453d:893:f6ce]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f154:453d:893:f6ce%7]) with mapi id 15.20.5293.013; Thu, 26 May 2022 11:29:10 +0000 From: Akhil Goyal To: Arek Kusztal , "dev@dpdk.org" CC: "roy.fan.zhang@intel.com" Subject: RE: [EXT] [PATCH v2 07/14] cryptodev: add elliptic curve diffie hellman Thread-Topic: [EXT] [PATCH v2 07/14] cryptodev: add elliptic curve diffie hellman Thread-Index: AQHYcFmOEBEQKYbMIkCn+yXo7d+qR60xBb0Q Date: Thu, 26 May 2022 11:29:10 +0000 Message-ID: References: <20220525155324.9288-1-arkadiuszx.kusztal@intel.com> <20220525155324.9288-8-arkadiuszx.kusztal@intel.com> In-Reply-To: <20220525155324.9288-8-arkadiuszx.kusztal@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d74f24e2-eb8f-45be-9755-08da3f0af41a x-ms-traffictypediagnostic: CO1PR18MB4777:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RMiUgct1+AoOO6l2SHA9CZVdiZJGSia7+yZRfOLY8QYAOA10IFoqXcfpswdWZP0iOjFHfh3cli47a4KrCAH4OLwdNjfLZPC96PBhIHLe23lZmwWngq8nIyB9iN94S9gNvZIk35mBYFVkRJyEiSjAZg832eRCDrZmFhjQ6SxW+nYG48aou//P+ithDvH3Om3Ps2Afb7k6QyNL1ySSFPLPSH4Re+xT/7QOAjfzw+4yi27M8zVhDYj170Pru0htYd+PEMI5L5jGknWNFFiljWh4/vYh9LFFD4JehjqUejD06ZQGopFrtY4ACykHUUflRaun2rhjngH8S2BiIKqIQOs4Ydy3qh4v8yfcid9A9KOuWi5Ln8AMPGVm1Z1E8mvCexbj/yd7VFeGKQD6ojJgkvClHA6nKnFuQ4Tp2yNQJwcjsgDpN4SQe5AkASbksogwsvZ76uJX/hi8X/ns5HKR0Br1zZziILVNfQ3i+3knVBBEKko9+bzPX9pzeGTpX1GzNXxpeOv1oNw5jWtdOhMFa4FK+vVvM0wLdVOGOicx3GCKQ++F4hGLLDJ+KjH4nZzm7mcoCDzByFKvbC888ibWhIDpUGE0sppkhl6ztBpchqAsJodFugwViowjV76kVRq0/vSo2ZKPTX4315hP3wrhZNOP/QFV1ww/RAwA1pnLBVeO1kGCdMZnheewmCveDK7Z3qTCR6vKOsan+jamzrUc0HbAIA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(2906002)(5660300002)(55016003)(122000001)(316002)(66556008)(66476007)(76116006)(66946007)(66446008)(64756008)(186003)(8676002)(4326008)(38100700002)(110136005)(55236004)(71200400001)(7696005)(6506007)(26005)(86362001)(33656002)(9686003)(38070700005)(52536014)(8936002)(508600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mVZVv/kAQwxwlRM0Z9mGAZgIXyWKsvX5eky3UqCHOeSgsEHkAD/HevZmiDh3?= =?us-ascii?Q?/mC/94VMSDm+lD+GsCwfmUP5E0szkJEcV8hJhdsQsRhhr0OW3DAKLYBYxii1?= =?us-ascii?Q?wzt/g+eUSNRRtuGu8jhiFIoeY4XcOBA/nGzluwAge8b+mlZtM81L2GIrClWS?= =?us-ascii?Q?lN3/CjrUE8TFmTgVXimLAkQUubvUsCwy1KCU7OEP0vdtMvrWkFxpJKLtKSSD?= =?us-ascii?Q?kbgnmRKcLMjFcs/BTwJePL1+UZDEoEY8cx5IB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SAqNzSEgwEKCc07fRW2Yx5vA3iJ03uF0Yd5Ra/l?= =?us-ascii?Q?uyutvPQ7zk50aO2WzV70lPi06WfbLq7tNbBLQdbFO/6/tjY2WGCe4j9YZoSv?= =?us-ascii?Q?n201DOGPluNBCbSzq/9X++3MLaSxWr5i9jFpfQxF+WEuUV26HbQXMGr0UZPv?= =?us-ascii?Q?7X54dxFT9cdZFBWUISHg06arV05k+uofLkHyo6xdbcioiTetQiU43rxxRC4X?= =?us-ascii?Q?UraUQo1XQIP4fiGEXnpzI4F2Rg6rkjmdhU0+vAU/gUrdni1jclXAqfY8/yw9?= =?us-ascii?Q?yvNuj41hkqW5xhTGIMHTzkkC/26CARbhV7gU1PKNbcoMHKaFczhqBa607ElP?= =?us-ascii?Q?SrFXiiQINB04OM8tf2YCUYN7HVQhgF/Whrv5ThFnOBe9sDKvdY0jut+xd/VA?= =?us-ascii?Q?U+VNGeqYKcU66OxVuBIzP8fW6/l8tMI42D3o/+6N/kdTW5ull/n22SnOwyf2?= =?us-ascii?Q?l1ZCW3Gau+pBSeCbV3WEgiBkfB2T6lpwg0U0ww3VEm082suGfEKFFwGYzPMO?= =?us-ascii?Q?7poO/l/HJhqlP6wkxaric1BxHJ+5ywY5uhYtGki8yuwLBWoMq71kK4goJM+S?= =?us-ascii?Q?ZYjE8CTIaA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d74f24e2-eb8f-45be-9755-08da3f0af41a X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2022 11:29:10.3484 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ottERWP7p3TEePI/3Az2QJHSt1Z4rcaCHWYblybhIKjD2K4zGfytf+HFY17jhX+paghtUa1nWmRSx8Dx5IYptg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4777 X-Proofpoint-GUID: u51nz13dutu_UglmzpLudchAU6eEhRlh X-Proofpoint-ORIG-GUID: u51nz13dutu_UglmzpLudchAU6eEhRlh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-26_06,2022-05-25_02,2022-02-23_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > - Added elliptic curve Diffie-Hellman parameters. > Point multiplication allows the user to process every phase of > ECDH, but for phase 1, user should not really care about the generator. > The user does not even need to know what the generator looks like, > therefore setting ec xform would make this work. >=20 > Signed-off-by: Arek Kusztal > --- > lib/cryptodev/rte_crypto_asym.h | 38 > ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) >=20 > diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_a= sym.h > index ffb0e8ed17..0dab7c0593 100644 > --- a/lib/cryptodev/rte_crypto_asym.h > +++ b/lib/cryptodev/rte_crypto_asym.h > @@ -112,6 +112,8 @@ enum rte_crypto_asym_xform_type { > /**< Elliptic Curve Digital Signature Algorithm */ > RTE_CRYPTO_ASYM_XFORM_ECPM, > /**< Elliptic Curve Point Multiplication */ > + RTE_CRYPTO_ASYM_XFORM_ECDH, > + /**< Elliptic Curve Diffie Hellman */ > RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END > /**< End of list */ > }; > @@ -407,6 +409,42 @@ struct rte_crypto_dh_op_param { > }; >=20 > /** > + * Elliptic Curve Diffie-Hellman Operations params. > + * @note: Note missing? > + */ > +struct rte_crypto_ecdh_op_param { > + enum rte_crypto_asym_ke_type op_type; > + /**< Key exchange operation type */ > + rte_crypto_uint priv_key; > + /**< > + * Output - generated private key, when xform type is > + * RTE_CRYPTO_ASYM_KE_PRIVATE_KEY_GENERATE. > + * > + * Input - private key, when xform type is one of: > + * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, > + * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE. > + * > + * In case priv_key.length is 0 and xform type is set with > + * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, CSRNG capable > + * device will generate private key and use it for public > + * key generation. > + */ You added the above CSRNG thing in pub key for DH and here in priv key? > + struct rte_crypto_ec_point pub_key; > + /**< > + * Output - generated public key, when xform type is > + * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE. > + * > + * Input - peer's public key, when xform type is > + * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE. Shouldn't this be for both RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE and=20 RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > + */ > + struct rte_crypto_ec_point shared_secret; > + /**< > + * Output - calculated shared secret when xform type is > + * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE. > + */ > +}; > + > +/** > * DSA Operations params > * > */ > -- > 2.13.6