From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94583C76186 for ; Wed, 17 Jul 2019 07:39:28 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 2519221743 for ; Wed, 17 Jul 2019 07:39:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="vSrP5a66"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=marvell.onmicrosoft.com header.i=@marvell.onmicrosoft.com header.b="WpA7ihQ1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2519221743 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marvell.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A0D5B1041; Wed, 17 Jul 2019 09:39:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 9CFF7F04 for ; Wed, 17 Jul 2019 09:39:24 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6H7YjjT023657; Wed, 17 Jul 2019 00:39:23 -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=M1AEa4aDeWUArNjDVEqjblHvrZ7CTdwPM8wkWpaLYgA=; b=vSrP5a66ZRHC9zHoUS6Bk5fRduPssVwo1xIivaG1aBT7WkKi6Ec7Om9r9CW+V+h2jjJX Z0HUI32Ye1h0uevHgRA2XPf5hWstmpMfiBcaO4Zqui845ww/Yur1Ugbus9Usg5JGw2oB rrw1I47JRzk6g0EIiRcjnaGAZHutoUuBKZnvd2+spQ3bdAa4sPb97BqAhZb5P/9Sg2Dr 8x7o1PNmhXcU4P+BS4BDvCLQ6/F6xM9kLknjOU+P97fDutT8kqZZpU6o/HrwFv1RCyjA ttBQSU5mG/1suGc3jkvKdzqIOhhpwlRKj82evEJjo0QOWhtlA92jD4xdXlJTHY8Rkk0o cg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2ts0a26np3-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 17 Jul 2019 00:39:23 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 17 Jul 2019 00:39:21 -0700 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (104.47.40.59) 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 00:39:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PQTcvgbgSg1M1tbFfwi3Konw+qWSQsfgiUWR21tMBCnQ7/AqtqKcMRSlgXkMR2d9bqBm3RxcNp1TbHZr9YkUTtdc/Q6uqjHt6qnhQxukQHhryNEhsBCYxTvfDcKgbzqde8MJLnDjiNOZRwToE3tNQZ2BVO+Ub7AzrRWCL8EwOHLObkShhfXiQ1Ho7T+NHNNk3+KB4+7SQ8Xhz+J10thMlD/n7H2GVXxVry1QERT71DaRdDNohz6pSVtJqaM8fV2pWFLob5vFhQMzG/0FBJ9ZjDaHcdPTeVl5pPBf7eejdKH3aJwfms897TO5BUU52BVt9dAItcARwGx9nivToPio5w== 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=M1AEa4aDeWUArNjDVEqjblHvrZ7CTdwPM8wkWpaLYgA=; b=XYg/l65ynNJRy99e5l/JL6+xa8B0BBJhITgc78rRmoZUmJQn4aHZ+aWusUNMg/DeVi2nmduzxZFEd4CN+7xOpHhjdQdlPBnrkfpcrb4pm1oDNkAquPA4z8FQvpqeEEOg1YM9NsBIgmec5Q+xycbFXzDUIeQMhWHMVIqi+JKfaY7MasDNZVazxqIo6dlMmmUq9SK3AGka9gzpN2IF7RbrvZmgOfRN1arIHgz5g1CMtzK6jujDxrG5JB/4rXUReO6iwjsCGtNDl150t6M7e9XW3Hs3prXV6c2pNVY7qFP5u2SupBlnxzwj2y1BeYPfpnN4X8GC0jdIn3IzJBVszfalJg== 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=M1AEa4aDeWUArNjDVEqjblHvrZ7CTdwPM8wkWpaLYgA=; b=WpA7ihQ1W43hYwndT6BGHTlYRLofCFelsoMLxzVtaoQckWbm3H1Rx/sgE2gD7sRxNspOZjQ0cM8B2qjExeoWjjszHFWGPX9Z1gbXTZQGAltEbTiPw4SUV+KnPd6+6+9OaQ+UlH0bxYGoMvsbMvct8Qymg6mdNOdmnN3XznSH31c= Received: from BN6PR1801MB2052.namprd18.prod.outlook.com (10.161.157.11) by BN6PR1801MB2017.namprd18.prod.outlook.com (10.161.157.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.14; Wed, 17 Jul 2019 07:39:20 +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 07:39:20 +0000 From: Shally Verma To: Arek Kusztal , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "fiona.trahe@intel.com" Thread-Topic: [EXT] [PATCH v3 02/11] cryptodev: add cipher field to RSA op Thread-Index: AQHVPAfBixRlW002ukCvY9dIsxDRcKbObF0w Date: Wed, 17 Jul 2019 07:39:20 +0000 Message-ID: References: <20190716185304.12592-1-arkadiuszx.kusztal@intel.com> <20190716185304.12592-3-arkadiuszx.kusztal@intel.com> In-Reply-To: <20190716185304.12592-3-arkadiuszx.kusztal@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: 72f3a033-adef-4a93-21d4-08d70a89e180 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BN6PR1801MB2017; x-ms-traffictypediagnostic: BN6PR1801MB2017: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(366004)(396003)(376002)(136003)(39860400002)(199004)(189003)(13464003)(81166006)(81156014)(74316002)(2501003)(7736002)(25786009)(478600001)(76116006)(66946007)(66476007)(64756008)(66556008)(66446008)(8936002)(68736007)(14454004)(110136005)(54906003)(476003)(8676002)(316002)(53936002)(55016002)(76176011)(6436002)(5660300002)(3846002)(14444005)(4326008)(52536014)(256004)(66066001)(33656002)(6116002)(229853002)(6246003)(71190400001)(11346002)(99286004)(71200400001)(486006)(305945005)(2906002)(9686003)(7696005)(53546011)(26005)(186003)(446003)(102836004)(6506007)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR1801MB2017; 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: JGmaPWdYL2s9oax35iry96e3ytbyfrgzxG4OI5z4HzF93eL+y9C2alNOA1uLW46AeSZaT5JSfQ5PyTsl+jDRM86iEnxGYr0K94UjPQyyTKJvP4zyZ/XYO7M+lt4Jqtjp4Evb3jnxjdm0bWTByxG3/x9RKUsK7ziVwyCa4a/XQDM+oggvkQBdH9qGpRlH0I4jQ11vi34zfeUmwn1HNW+jDqBjCBHkzAqkFBqBm93D5tONggdoOLq5+EMhFDg2D7Pl0PR0iavAE9QI+6+WybXk+JF4Rl5OUp41xyXl/JNxeTPHwrq0x2LmRiHfOSZROptJLO7kUDBY4jJiklRXtegDU2llApYVqpkyPTMdnjsm0eJlL+0MuxBlJOoKehgzzlbSbqoit9pU41FE3VjfsNe/dA4+YNRppPeeFJb/SJhabOg= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 72f3a033-adef-4a93-21d4-08d70a89e180 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2019 07:39:20.4643 (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: BN6PR1801MB2017 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-17_02:2019-07-16,2019-07-17 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v3 02/11] cryptodev: add cipher field to RSA op 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: 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 02/11] cryptodev: add cipher field to RSA op >=20 > External Email >=20 > ---------------------------------------------------------------------- > Asymmetric nature of RSA algorithm suggest to use additional field for > output. In place operations still can be done by setting cipher and messa= ge > pointers with the same memory address. >=20 > Signed-off-by: Arek Kusztal > --- > lib/librte_cryptodev/rte_crypto_asym.h | 26 > +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/librte_cryptodev/rte_crypto_asym.h > b/lib/librte_cryptodev/rte_crypto_asym.h > index 02ec304..16c86c9 100644 > --- a/lib/librte_cryptodev/rte_crypto_asym.h > +++ b/lib/librte_cryptodev/rte_crypto_asym.h > @@ -397,9 +397,33 @@ struct rte_crypto_rsa_op_param { > /**< > * Pointer to data > * - to be encrypted for RSA public encrypt. > - * - to be decrypted for RSA private decrypt. > * - to be signed for RSA sign generation. > * - to be authenticated for RSA sign verification. > + * > + * Octet-string network byte order format. > + * > + * This field is an input to RTE_CRYPTO_ASYM_OP_ENCRYPT > + * operation, and output to RTE_CRYPTO_ASYM_OP_DECRYPT > operation. > + * > + * When RTE_CRYPTO_ASYM_OP_DECRYPT op_type used length in > bytes > + * of this field needs to be greater or equal to the length of > + * corresponding RSA key in bytes. > + */ [Shally] this overall look repetitive here. Since now this buffer is both i= nput and output depending on op_type. How about , if we just change description to:=20 Pointer to plaintext buffer. This buffer is input to RSA_CRYPTO_ASYM_OP_TYP= E_ENCRYPT/ SIGN, VERIFY And Output to RTE_CRYPTO_ASYM_OP_TYPE_DECRYPT > + > + > + rte_crypto_param cipher; > + /**< > + * Pointer to data > + * - to be decrypted for RSA private decrypt. > + * > + * Octet-string network byte order format. > + * > + * This field is an input to RTE_CRYPTO_ASYM_OP_DECRYPT > + * operation, and output to RTE_CRYPTO_ASYM_OP_ENCRYPT > operation. > + * > + * When RTE_CRYPTO_ASYM_OP_ENCRYPT op_type used length in > bytes > + * of this field needs to be greater or equal to the length of > + * corresponding RSA key in bytes. > */ [Shally] So is my suggestion here. Change to like "Pointer to Ciphetext buf= fer ..." >=20 > rte_crypto_param sign; > -- > 2.1.0