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 312D645ADE; Tue, 8 Oct 2024 13:28:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA2A4402A9; Tue, 8 Oct 2024 13:28:05 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 514424026F for ; Tue, 8 Oct 2024 13:28:04 +0200 (CEST) Received: from pps.filterd (m0431383.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 497GcRPF004236; Tue, 8 Oct 2024 04:28:03 -0700 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2048.outbound.protection.outlook.com [104.47.66.48]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 424kb6a4xf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Oct 2024 04:28:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kFaUqaeRARbSUGLd4hKrQRKdXgFPT8/QWfO3NSuDo0NV56AwH7vFLa05lL1B1xo3r83DmKFnqHxLFJQdN0kBxY6qfF8PucB8IbIpIpgR91F7s2EPm1SW+JqO3eH/QwRv7lYJBTdm6ixfhOht3a+8BSnRFYRABV+MH0DfS2zVyThs7SZRbrzR6yK3ETfzzKY/JLqVlS985AVHvXBfDz/7ahwekpVge2dq88RDpIN++1tkvsNnsmrIZMe7R5u/CvvdM/yICbrtqMNYsyt3zp5GfKKB9LxQQjK1S7WzOlycQV1B+aCwlCmMaVXdmqF/6pPCWdYf+BkigRyGRNtJCWoY9g== 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=rOPEfIdp/1DlwZaHyIbyN/sRXyABdKc94PwaGzEprq0=; b=D7FK+E5rEfpg4fidYb0qA9lnhbG4SH34bS2d2fgRfqETEB1OmuYPjnE0a2YGwkrIOmkWVc+euWh2fVFiziyiqzYPLHCFeHgnx1kOTvgQuHocIAYJRRjs8nzuxFOUvdcqGOPujnMZ2t/AswDu6B2PtDIDHUb06+KJqoReKIz7azULWeZcHdGtpuuat9taWPasVWWsTPm8C7nOJIQqlwTwrc4cYSJP10zv3W4+vv23fc7qzzl3wvE5cqpD+TVvpfKTdUzabNQbJPdEK2viLGlQeJ9k8l6QfJO/w9N56Nn1uxueNWbrj3NCyB4XJwa9ChTL0kYR5Yvql/BfnCDmiE9LqA== 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.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rOPEfIdp/1DlwZaHyIbyN/sRXyABdKc94PwaGzEprq0=; b=E7OVy9NUgdICA0GRJ50zua4XvceiQVj0Ig23kJmaQSqT89Ye/QA4rjA7I1+pvmNpSRpouwtV3feJ+GEbUDFE9Tm7Yk8PpFt2j9G2CqGEBwc9L+F9qliiE7MqkCS1vhlreXWog+gwrnonHQymsSwFPXirOfvA7hGxaQT4maw6oWM= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by IA3PR18MB6384.namprd18.prod.outlook.com (2603:10b6:208:533::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Tue, 8 Oct 2024 11:27:59 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::3c98:dd36:4897:a51d]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::3c98:dd36:4897:a51d%5]) with mapi id 15.20.8026.020; Tue, 8 Oct 2024 11:27:59 +0000 From: Akhil Goyal To: Arkadiusz Kusztal , "dev@dpdk.org" CC: "brian.dooley@intel.com" Subject: RE: [EXTERNAL] [PATCH v3 2/4] cryptodev: add ec points to sm2 op Thread-Topic: [EXTERNAL] [PATCH v3 2/4] cryptodev: add ec points to sm2 op Thread-Index: AQHbGVXW3qdn8MvxqU+2ib7eQE6i6LJ8txyw Date: Tue, 8 Oct 2024 11:27:59 +0000 Message-ID: References: <20240929172912.87859-1-arkadiuszx.kusztal@intel.com> <20241008062845.11071-1-arkadiuszx.kusztal@intel.com> <20241008062845.11071-2-arkadiuszx.kusztal@intel.com> In-Reply-To: <20241008062845.11071-2-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-traffictypediagnostic: CO6PR18MB4484:EE_|IA3PR18MB6384:EE_ x-ms-office365-filtering-correlation-id: ca72a1e9-6caf-4887-cf46-08dce78c43c0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?vlFaecq+04/RjnluMzy+IODUFUK914w6marODsM9ewtJXFK6YymlaaI1YJcp?= =?us-ascii?Q?jNHwB35/RC19IJV2b7XpmqeVYacegLhRCc2NKzW1BfmO4jjc12HKjEFApR2I?= =?us-ascii?Q?D2c27+hB84v+brqo8mqW0URSaY/iVhLa0LuCxs/EcA9gVWFqR8buLXUVsS4W?= =?us-ascii?Q?JHYvAirllxtdmgPDzgDSioWY8J1vtPmUoUkj/m4XHh6m00SaY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07vX0dlv5kziR6o8o2AFE47arPW/yOkKGaaMw4DIfZ8YzfBYPR1R?= =?us-ascii?Q?5RPVhYIWHbUQJEQ0jVuxHnRCk84ieodv0kSqauFlaGjaftbujtA/yhtUtvdW?= =?us-ascii?Q?QgmMV6oF5QnlcEgc1Tj8LPB/ujXIAARspSVEgYDPYNrDtGxWV/NcJm0HBEcx?= =?us-ascii?Q?j5UnFEIYL/wUM4rEYPr7MpFL1b31Np5x57fU3bjxcZ6E37Qw4Sk3QJDeWZNR?= =?us-ascii?Q?mINktfREkjvdzDW4ZejhU+nrheHv6C7DUKjQzcDAJEYvWQ=3D=3D?= 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:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?M/R51ByR8Gne/IBX+QZfDtQTwWYe9IzP/nAmsXXbPHqX0gzKhV9L34mqL3mo?= =?us-ascii?Q?0Qo1WEIhtWYoI+5QU5kw9niWK7Opjvld1vAUUiQQtK2SBNbDKcC2ytnGg2ls?= =?us-ascii?Q?YP3Gmhf/4i74ILbLaYgp+YFzJhdEBFlr60ijI8H0YX3/dbUbpOHhqpoNoOSM?= =?us-ascii?Q?x6m9u/VRHl1pqEOzOGA5e0w66q6gQlJSm4fro8Q1JqmG64g4rJ4ChEoMOCZ8?= =?us-ascii?Q?/x3tbTUW5lL43/uffxrWMR1V410xR1iZyUQUOnH4S576LsuikOTGqIZP5ybj?= =?us-ascii?Q?rtbapxz/wiHM3B/aVzx/m2WKyoKy6YmbyeoFFu1NCpKwXq+iohjMCbfvdrq7?= =?us-ascii?Q?UnBXESIxKrNVBJzQIu/XAbzYscxjoWc1KHJyzdfr7Y/ETczG78mZ+LdiaKr7?= =?us-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Fa83qGbuLjacWfgO63jd+?= =?us-ascii?Q?Lv0rQ8O5yKq0yxmJ4Jhr4FBFO2FYQEmUhntViXlNoQVm/wqs7ELeexpN928o?= =?us-ascii?Q?Icj8JODE7ssjAWA2g5dH+JHThVS7cwECv+m14HTW5wkCmAk1ub3PmcIE8o7/?= =?us-ascii?Q?VK4vCgnmSHUX8jB7DZUFB+Y23aaSfzos+xFuBsCKFfEi6ooIPnFqbMwgw9SD?= =?us-ascii?Q?Vk0BCJA1PajDTXxE7/NDd2nBn6RLYludYju1ELPzT6zO/GTC1ijbXilRjhol?= =?us-ascii?Q?2lY+d+Na85qiIg7xWGo=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: ca72a1e9-6caf-4887-cf46-08dce78c43c0 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2024 11:27:59.7506 (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: qFhThjgGGERoVF1bEA2PHFsQ2VKGp3/xc+QL4H9scdWTvBIQ9E02Ca6o6tI97Vmxs2pl41YaddpGxs80kL/2QA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR18MB6384 X-Proofpoint-ORIG-GUID: vfZO0eU3wlpKzd60qgyAW9vbuOXqm8MM X-Proofpoint-GUID: vfZO0eU3wlpKzd60qgyAW9vbuOXqm8MM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_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 > /** > - * Asymmetric crypto transform data > - * > - * Structure describing asym xforms. > - */ > -struct rte_crypto_asym_xform { > - struct rte_crypto_asym_xform *next; > - /**< Pointer to next xform to set up xform chain.*/ > - enum rte_crypto_asym_xform_type xform_type; > - /**< Asymmetric crypto transform */ > - > - union { > - struct rte_crypto_rsa_xform rsa; > - /**< RSA xform parameters */ > - > - struct rte_crypto_modex_xform modex; > - /**< Modular Exponentiation xform parameters */ > - > - struct rte_crypto_modinv_xform modinv; > - /**< Modular Multiplicative Inverse xform parameters */ > - > - struct rte_crypto_dh_xform dh; > - /**< DH xform parameters */ > - > - struct rte_crypto_dsa_xform dsa; > - /**< DSA xform parameters */ > - > - struct rte_crypto_ec_xform ec; > - /**< EC xform parameters, used by elliptic curve based > - * operations. > - */ > - }; > -}; > - Above change seems redundant. It was commented on v2 as well. > -/** > * SM2 operation params. > */ > struct rte_crypto_sm2_op_param { > @@ -658,20 +624,43 @@ struct rte_crypto_sm2_op_param { > * will be overwritten by the PMD with the decrypted length. > */ >=20 > - 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) > + * > + */ > + 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) > + */ > + }; > + }; You may add a reference to the newly added feature flag here. >=20 > rte_crypto_uint id; > /**< The SM2 id used by signer and verifier. */ > @@ -698,6 +687,40 @@ struct rte_crypto_sm2_op_param { > }; >=20 > /** > + * Asymmetric crypto transform data > + * > + * Structure describing asym xforms. > + */ > +struct rte_crypto_asym_xform { > + struct rte_crypto_asym_xform *next; > + /**< Pointer to next xform to set up xform chain.*/ > + enum rte_crypto_asym_xform_type xform_type; > + /**< Asymmetric crypto transform */ > + > + union { > + struct rte_crypto_rsa_xform rsa; > + /**< RSA xform parameters */ > + > + struct rte_crypto_modex_xform modex; > + /**< Modular Exponentiation xform parameters */ > + > + struct rte_crypto_modinv_xform modinv; > + /**< Modular Multiplicative Inverse xform parameters */ > + > + struct rte_crypto_dh_xform dh; > + /**< DH xform parameters */ > + > + struct rte_crypto_dsa_xform dsa; > + /**< DSA xform parameters */ > + > + struct rte_crypto_ec_xform ec; > + /**< EC xform parameters, used by elliptic curve based > + * operations. > + */ > + }; > +}; > + > +/** > * Asymmetric Cryptographic Operation. > * > * Structure describing asymmetric crypto operation params. > -- > 2.13.6