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 0E43BA0553; Thu, 26 May 2022 14:19:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E232A40151; Thu, 26 May 2022 14:19:33 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id F1D3A40150 for ; Thu, 26 May 2022 14:19:32 +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 24QBjgv3025926; Thu, 26 May 2022 05:19:32 -0700 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2176.outbound.protection.outlook.com [104.47.56.176]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ga8y0g3hy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 May 2022 05:19:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S74GKy7DK/feZXRw0M2TfO2lB8xROgCWyJE3Toy++c+nBx6JWP3gIetsrkG4MbGmlJuzxaqFpA1QG+EZOlXERenfXo2K5HW/tGnn5Cc3cw2ic5psXb+4RwwIRmTT5kRtiVybswqsv6FMAbcbAec2rVWfyAweQaktL94lwyKoN+P+VuRnuOIPXk/fWcsT1OFW9Y1dNHnep4IuEUrRckatsTQ4tcwb3eNwVZqIRA4VJgv84uH5D9VLaDv+MVAZZTUfBJPgKowxHEQrlBtZ6WRy3ug/B7lLsZJ4AiJp1brVeDs9j7qMUzL6EqJqwBEbBrLARNtOAad9spJs5URs/VU9ew== 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=Y3wX0cOom5JJI6GtpTz1opEQG1eek4ggEHN46lENXXo=; b=GC2gQNhDYag92FcHcPV+nt7ap+AYsvOHkILdIaEUf+E505ufT3WsWggbFZ5newsAJrMBcQGjWTqQIcQ9oo+0unXl9hLyqSTCYJUF7KWNGyAxXBcp6kUz5rPETeKBP6oYQtKnAggJA07ATQwv3oL8/Vdk090f/SYTU1rqMOM9nm1B2PL/cmuWHU7N306moZ05/Om2qwt/Dq0wDqCW8X7HsZhvsAr/hm4P04CdmBo5k+EjeQxtrFjOn11AioXXha1v0UwetNH1zo+Ui5KqvHEZB8a33XCc7C8PidJG5+35GMvPwRFCPPzo/vLitz0yF60C+8jA+wvXYOeTY5x+rPtURA== 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=Y3wX0cOom5JJI6GtpTz1opEQG1eek4ggEHN46lENXXo=; b=jhIm1lwAAUrfRDqd3uCY8IcykFbsYOTvzjhEvdVNzPiQd/wqUyAbv8xiAGOgKJ/oiHgDVRi5UcJjnGer07EcODi6amVmu/5tfOyp9O96bDfsAEmJQjti+q9oF1fVaDJocZA0OdbTY0oXTdRXG05V0brgyYyA/h0qd0CE2rbiE+E= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by SA0PR18MB3536.namprd18.prod.outlook.com (2603:10b6:806:73::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Thu, 26 May 2022 12:19:30 +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; Thu, 26 May 2022 12:19:30 +0000 From: Akhil Goyal To: "Kusztal, ArkadiuszX" , "dev@dpdk.org" CC: "Zhang, Roy Fan" Subject: RE: [EXT] [PATCH v2 11/14] cryptodev: move RSA padding into separate struct Thread-Topic: [EXT] [PATCH v2 11/14] cryptodev: move RSA padding into separate struct Thread-Index: AQHYcFmmv8vFCF6Qz0+PFXv+Hscv4K0xDukQgAAEq4CAAABRIA== Date: Thu, 26 May 2022 12:19:30 +0000 Message-ID: References: <20220525155324.9288-1-arkadiuszx.kusztal@intel.com> <20220525155324.9288-12-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: 6d5369f6-046d-45ee-3566-08da3f11fc07 x-ms-traffictypediagnostic: SA0PR18MB3536: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: nI8dAEdCVijaKrFHnFteMtRi9wSjFghgcJEpg4EWN9QXf7e0lrQWIvYLA96zL/asr8vgEB+hsKZfRCdQQtR8lBPLs3FbG/HEOYzVTJHTBSgwLu0yNStKJ2O0KJftVvFrO5XocOPhOFJxhXjE+w+oUEzE5YSZ4uZsjSQMz/Ekb3acK/2ULM22aAvb4XPaOz6hwkL3tdJdlWhIROnec72+lJ4yKhywlNMF5g9RB3HlKn1GM0aN0wQ3YniF8PHXvWv5w1rmdPMSw/7HNIzyB/xOKnNEvoaOO7G/ynVSBgOuDOnsXUbq37CSqQaghgZgT3YFrHcPOZP3yX8cmsZEXJE3/B9ltN/au99PKdoYV2cjsSOSLjA0vaJOSo2mcJBzM3kRP9JATPsBDDPU6WGVHh0V3NUTZMrEpOX/UcyP2z1SiBNrOyWmWBf2z0Vqd1cnyVyO6VgJmGF6T0d+xhRAcF/wTLtKD/SDJLievGu2KgyWLMeXIaqRO5NIrz3vnBPH64XieQeVEYhVTW90QWLeJJb9WHuiOAYhnvByg56zYCr0lXIUws3vBQ3vcE4GPGM9dsAkEtOXKrFr3Izot8+m8XkuOYsnR6dDidorhlbF17jMAFz4OYGmIqpLO4aPeq7t4dFR73HQYMGA0a4bpSNDePt5qhlvHLkX3RTGiFDkIwmO94VW7vTwv8hmWhNwI0IhlQ9B8s5GS8uUseE8liLzlu5rGpo6dHkv4/flGIrNpX/+B9I= 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)(8936002)(110136005)(26005)(5660300002)(38070700005)(9686003)(55016003)(6506007)(7696005)(55236004)(122000001)(52536014)(64756008)(66476007)(66446008)(76116006)(66946007)(66556008)(71200400001)(33656002)(86362001)(4326008)(8676002)(83380400001)(186003)(316002)(2906002)(508600001)(38100700002)(473944003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?+kbk6bUWt3Wcr7sXn3si1uJ90OcUvWda7iGx2MBE1JndRdfi+1TvU49Wffcg?= =?us-ascii?Q?yTmjkJy2CVUNNsSFKLXWZ8OstUJKhZby7atJi/9TAVh81lwLWJHy2wxJPiE6?= =?us-ascii?Q?uKYMMeR/1TSh8X7kFNpZfiKhy1Nc7o/Q82ch06x2nA86G8q9OaGBXgSKeYjw?= =?us-ascii?Q?Pkj1ygrbvin60vPcCXzc5e/1vxQWBHKfox4MekATdsoNWnYBm9y88HXy2uq7?= =?us-ascii?Q?zW+1DvEdVOd6JCb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+A?= =?us-ascii?Q?/nAumM5w69IZW72EEpMnB2zG7wQbQCLa/4XP0fnnWQpziBGhIxIA5BKhpyF6?= =?us-ascii?Q?L72UMYUVFferUuj7KVqhCrRPOkkidZyUChAZTQDBhWpQyUQbN4MIvtt4KFCY?= =?us-ascii?Q?vcNUZrovKhBF8wphu0w6qHBEq7H0t3K+yhyYlf45Xcfn7dLhqe6vUW1/43wg?= =?us-ascii?Q?pUKsR/y4Nsjy3kQBwfq2issB3ddMBhi8rl0EWhSW16FuCBc11Z0IWtWpnTnu?= =?us-ascii?Q?N7e7QlPbIE6CU/9ukrrda1f7U40SJVvw3Vq1eo3ZigR9oWBS44lU2/I/WPb+?= =?us-ascii?Q?1sMJ4kP49YvhWiPFCyAtVqdJX3ONTVzVdVc0M376iok1tsnWhHY3trR7Ovj6?= =?us-ascii?Q?WrtxnFwMEtPyP62iXYkQiL0Te/tb+CQlA0zqBF3NBYY8tjOwSym4pjpdH2sZ?= =?us-ascii?Q?TSKNAe5wskMqDcaAuzEt32cyhaC2vAOOxuPKQPlspxFdQSUqIGqKiN+o6uSC?= =?us-ascii?Q?26LVSSlZl+AadeaDHHPG1RfWD7DFXtT97ndvV+Q92CNwG4fqUNFWvR+qGxd8?= =?us-ascii?Q?r9XMHd7RAQgu+1uMrhWMQC/nR/zxZzvYT3+Drat9t7/YAgeRV4G6Pu4q3H36?= =?us-ascii?Q?KJ/FEaqflA=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: 6d5369f6-046d-45ee-3566-08da3f11fc07 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2022 12:19:30.1358 (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: Ag1dztp544gmc1VdkueFS07zUOlsfgzVApMuEU4ZjxUxJeLQUWvXOZmAEqsDk2wlULygNK4vTVyp8wB8pzcKcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR18MB3536 X-Proofpoint-GUID: cJz5SULpUYYr_PW5UwyGHR1LQc0XI_Jx X-Proofpoint-ORIG-GUID: cJz5SULpUYYr_PW5UwyGHR1LQc0XI_Jx 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-26_07,2022-05-25_02,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 > > > /** > > > + * RSA padding type > > > + */ > > > +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; > > > + /**< > > > + * 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) > > > + */ > > Forgot to comment on previous patch about the valid algos for this. > > They are removed in previous patch, but it should not be removed. Right= ? > Which hash functions are supported by RSA can be found in RSA standard, > additionally our list was incomplete. > There is no Hash functions enum in Cryptodev -> we keep Hash functions > together with mac aglorithms, so that's why it was probably included in t= he first > place. But I would say we should not specify valid algs here. In that case, mgf1md comment should also be updated. But again, if we are combining with mac algos, we should specify it. Right?= This is not RFC, it is our implementation of the RFC. If we are combining with mac algo= s, it makes more sense to specify the valid algos.