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 999C6A0543; Tue, 24 May 2022 19:47:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D602400EF; Tue, 24 May 2022 19:47:13 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 1F6A3400D6 for ; Tue, 24 May 2022 19:47:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653414432; x=1684950432; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=9WE/gdDqW4iFLPz+Xu3gYUgIcL+e6QHxl3luZsLHoDA=; b=QEPGTpjGZY3FirTKQ2DNU6SG7Y1ozD+5c3pijYHnncX8lEzAidO0cepS WJT+8vKgmufm8iq7FVOqr1UL1WKLdGJPXKVr4wuMBkV7A0SIZkOjWOZVu QBuIH5Xj5dTBMWZd0Z4KgzC0PGwRROawmp8Vi4GsMDhUS2h03Km5WtVqI IJiKVAoXJ1x2KyfWh4eoDN8CWqYGQu1xlTNUHuNLZJdnHQLNdx3z2hwJG iO7VIbUixyYU78OJsUluUfHL52SVgFgXJ61Z2PgKvI3nc/dc/W74uspd7 wPyHmBeqYT3zGakgBX20A4yfXYidz4qUcYrgsBpiGEY4QZi0vNVlzmrHO g==; X-IronPort-AV: E=McAfee;i="6400,9594,10357"; a="336661913" X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="336661913" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 10:37:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="577991413" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga007.fm.intel.com with ESMTP; 24 May 2022 10:37:56 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 10:37:56 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 10:37:56 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.41) by edgegateway.intel.com (192.55.55.70) 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 10:37:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MWergfL64z6DMhnla9mY/LRAau8zAd4iJ+0NgoLIf0u2KyiYeFcfPL+67jXIeS7ug1SUk9T6b1tcU9qf9+inpNb0ml3xlE0EyYcIN+C3qQDRRsZ7q7kzm5UpqsTcM8fVHKr82eiN6+S4zG8GKs/TwDU4Qa959nQ2F/FeGeOcGleB39KTHnA6CAWnXCcnWdTMURyMCWbTzDj917qoVeS/JXX04D3FDzhCDqXhUrB4lZBeqzf9gM67TUsjTzGvGjB9dURfV5k1RDmVGcAuCoGzksVwRqSxywAfgBUsfejtAxRV/w8NKBHoFYRbR2APTpiAs/DBJbR+dcucmW6mvuVCtA== 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=BiaHXXx1uXpDVVbDHw8VpsPJiO8ThT1pcwHwqw8YLWk=; b=Z4bj5ah4TeMxVtc1Mmi9Q/8HaMU9ZCrwrGiRiE8VGPvwNzoOxh040ynS7JFY2+ILrRURsgFGC1wqNEmG62Sx5KNx+XDVYXufO4QGxXCeTpa9+9dIMX3+IJhe97JfTEv9M/HGhps8tLLuTT4p2PosT+5z9R00XrRMtA3tzoFqHdCVW+F2opbR6Nmcwbm1Rzu/VAnzgByjMJtlh66Z41lN3t/XS6aU7/WAZl/3kgj5PsIBK4/ZIownToeui1a5GPNn7j4LKbDIR8vxMdvieI0RbrtLnhl5DqfdhJD5eDQJ6fIJMklmKhRASN2RQz6MG7SsedOUE1LE3VM/+H9vId0stQ== 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 SA2PR11MB5161.namprd11.prod.outlook.com (2603:10b6:806:fa::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.16; Tue, 24 May 2022 17:37:54 +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 17:37:54 +0000 From: "Kusztal, ArkadiuszX" To: Akhil Goyal , "dev@dpdk.org" CC: Anoob Joseph , "Zhang, Roy Fan" Subject: RE: [EXT] [PATCH 04/40] cryptodev: reduce number of comments in asym xform Thread-Topic: [EXT] [PATCH 04/40] cryptodev: reduce number of comments in asym xform Thread-Index: AQHYbBeid4b0lSu6D0qAc66nt2o8aq0t4m8AgABuwCA= Date: Tue, 24 May 2022 17:37:54 +0000 Message-ID: References: <20220520055445.40063-1-arkadiuszx.kusztal@intel.com> <20220520055445.40063-5-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: 4f1768e5-6796-4c08-feae-08da3dac2235 x-ms-traffictypediagnostic: SA2PR11MB5161: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: 1pw9e9ymhyh0VQeiU3AIptiEqgjYGRXkv9Z2z37C7pILqyhFaHvYSCN4vuwLPo5Tt2jo9MMD+G0UgsA09STdfohBjtZZ0V7BDF0eQHXINKfKSge66x/P8Fe27mRlTTBnBSDcqPw2ibB/Za+rcsDyzhRyiQ93a+26SmKUXnJlXiNs/RH7zi+aCjCnd/XRsCLMhak5/B3x+zU0xP/cyU3e53V+/XA4L5kYG2rgMZ4fyQ0Ra+AnROO5hqrWvW8RM8S5d39aBThPXt3FpX6ONiNFAdTjnXtKTbOLqzs0wfGcMxRQ6jYWlXJQO2GboIwmr7KHFGKZSiEBqfVAo5lGuaiMee/wIUL92+Fn8m++dziDQ80HHIR9LtJK3EEgHxajgsY2BxNyCULnZJ2nAdctyqd2KXJyXLKUKinq3WWucRtugcToW1hT8M/r1JdijR1lynqJAEeffLl8OW1CLRqFuQ4qR46sV4/GoMSgnIdAeln9YyoJJlMswRv+ijfdACNfWJ0mPvAuxvJk3XuRCa585dWvtDQ7c/LmKWPAlP1nh5rIbZJ16A/RpSxjrQhUggnxm2ICtPgbXz6nAe2xNJjcd1DgSNaQ9nZee4rItjAuEqTpg+NmhIp5nCakibSGoTX6mG8zFWoG5azD0NFUhHeCFQh5D8USe9rNZWSfSJk/dmiUkvgm5nWv+5IY4NJ/EQdg+IbIM2lLoYnr53iJEzSOXfFkAA== 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)(33656002)(86362001)(55016003)(316002)(54906003)(110136005)(71200400001)(66446008)(7696005)(186003)(76116006)(2906002)(66946007)(38070700005)(38100700002)(82960400001)(83380400001)(26005)(64756008)(66476007)(107886003)(508600001)(66556008)(122000001)(6506007)(8936002)(4326008)(5660300002)(8676002)(53546011)(9686003)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RxaymkLY0fNvtC8srFoAipqeP/IzW2U7IZB0lYbRkelhH6Rzxtlj7zYV1UIH?= =?us-ascii?Q?UVAAcBdT2epDFMhvXgo62YBH5+M7yC9DDhhnk9vY+bKElr99jGIo4L1JgctE?= =?us-ascii?Q?YSNOawh3JGy79MGj5C+QMK2GzkfqgxDJUupBG6PIfSoKy/6p8sgemgcyvuZe?= =?us-ascii?Q?oCuC8wBFy7DEJ9qxrIHzwG0TGqLlKepY1zxtP3LcHsAPy8OSigQgro1aDT0J?= =?us-ascii?Q?lH/fRs5DiDQxJSD2h38DdMZe9xq75aZI6hvVn+YBivGxqcugPgJb9NU2aNsN?= =?us-ascii?Q?LOQIOWJE1FW0nskzYHykoznZ8fuT8iJHCqPW4OyUFgbAroa16mmtH5mOvf70?= =?us-ascii?Q?6w6f5AWZrMM+yErNsQj/0XUODRqwdNxN9sT0VPjI3cdKugBzBnry7VHDt0K8?= =?us-ascii?Q?1hDHvis2Dv5h8QX4rPJrHkRNDy6ZmoywPP5P3m5oaxqKM7oGT0e/d6hTLPh8?= =?us-ascii?Q?RWWfNv2FXlvCXCoyf8QkDPTOCQG0ewLZB5/ckhq6Be/t7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q?PXwl+NybUywfLX5v1sNzWrQpTHmIcD2p6qm8v4a7LtLIF3I2kOSiw28IE3r2?= =?us-ascii?Q?YtuEgdtDUDXVn5t7dMSYGhr3TVIgrTl5bAlSIMcKNhWJzFs7juUR+o3JK24r?= =?us-ascii?Q?v7z9/hZ2FYdfH7E0/5anAMDG7rEiC7K5brcEDK6SRptfi2pjXvz1eFJWd19h?= =?us-ascii?Q?2fzVmjY7XxSefRy8OGZy7FYlPr4PlAlXXTcjKYhFw5Rea9EBS/SmcP697cDG?= =?us-ascii?Q?L+jxGH/FnBWNFlea2hV/SMKuDgp2naqWB5R2hRZ5m5RnfUhQ5nfhfSfA38c8?= =?us-ascii?Q?z6fzk6ajyJWjU93ejnpz+1qwSDMqZEOxLt7GR6rh03rH+SYaYp2ljU4pSjcc?= =?us-ascii?Q?1mGGuVMo1kB63s/VQH+RwI2iivFQjRQ=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: 4f1768e5-6796-4c08-feae-08da3dac2235 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2022 17:37:54.3511 (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: Qf1NjpET/qv92ixcfVuAmNA4x8yBwua1OYaoru2Sii9hh8FqFht7w7H1O99Qz3TceJlRWd5uuG3ArYIT00Gz8LRYEyTMP/1pGSLDQkEc7P4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5161 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 12:59 PM > To: Kusztal, ArkadiuszX ; dev@dpdk.org > Cc: Anoob Joseph ; Zhang, Roy Fan > > Subject: RE: [EXT] [PATCH 04/40] cryptodev: reduce number of comments in > asym xform >=20 > > - Reduced number of comments in asymmetric xform. > > Information describing basic functionality of well known algorithms > > are unnecessary. > > - Added information about data memory lifetime. > > It was specified how user should work with private data, and it is > > user's responsability to clear it. > > - Removed NONE asymetric xform. > > > > Signed-off-by: Arek Kusztal > > --- > > lib/cryptodev/rte_crypto_asym.h | 45 +++++++++++++--------------------= -------- > > lib/cryptodev/rte_cryptodev.c | 1 - > > 2 files changed, 14 insertions(+), 32 deletions(-) > > > > diff --git a/lib/cryptodev/rte_crypto_asym.h > > b/lib/cryptodev/rte_crypto_asym.h index a474b6acd1..0251e8caae 100644 > > --- a/lib/cryptodev/rte_crypto_asym.h > > +++ b/lib/cryptodev/rte_crypto_asym.h > > @@ -55,46 +55,29 @@ enum rte_crypto_curve_id { }; > > > > /** > > - * Asymmetric crypto transformation types. > > - * Each xform type maps to one asymmetric algorithm > > - * performing specific operation > > - * > > + * Asymmetric crypto algorithm static data. > > + * Data that may be used more than once (e.g. RSA private key). > > + * It is the USER responsibility to keep track of private data memory > > + * lifetime and security of the this data in xform. The same way > > + * it is the USER responsibility to call cryptodev session_clear() > > + * function if a session was created. If session-less not used > > + * xform data should be cleared after successful session creation. > > */ > > enum rte_crypto_asym_xform_type { > > - RTE_CRYPTO_ASYM_XFORM_UNSPECIFIED =3D 0, > > + RTE_CRYPTO_ASYM_XFORM_UNSPECIFIED, > > /**< Invalid xform. */ > > - RTE_CRYPTO_ASYM_XFORM_NONE, > > - /**< Xform type None. > > - * May be supported by PMD to support > > - * passthrough op for debugging purpose. > > - * if xform_type none , op_type is disregarded. > > - */ > I believe removing this is not a good idea. As stated, it will help in De= bugging. >=20 > > RTE_CRYPTO_ASYM_XFORM_RSA, > > - /**< RSA. Performs Encrypt, Decrypt, Sign and Verify. > > - * Refer to rte_crypto_asym_op_type > > - */ > > + /**< RSA */ > > RTE_CRYPTO_ASYM_XFORM_DH, > > - /**< Diffie-Hellman. > > - * Performs Key Generate and Shared Secret Compute. > > - * Refer to rte_crypto_asym_op_type > > - */ > > + /**< Diffie-Hellman */ > > RTE_CRYPTO_ASYM_XFORM_DSA, > > - /**< Digital Signature Algorithm > > - * Performs Signature Generation and Verification. > > - * Refer to rte_crypto_asym_op_type > > - */ > > + /**< Digital Signature Algorithm */ > > RTE_CRYPTO_ASYM_XFORM_MODINV, > > - /**< Modular Multiplicative Inverse > > - * Perform Modular Multiplicative Inverse b^(-1) mod n > > - */ > > + /**< Modular Multiplicative Inverse */ > > RTE_CRYPTO_ASYM_XFORM_MODEX, > > - /**< Modular Exponentiation > > - * Perform Modular Exponentiation b^e mod n > > - */ > > + /**< Modular Exponentiation */ > > RTE_CRYPTO_ASYM_XFORM_ECDSA, > > - /**< Elliptic Curve Digital Signature Algorithm > > - * Perform Signature Generation and Verification. > > - */ > > + /**< Elliptic Curve Digital Signature Algorithm */ > > RTE_CRYPTO_ASYM_XFORM_ECPM [Arek] - maybe this is not that important but could not we have asym_algori= thm instead of xform_type? There is not ECDSA/ECPM xform at all. > > /**< Elliptic Curve Point Multiplication */ }; diff --git > > a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index > > e16e6802aa..691625bd04 100644 > > --- a/lib/cryptodev/rte_cryptodev.c > > +++ b/lib/cryptodev/rte_cryptodev.c > > @@ -160,7 +160,6 @@ rte_crypto_aead_operation_strings[] =3D { > > * Asymmetric crypto transform operation strings identifiers. > > */ > > const char *rte_crypto_asym_xform_strings[] =3D { > > - [RTE_CRYPTO_ASYM_XFORM_NONE] =3D "none", > > [RTE_CRYPTO_ASYM_XFORM_RSA] =3D "rsa", > > [RTE_CRYPTO_ASYM_XFORM_MODEX] =3D "modexp", > > [RTE_CRYPTO_ASYM_XFORM_MODINV] =3D "modinv", > > -- > > 2.13.6