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 01D24A04FF; Tue, 24 May 2022 16:52:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5DE340140; Tue, 24 May 2022 16:52:06 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id B4DE6400D6 for ; Tue, 24 May 2022 16:52:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653403924; x=1684939924; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=x8Ei7ao0qNew1ZmW5/Rs6QKvMkKt7BqskFcKD1l0u18=; b=UJbQv+iqMZ9wDdGvlMVeaZcpGiMFdk1V6J03ItMB23Li/zUIq/M6Qtum foqJdcosQf2fdVMKDBl6aHq2m343Sow+yrKTCO8TMRpviC3Dkh2LgIL/f qzacO42iYKAM/6VgK3xOhBJyReN0exXl1B8m2KR4sFfJUzDE5DyKo07Iz oN4YFiXdT8GJb8RDBYL0VCCD+1FlyPdm9JI0WZWSYiBVbK4URAADLHjIs Gt2110z1JMn2FiKYUDOwCfXnqgZybS4xTEekWAnoxuGBKHm5ANraiDJTR biH3hqexWZTtQ0T85b9PaPQvWLZrjXELvrFchx8viOP5fWHlAi2vpLQIH Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10357"; a="271125721" X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="271125721" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 07:52:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="901070509" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga005.fm.intel.com with ESMTP; 24 May 2022 07:52:03 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 24 May 2022 07:52:03 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 24 May 2022 07:52:02 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 24 May 2022 07:52:02 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 24 May 2022 07:52:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V2CO1Cbc57GBIAIemS2C6KmiyN9/qnYHeM5v/+Xs/mn/Nqe4yBaJBD0NwTn8BGuYEGMBcdQzXXpf9OS5MwrAz0G6VQRT1SJFKca5T3PJRWlse+5AM3sZil394BHn9DwcgY+xBcct6/0kFFb7BZ/h9uPPfG5pDUe4PV9o+a4VAKFuNW7mLIHavXti6yEwtzfwqmPHwB8JkCOC0Ub1KF/5bV1FWC3ZJGzvht7FOgE6czJdrgqT0ffHfUuMxnyRe4coAJPg663Adk4EesEBNWUzHRSoDekuNC5VBwxmeEXAHsJKVaztGOQOcCe36yb3uUJjq5ShRay3EwiMWYgenvS6AA== 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=ENzx3EaFv+9lTRdfe27l/kEQaYXEgdU2ju6nbBbcPGw=; b=mzBuac8JJB7ryeK3SAfnypuwLJ9qjgE26PtFwTg0Nk4tIFwO/tfckzyLpP2bGKsYJ9Q/3IuMBO4OECOWj18u7/LE1e+Qe0br0XttYt1bQj4eOIdXGT0dj24QMPozpwgNaMWHllicUYjGk7L6u/zZk90J6BJuYnyFdIBya6zHoXR5+pUjgOvvwusuS2Ly+X/+PpcEILfR5gna37lDGSDvzstFMHREKXeA+0jO11ZdH2tNWOlGDUb6cZo3xSqxSnVfdFzDvAn0zUf7016Q4XPFr/hBEVl3SzfX0I+rVmHeNAduUtFnhypQtHQU50K6+EO3UdaagOt4vRK2Sgye+Upxhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from CO1PR11MB5009.namprd11.prod.outlook.com (2603:10b6:303:9e::11) by MWHPR11MB1744.namprd11.prod.outlook.com (2603:10b6:300:10e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.19; Tue, 24 May 2022 14:52:00 +0000 Received: from CO1PR11MB5009.namprd11.prod.outlook.com ([fe80::f538:5980:ef0d:b634]) by CO1PR11MB5009.namprd11.prod.outlook.com ([fe80::f538:5980:ef0d:b634%6]) with mapi id 15.20.5273.023; Tue, 24 May 2022 14:52:00 +0000 From: "Kusztal, ArkadiuszX" To: Akhil Goyal , "dev@dpdk.org" CC: Anoob Joseph , "Zhang, Roy Fan" Subject: RE: [EXT] [PATCH 20/40] cryptodev: add elliptic curve diffie hellman Thread-Topic: [EXT] [PATCH 20/40] cryptodev: add elliptic curve diffie hellman Thread-Index: AQHYbBe74aopJS6zVUCkbdrnTUtktq0t9cOAgAAtiTA= Date: Tue, 24 May 2022 14:52:00 +0000 Message-ID: References: <20220520055445.40063-1-arkadiuszx.kusztal@intel.com> <20220520055445.40063-21-arkadiuszx.kusztal@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 865b5789-53a7-460b-9d89-08da3d94f54f x-ms-traffictypediagnostic: MWHPR11MB1744: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: WjSgHDoKNFWIOuiiNJu02rlh3FwqVwjweFd1Gi0wzDoiN6B8h5f5Rfz7bebK3B7A3co1uIPhiy3Bm5egJfhN1MQbD5d9mlbuVSd0P6bM4b7sg6j6ptwn5+DgGdJ6FPVbWOEmS35rYpkwK4C3wLPX9dkgd53ivoJiq2JSUKEf1lZr+BDE6/YPfPwyJMMvYmaOdWN8tWJhi+N+W8A6LugQ9UcgRON4wTV2sGX1aW9JLInlCqSdnSErZ+2yDV9r8ESjp4+JVjqb7qDjFI9SE6OcYjJ7BoBmj/wgA9eeEoqlP234GEtxnULQAHLxFF10i4R8S37UmTlFIg0xfwjXG25jg0ZUjRNSHuIgFsICgTYMLaPr8g0+9+Vr0ziCslXnVtmfrBojWDQ/W2aGjo0nPZF+Gqpa69j4x1gLDbmc2DOOaoejL2950+ml1bdmwyKzpv1kRnOx4jdcHnipQbA/pqf7QxSlf7G0RMGGDD6Ugkhocdr0A5Y7HtNSdBm4x0envcpP/LHRwRyN+ea+HnL15/5bMjFFsIqz2VKuUz+AmyEvH1eJlp8yHtUsWPT4NcnYDg+InZL8zroKtlqbAMAxIacxXUdu5C1eGFLqHwwfHEZlkwsM2ISieQqbJQ/x7NxzRFlyGy7UwFj17wD2bvRRYlHkWqFdx0W54DW2Omolbd0an2TOzeBwNvGozsXfthXKZ8ozC+h84vxipoWLbJ6IyPjmNA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB5009.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(66476007)(64756008)(66556008)(76116006)(71200400001)(6506007)(4326008)(66946007)(8676002)(5660300002)(316002)(26005)(508600001)(38070700005)(82960400001)(66446008)(83380400001)(122000001)(86362001)(2906002)(54906003)(53546011)(186003)(107886003)(9686003)(8936002)(7696005)(110136005)(33656002)(52536014)(55016003)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?T60F153//4jyxBMDj8sIZGBD597Sn2DCE23MwS97FokA2wF7qwvf0Uu+RKUg?= =?us-ascii?Q?zNHHa7hyuAqTc7USEdFOAWJX4EPIC2GONryX8xhtzGwgeofef+6N2zk8otWC?= =?us-ascii?Q?KsKcs6aWgddOQlYFwL6oirkWU5LGf7Fxi3dFjq+RGyurhHz6kwBc5AzmD3BH?= =?us-ascii?Q?gPcMc9ynVSQkAj6/3M8IELaqOXlg3MGEvu3bGO4nDQ5HR0r5+ilpEaVbb9Ca?= =?us-ascii?Q?ArBgXAZWMC6ZhdLqQy9C1HFbXecF1a0P/WOmsOPv7m50G70n8TjGijKOlRMP?= =?us-ascii?Q?2Tk0xftUVLj4yP8R890jjZf1tNsE/59r3pva6+oUFvL49gSfk9AaaSeQ4dMz?= =?us-ascii?Q?f1cQwL0W846GGbk5J1BKf+3Rz5Zq4RcGbqG2dXOi85d8lIIne4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tjqdunD5ZXdRCoFGZWMS7VgeZEpltE?= =?us-ascii?Q?Q8kzr/drvXTfOUBNZXFeYl422KVF4VyUqrcTEAtfsXGEEYQahST2wNvxu5mQ?= =?us-ascii?Q?jozznhbD6tMhNq2bMFUjHCTwS2Kt1yHz3PNA390AV6baaxsugrzj8dioUEeY?= =?us-ascii?Q?Ow0diQiV7DnE3xYKuCcBTvocgEylym1D4D9ziC2MaGLvK8CofKkGoSWK+pcb?= =?us-ascii?Q?HECqR9eqv8rhR4ebyEuLHm6vmwCbaG2T68Z+U4yqVaBXO47K5ivzH7U2BwL3?= =?us-ascii?Q?HWC4WG8JgLT82sjIAi9Oh9UJ2xeM86PtGGw8zdVUmDpoJEzhPUYoCXzQHT6y?= =?us-ascii?Q?tl8skC26MbFevuAOJtQBPztGe05CFCqesN6nJIMwO8IOTdbh2ZthjQnAffIF?= =?us-ascii?Q?9JEBidswuCx4giwuv0wdKyUmUGPbd/G0x26ve3eQVLSiZr4cUeh188UjDILR?= =?us-ascii?Q?d4trajdcBiX+B0pBZocVU+r7e6FqyEU=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5009.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 865b5789-53a7-460b-9d89-08da3d94f54f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2022 14:52:00.5955 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0WGihkU/btUhmZd7PMkRdsSej/2G/zy4Z443Nq/SfuKOzo29PlwVB7DA4FOsp/aLHYJ5HDiMelk+lzOK6rHk2z5U6h09FQVDwvbq00nP3NU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1744 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Akhil Goyal > Sent: Tuesday, May 24, 2022 2:08 PM > To: Kusztal, ArkadiuszX ; dev@dpdk.org > Cc: Anoob Joseph ; Zhang, Roy Fan > > Subject: RE: [EXT] [PATCH 20/40] cryptodev: add elliptic curve diffie hel= lman >=20 >=20 > > - 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. > > > > Signed-off-by: Arek Kusztal > > --- > > lib/cryptodev/rte_crypto_asym.h | 34 > > +++++++++++++++++++++------------- > > 1 file changed, 21 insertions(+), 13 deletions(-) > > > > diff --git a/lib/cryptodev/rte_crypto_asym.h > > b/lib/cryptodev/rte_crypto_asym.h index 52cb1c5c80..09edf2ac3d 100644 > > --- a/lib/cryptodev/rte_crypto_asym.h > > +++ b/lib/cryptodev/rte_crypto_asym.h > > @@ -82,8 +82,10 @@ enum rte_crypto_asym_xform_type { > > /**< Modular Exponentiation */ > > RTE_CRYPTO_ASYM_XFORM_ECDSA, > > /**< Elliptic Curve Digital Signature Algorithm */ > > - RTE_CRYPTO_ASYM_XFORM_ECPM > > + RTE_CRYPTO_ASYM_XFORM_ECPM, > > /**< Elliptic Curve Point Multiplication */ > > + RTE_CRYPTO_ASYM_XFORM_ECDH > > + /**< Elliptic Curve Diffie Hellman */ > > }; > Please add relevant information in "doc/guides/prog_guide/cryptodev_lib.r= st" >=20 > > > > /** > > @@ -383,22 +385,28 @@ struct rte_crypto_dh_op_param { > > /**< > > * Output generated private key when op_type is > > * DH PRIVATE_KEY_GENERATION >=20 > Update with actual enum name for this as well >=20 > > - * Input when op_type is DH SHARED_SECRET_COMPUTATION. > > - * > > + * Input for RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > > */ > > - rte_crypto_uint pub_key; > > + union { > > + rte_crypto_uint pub_key; > > + struct rte_crypto_ec_point pub_point; > > + }; > > /**< > > - * Output generated public key when op_type is > > - * DH PUB_KEY_GENERATION. > > - * Input peer public key when op_type is DH > > - * SHARED_SECRET_COMPUTATION > > - * > > + * Diffie-Hellman public part > > + * For DH it is big-endian unsigned integer. > > + * 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 > > */ > > - rte_crypto_uint shared_secret; > > + union { > > + rte_crypto_uint shared_secret; > > + struct rte_crypto_ec_point shared_point; > > + }; > > /**< > > - * Output with calculated shared secret > > - * when op type is SHARED_SECRET_COMPUTATION. > > - * > > + * Diffie-Hellman shared secret > > + * For DH it is big-endian unsigned integer. > > + * For ECDH it is a point on the curve. > > + * Output for RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > > */ >=20 > Is it output for others as well? [Arek] - No, it is output for phase2 only. > Please be consistent in the comments for all params. >=20 >=20 > > }; > > > > -- > > 2.13.6