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 E977CA04FF; Tue, 24 May 2022 14:12:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65FDE42685; Tue, 24 May 2022 14:12:28 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 2660042685 for ; Tue, 24 May 2022 14:12:27 +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 24O99ldQ005598; Tue, 24 May 2022 05:12:26 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3g8vg48k49-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 05:12:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oFIiX7AIRsL5ZmUrE9GsFZu/uJUPl0YBQZfIsIslD2lEfpHIsK2ZgrpCiQBd5zx8mkuOcXWkCSFuXaaQa3IZvChsVZJA+9CRBzddaF9b4d/r7D3PwLIt8Ab4gMMTJtyHb1JE3/IJsCIQNKW1fTjp6FlJJ0QyS09xzdk0S8EdEcaYLhniXAFLbmeas+K+C7oJnNs945+pOUa0nMF4e71AvWiAsFBHY8teMdMsU2o+fQ7KKi2FDGqPvGRVMfpuWiYAs1yteFcul3UvYnNJRSPDuXtS7bFAHW2UgkAzngK6ikkATsYJyLpsiCWPv+rZJXoBaImZnPkJsj0o1myiIJD2ow== 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=88VJjKzOYryDT9yzOp0nNgt7KK+oDGaFP9/PyvJuOVE=; b=KDes+ysjlGlPEckK92A0DQVjdk85olj/QH3jo/5j6Px0gwBJ6gwD6WjNGFYQ9OCuybOfFprNCCTR4wFO0RDu0iQ4LqHvarB4XZ4qVfERpA/nV+eP5SBHmWWCEvEcBUKxfs0R4mpHC/xCkawWSLgsTY+YCvNMjgFdnUtTVPTaPi86xCK1X7U6j0s0pxi5W48p2VyzOpCc669B9gX0Uz7bbUEGq0lTVmR4Ncty+6ezXggBZ8amWTyQVCgZv7ohK2cXCjz8mjQRDVh2VdV2nP3Dt1I357cT8KktTUMN5OmT/wtHN5I19QZA0eKccBKMLlCXRNa1yPcp/qObsVezC1PNyw== 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=88VJjKzOYryDT9yzOp0nNgt7KK+oDGaFP9/PyvJuOVE=; b=NJMgo7RYGlDHT5nuNChcbmzc9i9UqaXgf70CKVMghzphNgF1TVBTDX3VUzx1UL7n1T3ntIX8Jd0zvjw1MevOgt8C0rnrfO7z/xo1ff57mYfx3HBGhXEMS0oIp2DPWu6sQZtTDSJKqpHvp2GizC1RWQoyL8lg2c5NPgwSSjjLdhA= Received: from PH0PR18MB4491.namprd18.prod.outlook.com (2603:10b6:510:e6::13) by DM6PR18MB2585.namprd18.prod.outlook.com (2603:10b6:5:15e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Tue, 24 May 2022 12:12:24 +0000 Received: from PH0PR18MB4491.namprd18.prod.outlook.com ([fe80::b065:32c0:f517:f85a]) by PH0PR18MB4491.namprd18.prod.outlook.com ([fe80::b065:32c0:f517:f85a%4]) with mapi id 15.20.5293.013; Tue, 24 May 2022 12:12:24 +0000 From: Akhil Goyal To: Arek Kusztal , "dev@dpdk.org" CC: Anoob Joseph , "roy.fan.zhang@intel.com" Subject: RE: [EXT] [PATCH 21/40] cryptodev: add public key verify option Thread-Topic: [EXT] [PATCH 21/40] cryptodev: add public key verify option Thread-Index: AQHYbBe0q67gnZe620aujYTTDIDlf60t9eMw Date: Tue, 24 May 2022 12:12:24 +0000 Message-ID: References: <20220520055445.40063-1-arkadiuszx.kusztal@intel.com> <20220520055445.40063-22-arkadiuszx.kusztal@intel.com> In-Reply-To: <20220520055445.40063-22-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: ac9a889a-8a53-4b41-8fff-08da3d7ea94f x-ms-traffictypediagnostic: DM6PR18MB2585: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: iFsmLamJZBNObS2MzCck/qIwvm2vrKHk9cacllQTSwvFfr3+fIKuBNAJiVYVwqwqtpljO2d/wXeh/114DLqN+jfU/RTkh6fAKUV6s5Npw5A/TvPTFcNGJXLcFof50cxS2gtupnKB2ddBZ7Nu5nGGtr8xBUsUlDVyCGtUzICyIrv4Dwo6ANDbEgzezQ16AH0+eF4ZCw59JvvSXFN+QeBXglsdHeG7APy6CB0iwOdZfgHgIIZeAHRifCMVS7I9M6F+FlunXN6XaInDM0zy/xnP8G1FsMuvuzm0zo8Dx+WKysLQDwFIIDwDsEpwkRrXUD9tf4KX3X0uF/WIcWfMOTVBjSPrl0+3BuDPIik2cET5R02SHip9zgU5sW7jsnHJbJqzRKIbYaRJCN/NOcCu+O35d0nP5qa3w1jVFNIkqkKbxH0xaRzvaOGiLf2SQe+VHX0M82M2OU/UIKT++LlKYEfbBF3xVDE74qJttG7g/GZR+4I5vRm1OfDLNk5wC6/fGhcg4AnQ9t9frL8CHGkwhj96MRSV8psoU6S5KKXzS0ko0jaJIgE6zHf+w/SnEhM0c2f1mTtR37gNfrabf/9TEKpNSnSBbQM4O1t07IY2Ly2f04fYT0fVp6N/NMHJh9prZAhMNE5UB8EhcAP855ClVniASMKolGZm9r1XfCVwpY5CH0uPeAP1i6ocYoCR6qh47udynStpujNfd3caGdhEG5fX9w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4491.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(38070700005)(316002)(38100700002)(54906003)(110136005)(9686003)(86362001)(66946007)(66556008)(66446008)(64756008)(4326008)(122000001)(76116006)(8676002)(66476007)(26005)(55016003)(7696005)(52536014)(83380400001)(33656002)(6506007)(2906002)(8936002)(508600001)(55236004)(15650500001)(186003)(5660300002)(71200400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZN1scWxeDbANuO1PDNhsl6KUHbDWftAW0XODBnxjPtrHqSSkQ4pel+Mo4aaM?= =?us-ascii?Q?J2fE/fsd3UjxZ5JaIwGSm+y4YwfuXXTgxSbiA83JNBFoDTGHFTme/PCRM/kE?= =?us-ascii?Q?oFVU4ybkpEU0BfCJhbvuktHuqve4JKTPcfua/oUB2qZAzRVlMTgXXa0A7zop?= =?us-ascii?Q?6KpX98Visei6NnxvpJFZAF9sx+JaiuvjTbIx8uZgSieJfkSIw2ERX2Bf5LjB?= =?us-ascii?Q?mr8dnv1qQrvA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FwNJn?= =?us-ascii?Q?cFLlZ4r1uJ7LJ0Zc6uI89kc579QHQxeHBe9PcVja69O3FM3hjpPSSsGLAk9c?= =?us-ascii?Q?jJdNUxse0XjDPzrzA/EV8Z8RAnvxeguLdUzjG5tPugGuzLWYogr8Li++66Zy?= =?us-ascii?Q?h8mVndRPwNO60ifQgxphi8zE8hGu+SKPeu2rcJmm6BCQnhiin1dOb1v0wmmJ?= =?us-ascii?Q?qpKR0Z0MC5HeBpfN+mvryDxJ2UBUpVWVJgY5bTfgkdBMj7ynSiL5WDcb3wKW?= =?us-ascii?Q?9toA1vD0CoARFyfQrRbq98JNlUVKE+VtwE7+f/hCF2VdKQJWZl586YQ1b9IS?= =?us-ascii?Q?iKdPRPQEt/BeXYFxwVLuA44NvObQSv77Hbo/EPn31ggsX4FNIutdmZeemGHl?= =?us-ascii?Q?PiT9VEoYtxzGEI4Oyuy8txb5MKvAH4tvsU06pFGvUdemzIvjyeusgl+Nzo7x?= =?us-ascii?Q?+SjVx1jAMg6h2Q4Ko9qncfqmi30gAhSRV9LUSvl89Da2eScdGSV+gEdEccoL?= =?us-ascii?Q?RTPueCtmOzgIhtLsyH+JsJaPv/zzhyOMfMzqacIpWU86k96EzpUPkNYt/Eef?= =?us-ascii?Q?C0FCGMhCdsC0jfWXY985PCs+LncJV3UMXKlcglNarDHkD4VWoQ406/X0WOcF?= =?us-ascii?Q?1D0U2Bx6Ag=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: PH0PR18MB4491.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac9a889a-8a53-4b41-8fff-08da3d7ea94f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2022 12:12:24.1771 (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: EJ5OEQMRnoRZCMGuwqd4o1ghHqO5AzF45K7sCy9mUnerUiBjh0fiQ05A1paSD1GOscr4zs6uGHhEhclRxw86VQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB2585 X-Proofpoint-ORIG-GUID: eF6mdfo4BWu4TNiQ7ynk9nLzyhYqJIBL X-Proofpoint-GUID: eF6mdfo4BWu4TNiQ7ynk9nLzyhYqJIBL 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-24_06,2022-05-23_01,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 key exchange public key verify option. > For some elliptic curves public point in DH exchange > needs to be checked, if it lays on the curve. > Modular exponentiation needs certain checks as well, though > mathematically much easier. > This commit adds verify option to asym_op operations. >=20 > Signed-off-by: Arek Kusztal > --- > lib/cryptodev/rte_crypto_asym.h | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_a= sym.h > index 09edf2ac3d..73ff9ff815 100644 > --- a/lib/cryptodev/rte_crypto_asym.h > +++ b/lib/cryptodev/rte_crypto_asym.h > @@ -110,8 +110,10 @@ enum rte_crypto_asym_ke_type { > /**< Private Key generation operation */ > RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, > /**< Public Key generation operation */ > - RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > + RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE, > /**< Shared Secret compute operation */ > + RTE_CRYPTO_ASYM_OP_DH_KEY_VERIFY > + /**< Public Key Verification */ Shouldn't this be RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_VERIFY ?? > }; >=20 > /** > @@ -397,6 +399,10 @@ struct rte_crypto_dh_op_param { > * For ECDH it is a point on the curve. > * Output for RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE > * Input for RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > + * > + * VERIFY option can be used only for elliptic curve > + * point validation, for FFDH (DH) it is user's reponsibility > + * to check the public key accordingly. What is expected from the user? Please be specific. Add reference to the ke_type for which this comment id valid. > */ > union { > rte_crypto_uint shared_secret; > -- > 2.13.6