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 E8694A04FF; Tue, 24 May 2022 14:56:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CA2440140; Tue, 24 May 2022 14:56:27 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 95818400D6 for ; Tue, 24 May 2022 14:56:25 +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 24O99jO7005588; Tue, 24 May 2022 05:56:24 -0700 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2049.outbound.protection.outlook.com [104.47.66.49]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3g8vg48qwq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 05:56:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=arvIPbPQ8xHQ1X4FGuruURinFikH9y23ezUg32ugVtlm6W7OyqoLrYQ+wxHKly2jFWIo9PT/PpycKIuXR1MB1cNawQTBcYLiiki58icDftPDRBmTmWJER4RrLcSfwz4ksOmbzEgRIZGWe74NtaWmxztnkXLvN61WK29s77J2N8+TKqKBYGuCDBMSWbuKyqq4iCRxCTbYGwN6tzQ7q5pDVjSPBj58gfyjLAOXsOCt3rKYfBGt69XPamzCnFR0syfffiox51ASfhG0epbMENZNBaRdQzDvnaQZHLCav+p7m5/HcqnJiJ307sBUOALZK6wOpur8nzZBedWmDtgWE/k3XA== 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=tao4Jy74qsONkrM/lmy+zLUM+ZlbeyeQupJ65P6Kc8M=; b=m3M5qzhFbhzl+TPSbtcwX2d3ZqiVWy48qOGa3ZdTXBkT+DMjiscbcGZerbJVRqe1YXQbUVbYnj6XXTFojnyATLDIJpx3NLF6eFSwfTheUB4mxfRle/1sneq5CKHHYp5xnNJjhRysyPLg//LdaEFi4UNEoCxhOKv5+mIKSJ18grVWLGgYQ8NBkQjd/sn4+aSgTfkUEEQp4qe4zPFF4qmgtFFSSlxmY6vA3wLBm5hPeUIWpmSBdX6A6trmjWxJrr+c2k+ZbxQ1KhaHPcuSJGlHeuJdi6sy5/YaFuKhpenwZ8N/vQiz7kEz78l4EfNhUQufGKlgO3UeN9dQpumk9ijeZg== 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=tao4Jy74qsONkrM/lmy+zLUM+ZlbeyeQupJ65P6Kc8M=; b=jqzH3D9z+e+4065utvqoVMKvduS30vnmcFhfEhDl03walYaWKFGB7q2PNF1NILxL1mMvvAqBMs9HdOojdtwPyXWWhGsKTKX1pBOU6SgRBBvM4Ow+DhVWw66cAeJpCLMBGRM1Pdj08103WJ+p76t2rSPfs52CHslMrZs2GpKCoKE= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by BY3PR18MB4529.namprd18.prod.outlook.com (2603:10b6:a03:3b4::22) 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:56:22 +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; Tue, 24 May 2022 12:56:22 +0000 From: Akhil Goyal To: Arek Kusztal , "dev@dpdk.org" CC: Anoob Joseph , "roy.fan.zhang@intel.com" Subject: RE: [EXT] [PATCH 38/40] cryptodev: clarify usage of private key in dh Thread-Topic: [EXT] [PATCH 38/40] cryptodev: clarify usage of private key in dh Thread-Index: AQHYbBfOPbpNEKPVEkuERBqXUs7Eg60uAp8w Date: Tue, 24 May 2022 12:56:22 +0000 Message-ID: References: <20220520055445.40063-1-arkadiuszx.kusztal@intel.com> <20220520055445.40063-39-arkadiuszx.kusztal@intel.com> In-Reply-To: <20220520055445.40063-39-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: 1fb673eb-fa54-4fa7-9d09-08da3d84cd9a x-ms-traffictypediagnostic: BY3PR18MB4529: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: I0RccxULi+3TuP71HrJKHt3IsMMmutIfN8u9r6Frg4+YwvWYQ3KcSBaDvmkoGppSM0hHj1/vN9hkldM7o/+sikIcUUKF6nyDvWKIZAgCdYeJ7xq/LEdzLKAgXLIPtq0YcuO+k7vptjjEt+Yq6csrD0l8bCJlxC+1A7qLINgsWQ2iZx7YxFTgo4tXBh5XDQL9veeAqesxnNu0grFR3nzc7XVKj/bd7bm/q1mL3j0GZxtpDmYkMSaPrK50+vjm8Xr82mOxouqjAa2SBnVSOiWaSsy0MK0aWOnj1BdLrvR1peF6JarSC4iMmnWvxu47T6/kRMTEBPfnwefiykqGWrSNLE7TGsiOFc0crM6ez260lbTaORnreAfS9Iv4olt25ku+kyfZzI65evb8wWgzUkXgCfvJvsLunfXiHUUccNlSbrjxZ+FflTXVEgtVk4tZa7slrTUREeDv27jxYy3EKVSlVYP9ADahV+XX6hfyXMkftVzLinvUQxUEg6iJr31rYRa7X/MICCUSKCwoaARj9GAW1H2zta0mo33Odla6OKCSVzJ3MYb2s8FVoMe26CgvDZy6uiT5F19t9kf1rhHTChiI5jzp5wyuksxYAOrG9pVWnWUU3S4XLMsXxU7HS6L2KWsfnWJqruGKXFMIqOR72aW2quayJzLUqSzRbEgtCvzzUEK7i9fThrFWBgflZ6T5xT9yHnXxUoSKDKAbc4k1HwGmvw== 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)(8936002)(52536014)(316002)(5660300002)(33656002)(7696005)(26005)(9686003)(6506007)(2906002)(186003)(508600001)(4326008)(66446008)(64756008)(76116006)(110136005)(66476007)(66946007)(54906003)(66556008)(38070700005)(122000001)(38100700002)(8676002)(86362001)(71200400001)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?eTeuL820hHgHcThCrfHSeuhA+nLw7nedNIgSPYRgUJT1xaAFLDLFfXqlUxUj?= =?us-ascii?Q?14IQqYNA1uR4rBYqtYDB+Kf3AGPlwsB4MHj+AIX5HK/46xujME0UXVYWAxgc?= =?us-ascii?Q?jfr/cMORH3oZ8jdzKfIM2yR5ebeK/bx+fI1Exc2w/3KTTcFiLoTMIXlZVhq0?= =?us-ascii?Q?rTtAwO4gpdLAsP9rsRET98uiRO5FaLxT/kDXxpAZT42fJGxnR8sHoY9pL84+?= =?us-ascii?Q?bTTkriLtOhdwbImKUJJCMPxIRFKVmM97XHObJkWgxH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qWhJ8ojAg7wOyD/MVXuYApHbyFeaKZ8G423N8jIsdSlPQ?= =?us-ascii?Q?4ENED8SsOCOdHo6L7/N3eXQKKMJnNRQ2JrVCxKxDtOAz+Ov1rbhARdfpdPb7?= =?us-ascii?Q?qMCElItPVVcaLs4lBRqucXZ3AW2uTJ5NsRkUqMt6NL9v1BwfHvU9hz8yp7XA?= =?us-ascii?Q?0PtDm2aoWWofbUflhf07/jRgwi5Wm9ZljqRm5veX70JEO/4IhzV4XNMcpCxE?= =?us-ascii?Q?1iBRTyjPVyzZlhir05SLj8Y/TJ3AjF+iTygUb/FqaYjVUMnWnndU6h6keqps?= =?us-ascii?Q?xuhoC6jvhh9OI2h3n/Hbcux7Q+P0/mbMbTfLMXFvnheyvwT5ybu1bxfACNGF?= =?us-ascii?Q?/m2CzykbCH/rmKyGz4Dv2ePB8Dl+dUb11H1UckxPrmxlvHU9MbbLVxUzfWyN?= =?us-ascii?Q?HMYv/aKKfH+1FAJ5uQrAjS62XgkD7KDdFYRam+fIWniatnkBJDoKt7HENhKH?= =?us-ascii?Q?aEX3duqqBZWkvtnfs/uCiV2vSRcSrpdAoql5QInMZO8KRnxf6gAr6x0lhKS2?= =?us-ascii?Q?wU8L4MuGBSdjno7ya0ScWZ7NviPNbuF5CW3kIDWOypjySGd4HqrHOW1AYHvc?= =?us-ascii?Q?bMuwJlpg+Q=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: 1fb673eb-fa54-4fa7-9d09-08da3d84cd9a X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2022 12:56:22.0161 (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: Knbu/5ACxwX8oCP52gIbyhb8oRE15atLhpIWIonafEEsBw4p/qt/xIVsHDzLLgZOeGFdrlYoiSBKRPNUxJBUrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR18MB4529 X-Proofpoint-ORIG-GUID: rRfFwOooOAiAqFU521IJzAF8-TGZalcz X-Proofpoint-GUID: rRfFwOooOAiAqFU521IJzAF8-TGZalcz 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_07,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 > - clarified usage of private key in Diffie-Hellman. > CSRNG capable device should generate private key and then > use it for public key generation. >=20 > Signed-off-by: Arek Kusztal > --- > lib/cryptodev/rte_crypto_asym.h | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_a= sym.h > index 01b1fdd074..a6bb70ca3f 100644 > --- a/lib/cryptodev/rte_crypto_asym.h > +++ b/lib/cryptodev/rte_crypto_asym.h > @@ -459,6 +459,10 @@ struct rte_crypto_dh_op_param { > * Output generated private key when op_type is > * DH PRIVATE_KEY_GENERATION > * Input for RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > + * In case priv_key.length is 0 and op_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. What is expected for the device which does not support this? How will the application decide? > */ > union { > rte_crypto_uint pub_key; > -- > 2.13.6