From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 8B40E5F33 for ; Wed, 6 Feb 2019 10:33:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2019 01:33:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,339,1544515200"; d="scan'208";a="141094823" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga002.fm.intel.com with ESMTP; 06 Feb 2019 01:33:40 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 6 Feb 2019 01:33:40 -0800 Received: from hasmsx107.ger.corp.intel.com (10.184.198.27) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 6 Feb 2019 01:33:40 -0800 Received: from HASMSX109.ger.corp.intel.com ([169.254.3.134]) by hasmsx107.ger.corp.intel.com ([169.254.2.13]) with mapi id 14.03.0415.000; Wed, 6 Feb 2019 11:33:37 +0200 From: "Kusztal, ArkadiuszX" To: Shally Verma , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Trahe, Fiona" , "sunila.sahu@caviumnetworks.com" , "ashish.gupta@caviumnetworks.com" , "umesh.kartha@caviumnetworks.com" Thread-Topic: [PATCH v2] cryptodev: rework mod exp and mod inv comments Thread-Index: AQHUvX99c+vWbpxuYE6/sIDIoLJjnaXSFz+AgABpwbA= Date: Wed, 6 Feb 2019 09:33:36 +0000 Message-ID: <06EE24DD0B19E248B53F6DC8657831551B12F825@hasmsx109.ger.corp.intel.com> References: <20190205181941.10484-1-arkadiuszx.kusztal@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.104.12.166] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] cryptodev: rework mod exp and mod inv comments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 09:33:43 -0000 Hi Shally, Thanks for your feedback. > -----Original Message----- > From: Shally Verma [mailto:shallyv@marvell.com] > Sent: Wednesday, February 6, 2019 6:08 AM > To: Kusztal, ArkadiuszX ; dev@dpdk.org > Cc: akhil.goyal@nxp.com; Trahe, Fiona ; > sunila.sahu@caviumnetworks.com; ashish.gupta@caviumnetworks.com; > umesh.kartha@caviumnetworks.com > Subject: RE: [PATCH v2] cryptodev: rework mod exp and mod inv comments >=20 > HI Arek, >=20 > Acked with minor feedback. >=20 > >-----Original Message----- > >From: Arek Kusztal > >Sent: 05 February 2019 23:50 > >To: dev@dpdk.org > >Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; > >shally.verma@caviumnetworks.com; sunila.sahu@caviumnetworks.com; > >ashish.gupta@caviumnetworks.com; umesh.kartha@caviumnetworks.com; > Arek > >Kusztal > >Subject: [PATCH v2] cryptodev: rework mod exp and mod inv comments > > > >External Email > > > >This patch changes modular exponentiation and modular multiplicative > >inverse API comments to make it more precise. > > > >Signed-off-by: Arek Kusztal > >--- > >v2: > >- grammar fixes > > > > lib/librte_cryptodev/rte_crypto_asym.h | 44 > > ++++++++++++++++++++++------------ > > 1 file changed, 29 insertions(+), 15 deletions(-) > > > Acked-by: Shally Verma >=20 > >diff --git a/lib/librte_cryptodev/rte_crypto_asym.h > >b/lib/librte_cryptodev/rte_crypto_asym.h > >index 5e185b2..9582ee3 100644 > >--- a/lib/librte_cryptodev/rte_crypto_asym.h > >+++ b/lib/librte_cryptodev/rte_crypto_asym.h > >@@ -72,8 +72,8 @@ enum rte_crypto_asym_xform_type { > > * Refer to rte_crypto_asym_op_type > > */ > > RTE_CRYPTO_ASYM_XFORM_MODINV, > >- /**< Modular Inverse > >- * Perform Modulus inverse b^(-1) mod n > >+ /**< Modular Multiplicative Inverse > >+ * Perform Modular Multiplicative Inverse b^(-1) mod n > > */ > > RTE_CRYPTO_ASYM_XFORM_MODEX, > > /**< Modular Exponentiation > >@@ -233,29 +233,39 @@ struct rte_crypto_rsa_xform { struct > >rte_crypto_modex_xform { > > rte_crypto_param modulus; > > /**< modulus > >- * Prime modulus of the modexp transform operation in octet-stri= ng > >- * network byte order format. > >+ * Pointer to the modulus data for modexp transform operation > >+ * in octet-string network byte order format, any positive integ= er > >+ * > This statement looks incomplete. You can write it "it should be positive > integer " but is it required to be mentioned? Coz input is array of uint8= _t so > assumption is it will be positive. >=20 Actually by this we meant that there is no constraint (if should be prime,= co-prime, semi-prime, multi-prime, less than... etc), But yes this is only informational and probably could even be omitted > ... > > struct rte_crypto_modinv_xform { > > rte_crypto_param modulus; > > /**< > >- * Pointer to the prime modulus data for modular > >- * inverse operation in octet-string network byte > >- * order format. > >+ * Pointer to the modulus data for modular multiplicative invers= e > >+ * operation in octet-string network byte order format, > >+ * positive integer > Same comment as above. >=20 > >+ * > >+ * In case this number is equal to zero the driver shall set > >+ * the crypto op status field to RTE_CRYPTO_OP_STATUS_ERROR > >+ * > >+ * This number shall be relatively prime to base > >+ * in corresponding Modular Multiplicative Inverse > >+ * rte_crypto_mod_op_param > > */ > > }; > > > >@@ -317,14 +327,18 @@ struct rte_crypto_dsa_xform { > > > ... >=20 > >2.1.0