From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DFCB5A0471 for ; Wed, 17 Jul 2019 11:42:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 86AFC1B53; Wed, 17 Jul 2019 11:42:31 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B653C137C for ; Wed, 17 Jul 2019 11:42:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2019 02:42:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,273,1559545200"; d="scan'208";a="175665130" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 17 Jul 2019 02:42:28 -0700 Received: from hasmsx113.ger.corp.intel.com (10.184.198.64) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jul 2019 02:42:28 -0700 Received: from HASMSX109.ger.corp.intel.com ([169.254.3.134]) by HASMSX113.ger.corp.intel.com ([169.254.13.120]) with mapi id 14.03.0439.000; Wed, 17 Jul 2019 12:42:25 +0300 From: "Kusztal, ArkadiuszX" To: Shally Verma , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Trahe, Fiona" Thread-Topic: [EXT] [PATCH v3 04/11] test: add cipher field to RSA test Thread-Index: AQHVPAfCKGRwlxxAE0mfbVCW/0/VUabOO8oAgAA7OtCAABgJYA== Date: Wed, 17 Jul 2019 09:42:24 +0000 Message-ID: <06EE24DD0B19E248B53F6DC8657831551B2808CE@hasmsx109.ger.corp.intel.com> References: <20190716185304.12592-1-arkadiuszx.kusztal@intel.com> <20190716185304.12592-5-arkadiuszx.kusztal@intel.com> Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.184.70.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [EXT] [PATCH v3 04/11] test: add cipher field to RSA test 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Kusztal, ArkadiuszX > Sent: Wednesday, July 17, 2019 10:27 AM > To: 'Shally Verma' ; dev@dpdk.org > Cc: akhil.goyal@nxp.com; Trahe, Fiona > Subject: RE: [EXT] [PATCH v3 04/11] test: add cipher field to RSA test >=20 >=20 >=20 > > -----Original Message----- > > From: Shally Verma [mailto:shallyv@marvell.com] > > Sent: Wednesday, July 17, 2019 9:42 AM > > To: Kusztal, ArkadiuszX ; dev@dpdk.org > > Cc: akhil.goyal@nxp.com; Trahe, Fiona > > Subject: RE: [EXT] [PATCH v3 04/11] test: add cipher field to RSA test > > > > > > > > > -----Original Message----- > > > From: Arek Kusztal > > > Sent: Wednesday, July 17, 2019 12:23 AM > > > To: dev@dpdk.org > > > Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Shally Verma > > > ; Arek Kusztal > > > Subject: [EXT] [PATCH v3 04/11] test: add cipher field to RSA test > > > > > > External Email > > > > > > -------------------------------------------------------------------- > > > -- This patch adds cipher field to RSA test cases > > > > > > Signed-off-by: Arek Kusztal > > > --- > > > app/test/test_cryptodev_asym.c | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/app/test/test_cryptodev_asym.c > > > b/app/test/test_cryptodev_asym.c index 4dee164..8391545 100644 > > > --- a/app/test/test_cryptodev_asym.c > > > +++ b/app/test/test_cryptodev_asym.c > > > @@ -164,6 +164,7 @@ queue_ops_rsa_enc_dec(struct > > > rte_cryptodev_asym_session *sess) > > > uint8_t dev_id =3D ts_params->valid_devs[0]; > > > struct rte_crypto_op *op, *result_op; > > > struct rte_crypto_asym_op *asym_op; > > > + uint8_t cipher_buf[TEST_DATA_SIZE] =3D {0}; > > > int ret, status =3D TEST_SUCCESS; > > > > > > /* Set up crypto op data structure */ @@ -180,6 +181,8 @@ > > > queue_ops_rsa_enc_dec(struct rte_cryptodev_asym_session *sess) > > > asym_op->rsa.op_type =3D RTE_CRYPTO_ASYM_OP_ENCRYPT; > > > > > > asym_op->rsa.message.data =3D rsaplaintext.data; > > > + asym_op->rsa.cipher.data =3D cipher_buf; > > > + asym_op->rsa.cipher.length =3D 0; > > [Shally] I think this should be initialized to length of buffer > > available i.e. RSA Key size? PMD can override it with length of actual > > data written at output, which has to be less than , equal to RSA_key si= ze. > [AK] - its because API comments are ambiguous in this case and we have on= ly > one field describing array length. > I would suggest to rephrase cipher field API comments from "length in byt= es > * of this field needs to be greater or equal to the length of > * corresponding RSA key in bytes" > To "underlying array should have allocated enough memory to hold cipher > output (bigger or equal to RSA key size". Then length could and I think s= hould > be zero or unspecified at this point. > What do you think? [AK2] Something like that: * When RTE_CRYPTO_ASYM_OP_ENCRYPT op_type used underlying array * should have been allocated with enough memory to hold cipher * output (bigger or equal to RSA key size). The same for message field. > > > > > asym_op->rsa.message.length =3D rsaplaintext.len; > > > asym_op->rsa.pad =3D RTE_CRYPTO_RSA_PKCS1_V1_5_BT2; > > > > > > -- > > > 2.1.0