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 AC182A0548; Wed, 25 May 2022 07:57:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A1C084067B; Wed, 25 May 2022 07:57:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id E1112400D6 for ; Wed, 25 May 2022 07:57:12 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24P4mRml019795; Tue, 24 May 2022 22:57:11 -0700 Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam07lp2048.outbound.protection.outlook.com [104.47.56.48]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3g93u2jdh6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 22:57:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c/kpS6qFc8Yip+i+UZGGPh8BGubifyhkYvxjNB50QiMOaXhWyCQM0WZc3v0g61zXiklAwFhlnLdpOYTqm9lVlHB1YuEvKtqK3DxiO2l3PzLgShSRntMAe5ccBasHz3JTEaljFAoVtRhP0qdK38T5F2xpP5lUVTGTZwqX9gbQooxJpTskJX+w2XolKNhAhcYwaoOJsnG/B7CYLT8IjutO330pX6Hu9YPKr2Xb5YnZnWpC1Y8orBh5SaonClzU+/GiUhP0EbpAVH64DZFCknPsZt1/QI4DnuBDC79Ds2rfeT7OjKSJyvqBLcboftPLwrFZPP0oLAS+Bb2D3NUeyMG8cg== 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=TMBoBEUtwBo+DoEDfB7tudZ1g+1nLjPxGKg3RGfxlA0=; b=VZWZx08qu5uOpGjv1+ayIDJnbB79BPFq50dqiHuacg2vX06vNGCcAAxQtozO7DGlctRJKFajJ7K0x6Q1H6/DpJd27K6HXFVDHT9UwdF7se0BMrYPgjBnxYwi7s/staz7oqFs7wqpFHRQS1tWoNtI2DEwf6GaO0XGH7qKRgWKHce9s5Ga//LMsWX5YpKouiAfce+j1SmLeOj4ecLT/yjfcmeoPfH4kZR9Q6UbgP6PYTB+ZGF9lLAoCsJCY/G9QEuzdR5Hnj58oMK/ByRbthhcvX+4xE70Gca/dtjtJT+0iV5K7+gYT7gar7J/7lW02cdxT0h/o4KTXy5KH3JN/D/FTw== 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=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TMBoBEUtwBo+DoEDfB7tudZ1g+1nLjPxGKg3RGfxlA0=; b=Pg9NXGqOAPpruxu1rX5OLkWAlbWWcRbfFQo4tXc+Pr9nX22+s1qhAWChid8NjLTyHW3Xb0xLWiOXP8bl4omkxHHA1/OIRtzCkXeGVTYBYWG3Aoy6C8/RJBKo7M4yrZAbbPfZiyLLt1XwTcoYMuNhrQFAUaWhaH37EP9nOrrIQlM= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CH0PR18MB4211.namprd18.prod.outlook.com (2603:10b6:610:be::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Wed, 25 May 2022 05:57:09 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f154:453d:893:f6ce]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f154:453d:893:f6ce%7]) with mapi id 15.20.5293.013; Wed, 25 May 2022 05:57:09 +0000 From: Akhil Goyal To: "Kusztal, ArkadiuszX" , "dev@dpdk.org" CC: Anoob Joseph , "Zhang, Roy Fan" Subject: RE: [EXT] [PATCH 29/40] cryptodev: add salt length and optional label Thread-Topic: [EXT] [PATCH 29/40] cryptodev: add salt length and optional label Thread-Index: AQHYbBe/PofxhL6bJ0+y/qcI4grbKK0t9+kAgAAx1oCAAPSocA== Date: Wed, 25 May 2022 05:57:09 +0000 Message-ID: References: <20220520055445.40063-1-arkadiuszx.kusztal@intel.com> <20220520055445.40063-30-arkadiuszx.kusztal@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1b967332-1746-49ec-0f6d-08da3e1367c7 x-ms-traffictypediagnostic: CH0PR18MB4211: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: OSv/HoEu8v5qXjQtBj9+QkULU7Gmt2VosYqJRPX3e30xzVj+Y1d+f/yZmbb7KiESudfzzx/a33GxJd8ZXadP9KmYPNoR0OiHfOwS2dDSf5xYZOB8JlkXoJ15hmZ0bj82s7z/lqXgY+9WrFFnGr+gbDi96I+VYsB5T9i7jMKOJRFQJDJGbXgVUvV2D/pK4qd0oMw776Pmy2nOOczX19R9vXEsUjdiEyxYi5FTYLZf4c1+L/SfVy8BzZn/FpCV4rQ7J2cVk+8F6KAvDyoA/4HY4sZDC2Wq7aj+YAje9UYzGpvh0qy7EYzvqcUoPXHeTTGOQnUipCNgcPIf8oD/OCLhXRWb6kwhOq4Gg+QCggiyV5W7lw/uts1GVfWITS8mAdaitq9fpul30RuGjt6KMsFst5zi/7EFIwRindl6fTZaM9FDrJGpTFVETkHAqjel2S63lFY9rtQEhdQY9DwrzlCp5a6y6oIGHlXDDedL7NVjgdngSWB22pI2OpuCyrt7dCLLYmfmVRiMLh8XAyBQHKLxfQKakOVD/yfji3G3g0d+Sk3+bqsuT8JpNx7Sk2gDfsnJN8CYCym1SBcBaA7/poN/yn5IeEZI/Z7qdEtp/ZJa6VRilTbZc8QW9kjH/iZqxB5+7HmbV4tckumlW2+Hf0333HBOPRNeNFKwXpvAYwy0FDBghf+Awy8OwAMxOwVnb3a80KJ77ebhAdNiRUc+zqQ8nBdAxny37j0BkyhyF1/v1HE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(316002)(38070700005)(38100700002)(54906003)(110136005)(8676002)(71200400001)(86362001)(9686003)(66946007)(66556008)(66446008)(64756008)(4326008)(122000001)(76116006)(66476007)(8936002)(26005)(55016003)(7696005)(83380400001)(33656002)(52536014)(6506007)(508600001)(55236004)(2906002)(5660300002)(186003)(473944003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?H+d9D5EbQyj4QLzjXyYhh6bKDtN+G6CIIFtE9FVXfys0JrBd3F5WQ53b9IVk?= =?us-ascii?Q?+1t6hhK4rRdwePE8BPzPNKDRJhJu1VBM2rM1EqIGNxw9Gjb1fvpmneISWDsC?= =?us-ascii?Q?301Q7tgGWO41rej5AcQxfZc/+qVLFAOz3jkGbTXfegE2HOcAqJgeDBTg+MDg?= =?us-ascii?Q?aCz6GfAd50n3YR5svFjvHQXWJTxJiF9didvGmJnOev26yD9N71pyb+t0Cs0Q?= =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SWGC8lIHtTZtHjZHdIljiOuBb?= =?us-ascii?Q?q/vGknQ5PC5082i2cHJZB0zwAm+GOOV1pzRqUW6LtXr2IJD/0yH97WGAW5KQ?= =?us-ascii?Q?Np3MeIP0+93HGHYMHnJhRKHLdeQslX8YNzk6m83PjEIpAMGc6UpksjYFGmeP?= =?us-ascii?Q?GXP3KKnHnCfR68GNLGS9bqj9G05948G9GRLxsiwYWzd62jSBJWMpLYV1ua9D?= =?us-ascii?Q?AZ8uBe3BzrgWf90QobL3iTY87xcYyPJ5W3QLgZgh4DEUALQG200nk8wsGnIu?= =?us-ascii?Q?F8I3qNnOL5ETSQP1uiMxBt+/DVSQzu+1AkzDOvvKTvrARjRSw4rNOL3P0heq?= =?us-ascii?Q?kg3CusTuk7t4PfZVPENhlEH+EYJqHBqbbqLSFxfpTqA/+Yh4LZmfHEWcuDMf?= =?us-ascii?Q?cGgk5n4BUL25OJM91oFHhllZ+vFLzDnF8fT7XM5+Bwm8OxnveGYvnv97RQqc?= =?us-ascii?Q?OLpAD2bHouIb4lKJ9wEP6y7RPHxXOhVFJAG9XG0KSr2pRKJ8uNT0cgjJkBMp?= =?us-ascii?Q?EUrJHss4LEAIFRf/erPTMiO6vQIAXedeil/vQw9EioRJYJD4emDD3FjzvMkk?= =?us-ascii?Q?qzbPpWXRctVA/zqwJMXEnjPs+fnmjqJyg7TofJozQsn6E1u4fk3IZAKbbPA3?= =?us-ascii?Q?mtTrXYLdsw=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b967332-1746-49ec-0f6d-08da3e1367c7 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2022 05:57:09.2589 (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: sG+3uujHM/cVRJmDjF57UI/x0Ot+7V9/+GE+mYtNwBapPhY9iCSnmfKTZI7arrRCMCU0SHCzY57sWJe9hgO0jw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR18MB4211 X-Proofpoint-GUID: e8gmy2gM8tUf-CceDQmBEWoRFrmaK2ww X-Proofpoint-ORIG-GUID: e8gmy2gM8tUf-CceDQmBEWoRFrmaK2ww X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-25_01,2022-05-23_01,2022-02-23_01 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 > > > diff --git a/lib/cryptodev/rte_crypto_asym.h > > > b/lib/cryptodev/rte_crypto_asym.h index 97c3fbee38..c864b8a115 100644 > > > --- a/lib/cryptodev/rte_crypto_asym.h > > > +++ b/lib/cryptodev/rte_crypto_asym.h > > > @@ -205,12 +205,29 @@ struct rte_crypto_rsa_priv_key_qt { > > > */ > > > struct rte_crypto_rsa_padding { > > > enum rte_crypto_rsa_padding_type type; > > > - /**< RSA padding scheme to be used for transform */ > > > - enum rte_crypto_auth_algorithm md; > > > > Any specific reason to change the field name? > > I think this matches with the next field mgf1md > [Arek] - now it aligns with RSA RFC. Both current names comes from the > OpenSSL EVP_MD naming, in my rfc initially mgf1md was changed too into: > +enum rte_crypto_mgf { > + RTE_CRYPTO_MGF_DEFAULT, > + /**< Default mask generation function */ > + RTE_CRYPTO_MGF_MGF1_SHA1, > + /**< MGF1 function with SHA1 hash algorithm */ > But we do not need to be that conformant with the standard I think, so I = have > left it out. > As for names it may be 'md' as well, every name is ok if is not excessive= ly long. >=20 No strong opinion, you can keep any of them. > > > > > - /**< Hash algorithm to be used for data hash if padding > > > - * scheme is either OAEP or PSS. Valid hash algorithms > > > - * are: > > > - * MD5, SHA1, SHA224, SHA256, SHA384, SHA512 > > > + /**< Type of RSA padding */ > > > + enum rte_crypto_auth_algorithm hash; > > > + /**< > > > + * RSA padding hash function > > > + * > > > + * When a specific padding type is selected, the following rule app= ly: > > > + * - RTE_CRYPTO_RSA_PADDING_NONE: > > > + * This field is ignored by the PMD > > > + * > > > + * - RTE_CRYPTO_RSA_PADDING_PKCS1_5: > > > + * When signing operation this field is used to determine value > > > + * of the DigestInfo structure, therefore specifying which algorith= m > > > + * was used to create the message digest. > > > + * When doing encryption/decryption this field is ignored for this > > > + * padding type. > > > + * > > > + * - RTE_CRYPTO_RSA_PADDING_OAEP > > > + * This field shall be set with the hash algorithm used > > > + * in the padding scheme > > > + * > > > + * - RTE_CRYPTO_RSA_PADDING_PSS > > > + * This field shall be set with the hash algorithm used > > > + * in the padding scheme (and to create the input message digest) > > > */ > > > enum rte_crypto_auth_algorithm mgf1md; > > > /**< > > > @@ -220,6 +237,21 @@ struct rte_crypto_rsa_padding { > > > * for mask generation. Valid hash algorithms are: > > > * MD5, SHA1, SHA224, SHA256, SHA384, SHA512 > > > */ > > > + uint16_t saltlen; > > > + /**< > > > + * RSA PSS padding salt length > > > + * > > > + * Used only when RTE_CRYPTO_RSA_PADDING_PSS padding is > > > selected, > > > > Used only when RTE_CRYPTO_RSA_PADDING_PSS is selected, > > > > > + * otherwise ignored. > > > + */ > > > + rte_crypto_param label; > > > + /**< > > > + * RSA OAEP padding optional label > > > + * > > > + * Used only when RTE_CRYPTO_RSA_PADDING_OAEP padding is > > > selected, > > > > Drop the word padding. > > > > BTW, can this be a union for label and saltlen? > Yes, will do. > > Also can we name them as pss_saltlen and oaep_label? > Yes, though I am not entirely convinced. These names are unique anyway. I believe it will improve readability. > > > > > + * otherwise ignored. If label.data =3D=3D NULL, a default > > > + * label (empty string) is used. > > > + */ > > > }; > > > > > > /** > > > -- > > > 2.13.6