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 05D2E45C96; Wed, 6 Nov 2024 16:17:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6CF642E65; Wed, 6 Nov 2024 16:17:24 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by mails.dpdk.org (Postfix) with ESMTP id 0D428402C3 for ; Wed, 6 Nov 2024 16:17:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730906242; x=1762442242; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5XkpY8K9GDvfRn1ON33IXNYBkjRwIIPNtTHUfYz6m5o=; b=D0j0KmOR5K9kQv1jwaRq/Xfv//PDKgNfwXnuIeEanOACHcCL6DyJ7rTe BynWjr4BfcmDhmtdzrbE7PxzNv8YXptCsbseLe2CtT09wUay7Yrv4zHrd vF6tARUeeJBLATyGmaSbvz1XaWdNjaH1D6XpDKJ8ASaDq2QqeVUpkiwFS pryX4AK+ZUWwU2M+apBHlEFVNUXY6Bh+Ee7/4yZdWP9jSfIouMTEfUWqS ZwSuEzismO9QEe5VrIZ6FF40pLE03WyZK81dX/9jVmIgTBRbwwzaeXWpy LYwARK3t5WyH5XvJ8my3wpp3rIv4Iz6y4bzb/92aUqLeaGSOcSrPnMH/V Q==; X-CSE-ConnectionGUID: edo+TDZcSkCCjMcwO67rZw== X-CSE-MsgGUID: YsILe3cKTHSg+y2bB2D5Pw== X-IronPort-AV: E=McAfee;i="6700,10204,11248"; a="34489564" X-IronPort-AV: E=Sophos;i="6.11,263,1725346800"; d="scan'208";a="34489564" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2024 07:17:21 -0800 X-CSE-ConnectionGUID: IWw9P8X5RFGT6Ycu+mHNcQ== X-CSE-MsgGUID: j3XV/cmuSxCtGfaChrrFnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,263,1725346800"; d="scan'208";a="85018667" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Nov 2024 07:17:21 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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.2507.39; Wed, 6 Nov 2024 07:17:20 -0800 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.2507.39 via Frontend Transport; Wed, 6 Nov 2024 07:17:20 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.46) 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.2507.39; Wed, 6 Nov 2024 07:17:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Jjnsckpoml90o5YQbgKTDxBF4aPhNNLwByqr/m8W1eHMhTHFP3L9SKGTsViErsC7M2+X0cs4SVWpkpxkzv71dyX1CpSFP95LXw8R98J7UozyWW3FJKiY2pDL1RmHSmiqIj1v6CPQfddPJJi/vl+H3IKecdBafYBdAKnvszMAf6Y0gmjUsnPFk84FAZThVCWVpmKBA+pRRlON7LsklisrBWa82gl2AHtQTMajvzXYLcCFjsDBLJo2hgVkcfOubIGW9KBui8/IgjaGUCwTKu9jdWOCCS93OfNbCWC9Rt+p3LC/HkedhuZISN4q87gZzs4X1hzgVTjpYs12T47XdXQqiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=eNZFTYPyoR8hReLxZKRcVcwt/f7V91An1toWjsNYvoY=; b=IJQW1houoP6p4pxTCCERRZ4vELBO3kMNkEu+i3JzcCvtYaYAJqEWHCEES1erdNb3yYjhUhxBYAVusT28IIePiIXcoQlIdknsRvT7bDdOYG8VGUU65BjS5nv4cXLxR9c4xyjCojLV6E7OBMHi5DJrV1WKv0fBmv03rZ2yC2QYpYyWiGsLK7sF2VTenF+bZYih1k3Su2rCgreqlSKWPwHfD34wm79LNHbPbsgkuBumTe6AU4EAGDHxPM6thbvnKEcWXJazAszfF1WMVDjuwF8uQzlX10SAZVLGILOCII5JGfz0rKdmqzJDrWCnzxIAh9f2buFkTcSqrgPdsIqMdCOuFg== 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 PH7PR11MB6700.namprd11.prod.outlook.com (2603:10b6:510:1ae::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19; Wed, 6 Nov 2024 15:17:17 +0000 Received: from CO1PR11MB5009.namprd11.prod.outlook.com ([fe80::b03a:b02:c24e:b976]) by CO1PR11MB5009.namprd11.prod.outlook.com ([fe80::b03a:b02:c24e:b976%4]) with mapi id 15.20.8137.018; Wed, 6 Nov 2024 15:17:17 +0000 From: "Kusztal, ArkadiuszX" To: Akhil Goyal , "dev@dpdk.org" CC: "Dooley, Brian" Subject: RE: [EXTERNAL] [PATCH v8 1/3] cryptodev: add ec points to sm2 op Thread-Topic: [EXTERNAL] [PATCH v8 1/3] cryptodev: add ec points to sm2 op Thread-Index: AQHbLp0Dtnm+149Hs0uPo9Dq06oVU7KqCo6AgABVq3A= Date: Wed, 6 Nov 2024 15:17:17 +0000 Message-ID: References: <20241104093610.20426-1-arkadiuszx.kusztal@intel.com> <20241104093610.20426-2-arkadiuszx.kusztal@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB5009:EE_|PH7PR11MB6700:EE_ x-ms-office365-filtering-correlation-id: a3fead73-2313-4897-f7df-08dcfe761a2c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?AH1AvXH0kpvEsp2Uo25U3/r+d0WxmZpLJoKK/mQ81EzA61a+oQo+gVMHkKSW?= =?us-ascii?Q?uBytpkARWqo1EAtO/+JaK+csPv8iYLeKmM0bKX63AOzez2MvBEYs4PS1Trd6?= =?us-ascii?Q?auZ3x5krejicRG+AFh+EyDX/YPmJ+7O8KExna3a86JQ3P2BhHUSzuwmHimUT?= =?us-ascii?Q?ussnROlt4OPUB6CviJ+lmijvjO0WaK1vDUSYG0ttYykqHRZ/Tb4p3VIcn04H?= =?us-ascii?Q?M1DtKTPP0gw4ow/AYaseT10Im03IU1Y3OHKA52wg5Fy0swXY7cZx/hOUBOuS?= =?us-ascii?Q?KNnJsaT24dRjsoDokHL76qOliheJskzfGA0znvU90/KYef+iDAtrz6kADAm0?= =?us-ascii?Q?J7xm+CvLG3htxCy5pJTLRmNqWifZ7XGDqSB1ewVUuB/rvjmtJX0+n89cvW6o?= =?us-asc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ZzTkvh7IakhaEPBTux4iu?= =?us-ascii?Q?6YNusIffXN5BbRvAM3TAgeLab2YaqGO3wqHxYSrjWGlL4UupcfOzZTI+CHU1?= =?us-ascii?Q?2nVoF8o=3D?= 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:(13230040)(366016)(376014)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0xRhd1mL6ruq/Y+JC08O/YJg0B7C17HsUy2eFZDy62v2Ll1JsoYjXVdNg2Ep?= =?us-ascii?Q?roHENKQyxkPeh3VGysFNH4QP5g8+kHil86Fo/uqjiQtU8TK0Va73LxHCdB7+?= =?us-ascii?Q?nKAlKe4dv9wKY3DacbNJ+7GqIB0/BAoZ6LgnnHL+RVUyXCGIH38jTinxYRsL?= =?us-ascii?Q?iVZ5r+XUyMhgWrBvFwSuckthZUnGY6/Ew21DC1kclZtTKGUiGnJDhVS3mDpf?= =?us-ascii?Q?wS7cQHaD3/V9SyhcXQUsUHM3pe1CUjEpeG+zHZ2Zoeb2W2qaM7OLONlUu0L8?= =?us-ascii?Q?qK8pv33tNjPv82Iho0nqTIittssmwoC1EwAoyt4Cg58r8UVTIWsazfkre1et?= =?us-ascii?Q?spsTPpx3jPeqZPm/Em9zNSE+3Zwxe/cV5IZqemV7ObVokkbv2yV7LNp9Y1+B?= =?us-ascii?Q?rCqzBjCUM4U9YMQd6009Zm7adwOkaidOgQhb61a1niRnuFJBLdtVP2Eh83MV?= =?us-ascii?Q?4bHDaEsbXbEe3I1HHAY6P44q4dwzDyhb58eG+F+UYpCDlx23VQnEbisiLB4r?= =?us-ascii?Q?Lj3Cg/ivT3NueDdtrDs8d8mXBpHg7stLyuwv+hT+hOR2+yw7cu3+D/MYbv+Z?= =?us-ascii?Q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63+26/8sDjbaJ?= =?us-ascii?Q?kt8G+vKByLsxb54rI7e8oLBwp4IAiPClfrnxKTXb8uPQEYGsDAclYjx14336?= =?us-ascii?Q?YQR3SSZh3ZwBGjWFy3gnZYKJhfCjOOwhb2oTbccSSpZNZD2qzT60DAZwU/Z1?= =?us-ascii?Q?4A=3D=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: a3fead73-2313-4897-f7df-08dcfe761a2c X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2024 15:17:17.8159 (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: SqxmOWaGWYKTC3EnDaevZogtSNET78wFRrfSytzdrPW6ulKo0AStLSPZW8ejlJl03M/nBphsx7cKUF1MYd5TCdmx94q3mC1bJDeoNi6Rp+U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6700 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 Hi Akhil, > -----Original Message----- > From: Akhil Goyal > Sent: Wednesday, November 6, 2024 11:09 AM > To: Kusztal, ArkadiuszX ; dev@dpdk.org > Cc: Dooley, Brian > Subject: RE: [EXTERNAL] [PATCH v8 1/3] cryptodev: add ec points to sm2 op >=20 > > In the case when PMD cannot support the full process of the SM2, but > > elliptic curve computation only, additional fields are needed to > > handle such a case. > > > > Points C1, kP therefore were added to the SM2 crypto operation struct. > > > > Signed-off-by: Arkadiusz Kusztal > > --- >=20 > Please rebase. CI failed to apply patch. > Please be proactive to fix CI issues if reported. I have deferred the whole patchset, no further action is necessary. >=20 > > doc/guides/rel_notes/release_24_11.rst | 3 ++ > > lib/cryptodev/rte_crypto_asym.h | 56 +++++++++++++++++++------- > > 2 files changed, 45 insertions(+), 14 deletions(-) > > > > diff --git a/doc/guides/rel_notes/release_24_11.rst > > b/doc/guides/rel_notes/release_24_11.rst > > index 53a5ffebe5..ee9e2cea3c 100644 > > --- a/doc/guides/rel_notes/release_24_11.rst > > +++ b/doc/guides/rel_notes/release_24_11.rst > > @@ -413,6 +413,9 @@ ABI Changes > > added new structure ``rte_node_xstats`` to ``rte_node_register`` and > > added ``xstat_off`` to ``rte_node``. > > > > +* cryptodev: The ``rte_crypto_sm2_op_param`` struct member to hold > > ciphertext > > + is changed to union data type. This change is to support partial SM2 > calculation. > > + > > > > Known Issues > > ------------ > > diff --git a/lib/cryptodev/rte_crypto_asym.h > > b/lib/cryptodev/rte_crypto_asym.h index aeb46e688e..f095cebcd0 100644 > > --- a/lib/cryptodev/rte_crypto_asym.h > > +++ b/lib/cryptodev/rte_crypto_asym.h > > @@ -646,6 +646,8 @@ enum rte_crypto_sm2_op_capa { > > /**< Random number generator supported in SM2 ops. */ > > RTE_CRYPTO_SM2_PH, > > /**< Prehash message before crypto op. */ > > + RTE_CRYPTO_SM2_PARTIAL, > > + /**< Calculate elliptic curve points only. */ > > }; > > > > /** > > @@ -673,20 +675,46 @@ struct rte_crypto_sm2_op_param { > > * will be overwritten by the PMD with the decrypted length. > > */ > > > > - rte_crypto_param cipher; > > - /**< > > - * Pointer to input data > > - * - to be decrypted for SM2 private decrypt. > > - * > > - * Pointer to output data > > - * - for SM2 public encrypt. > > - * In this case the underlying array should have been allocated > > - * with enough memory to hold ciphertext output (at least X bytes > > - * for prime field curve of N bytes and for message M bytes, > > - * where X =3D (C1 || C2 || C3) and computed based on SM2 RFC as > > - * C1 (1 + N + N), C2 =3D M, C3 =3D N. The cipher.length field will > > - * be overwritten by the PMD with the encrypted length. > > - */ > > + union { > > + rte_crypto_param cipher; > > + /**< > > + * Pointer to input data > > + * - to be decrypted for SM2 private decrypt. > > + * > > + * Pointer to output data > > + * - for SM2 public encrypt. > > + * In this case the underlying array should have been allocated > > + * with enough memory to hold ciphertext output (at least X > > bytes > > + * for prime field curve of N bytes and for message M bytes, > > + * where X =3D (C1 || C2 || C3) and computed based on SM2 RFC > > as > > + * C1 (1 + N + N), C2 =3D M, C3 =3D N. The cipher.length field will > > + * be overwritten by the PMD with the encrypted length. > > + */ > > + struct { > > + struct rte_crypto_ec_point c1; > > + /**< > > + * This field is used only when PMD does not support > the > > full > > + * process of the SM2 encryption/decryption, but the > > elliptic > > + * curve part only. > > + * > > + * In the case of encryption, it is an output - point C1 =3D > > (x1,y1). > > + * In the case of decryption, if is an input - point C1 =3D > > (x1,y1). > > + * > > + * Must be used along with the > > RTE_CRYPTO_SM2_PARTIAL flag. > > + */ > > + struct rte_crypto_ec_point kp; > > + /**< > > + * This field is used only when PMD does not support > the > > full > > + * process of the SM2 encryption/decryption, but the > > elliptic > > + * curve part only. > > + * > > + * It is an output in the encryption case, it is a point > > + * [k]P =3D (x2,y2). > > + * > > + * Must be used along with the > > RTE_CRYPTO_SM2_PARTIAL flag. > > + */ > > + }; > > + }; > > > > rte_crypto_uint id; > > /**< The SM2 id used by signer and verifier. */ > > -- > > 2.34.1