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 5B7C9A0471 for ; Wed, 17 Jul 2019 14:54:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDB871BDEC; Wed, 17 Jul 2019 14:54:44 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 6C4341B993 for ; Wed, 17 Jul 2019 14:54:43 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6HCpFUw009522; Wed, 17 Jul 2019 05:54:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=4UkqQ9Kx2QA2j5X+DVPQksAE0X6jpxFi4mgRjOMxoB0=; b=IGnvZ9YmA6kZUr1NypeO+5lKn+SFyzhSd2c+bTl/+uZNCmi1e4IUNlRLEN6EscK664rE 70AodwHyifWA7rTxthyGBlCOCs1ieBT5DVHFR426UHT9FJt8JMOdWxG7/TRaw0fnUkDX qzJXCMgBrndG7yQUupek2uK5R2g+NQ05Hc4rXwydz5TZnkQHDARSIMdmoflOPhKulvn+ 8Z59eTyjVJwn8xRWcCcCcVZC5Yt1Kl3c59/nJM/pU+GugUhtQyKCWo0ScA4M3WVbnXDR YmmsVZTCb2ywNx4xiEYJlO7jjk6sb5V0qGeWH/GUpw+SJRpYMYeJxR1GQvbyc/EDcarS FA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2ts07vg792-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 17 Jul 2019 05:54:42 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 17 Jul 2019 05:54:41 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (104.47.42.50) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 17 Jul 2019 05:54:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xjd+DeusnZYOpMNgUiZCAoK76yGla9z+j7lkbpKl+GHBOUuhPKe1cxXPoQL/TAu2e/Ze+VOK/iqSatFCzPfhXfqwuietvWl5VvgjzCvNMCeGUfLMznVtTh9sYAJHReqzK1jh2EUZzyOiENMHSggt6qE2SQrRkRV2WVTkxcnRBs1PSKKN78FYytCQvGOPlWmO+uI92GndkLVE7KRAyP2qgsttZU46g2Y103hy2m0tTMLZPqd6zpdl6Pj/7HvijTwDusEOw4d8gw8hRpO3sx/I9iUw5zcnkpXYFGq3UnSy1hOV7nw7nE13OvuFz5hwo8bZNR3uVdrKetW0IhNjklmOCg== 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-SenderADCheck; bh=4UkqQ9Kx2QA2j5X+DVPQksAE0X6jpxFi4mgRjOMxoB0=; b=Mx1YONfnMhZa6UCsMZd4CNVLMgBsj4zWmrJbfOy6l+JIVzHv6k7sG7js/EagMzrI/RsCa0+ruMNe/NvMiMutGjPDyJCC5U6L2yW1T9G+HzuqPhJAoSv/FH2Pu2oxwtRlAdwauEpfOJq0ykQrX9gNiYrcVA7gy1IfmtvGxlLTvyROdYlvu8HX4fPoS3k/Gmmgn5EWx0B9LC3DuhO/AFhVjSyb9V6AXStJaart0jHBdOsUMLAtt+fMq1KRp/DILtLIFhL8uUxLG2FNixyrSOU5gVKblXKr2q7bNZyEQD7/YX1RYLb+OS87PVdQMqcCCA4qldqidOZM4Ytzec3732e2PQ== 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.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4UkqQ9Kx2QA2j5X+DVPQksAE0X6jpxFi4mgRjOMxoB0=; b=hLmq8CQqPJKUQufNRRhQjz+1aHg9wX60wMw4x1D51qLX42de0VYvLwTg23pqLsIJ5iFzTwaKqINks/EWftfn0AxhfTO1qYSp1V2evI6QzN98GVJUIur0JEVBuUpXpgy9Eod9mxlCAymVWUDD9KJR6GH9KcK7GhPOB2njxeZKCQQ= Received: from BN6PR1801MB2052.namprd18.prod.outlook.com (10.161.157.11) by BN6PR1801MB1858.namprd18.prod.outlook.com (10.161.157.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.11; Wed, 17 Jul 2019 12:54:40 +0000 Received: from BN6PR1801MB2052.namprd18.prod.outlook.com ([fe80::b9c4:1fd1:a47e:cd72]) by BN6PR1801MB2052.namprd18.prod.outlook.com ([fe80::b9c4:1fd1:a47e:cd72%6]) with mapi id 15.20.2073.012; Wed, 17 Jul 2019 12:54:40 +0000 From: Shally Verma To: "Kusztal, ArkadiuszX" , "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: AQHVPAfDtho9AJIMDkGAe+PLY4JdnKbOO8oAgAA7OtCAABgJYIAANipg Date: Wed, 17 Jul 2019 12:54:40 +0000 Message-ID: References: <20190716185304.12592-1-arkadiuszx.kusztal@intel.com> <20190716185304.12592-5-arkadiuszx.kusztal@intel.com> <06EE24DD0B19E248B53F6DC8657831551B2808CE@hasmsx109.ger.corp.intel.com> In-Reply-To: <06EE24DD0B19E248B53F6DC8657831551B2808CE@hasmsx109.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [122.169.231.225] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 43e387c9-3c36-4314-0f12-08d70ab5eeb2 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BN6PR1801MB1858; x-ms-traffictypediagnostic: BN6PR1801MB1858: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(366004)(376002)(396003)(136003)(39860400002)(199004)(189003)(13464003)(6116002)(66446008)(66946007)(66476007)(66556008)(76116006)(64756008)(186003)(3846002)(71200400001)(25786009)(102836004)(26005)(86362001)(5660300002)(53936002)(71190400001)(52536014)(4326008)(478600001)(66066001)(81156014)(14454004)(256004)(229853002)(2906002)(33656002)(7736002)(110136005)(54906003)(2501003)(74316002)(11346002)(6436002)(8936002)(446003)(7696005)(81166006)(53546011)(55016002)(99286004)(6506007)(8676002)(476003)(316002)(6246003)(9686003)(486006)(76176011)(68736007)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR1801MB1858; H:BN6PR1801MB2052.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: UO9XJk9p5N5ZY+oHi+k2goHRBAB7DBJSyAw12HCsmdK0rLIrFnHvM1pEMwIFHY5qwNewj8RY7f+7Zyb8q47pEoBojl/8j6eLHnajXFvDjnygN2bE7EyXuhATbCra33YXMhyX0dWVGqDxsIUk+Kz3W7djwKFitMSH1ErvuKgeLtkGAJFVGMPznSwPWh/MX/5/2ddr9Mgytc/K+2+EPlHoEnDcD9zM6y/M/MsPgyFT75CODFgY/cnT3380/zw6FVd8QDTSF1eIUOJBjO2g2GCqaSPlowyE83RPeHuANNycDCh6UaR0j2/XzsNnX4LEnKSDdalrpNRKtoEIoXf98F0q21DqEjxl8E7aC9i7JJFLpeTRORQ0jb/+gnEphL9pUBr9260ib/65vzQm+uopItMODYwUr8X2JmpHg9UxNOKW7UI= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 43e387c9-3c36-4314-0f12-08d70ab5eeb2 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2019 12:54:40.4440 (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: shallyv@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1801MB1858 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-17_05:2019-07-17,2019-07-17 signatures=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 3:12 PM > 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: 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 > > > > > > > > > -----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 size. > > [AK] - its because API comments are ambiguous in this case and we have > > only one field describing array length. > > I would suggest to rephrase cipher field API comments from "length in > bytes > > * 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 should be zero or unspecified at this point. > > What do you think? >=20 > [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. [Shally] This description is okay. But still I would assume app to set leng= th field of cipher buffer to actual allocated than 0. But I look forward to= more feedback on this from others > > > > > > > asym_op->rsa.message.length =3D rsaplaintext.len; > > > > asym_op->rsa.pad =3D RTE_CRYPTO_RSA_PKCS1_V1_5_BT2; > > > > > > > > -- > > > > 2.1.0