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 1B096A0553; Thu, 26 May 2022 14:41:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2E8140151; Thu, 26 May 2022 14:41:52 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id D16BD40150 for ; Thu, 26 May 2022 14:41:51 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24Q9AQXb023142; Thu, 26 May 2022 05:41:51 -0700 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2102.outbound.protection.outlook.com [104.47.70.102]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3g93ty8qtx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 May 2022 05:41:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iaCPJ4YzZyceHKKU5XWL8Liv68eU5+KSfeDqfEfhMGkp7OYAmC0QV5NRq2QwXg66UeBWrWg7iVB7TkNxq9ucaz/Jn+Xz+aIN04/ck/dD5L7aYzZJgWAFG+yvoSjLelSR07BDhg0bdlogIHHYnnYFTzG3hnvYM7Lmm/UUsK5PKI7f8vn+JA6vA+xBnVdQt9tCm2ezSDxVJMnspxr07yaHZ1aRwCHDdEsiGSvj7vgQs61GKBd08/EunaTgYAIE9X6djKomDh4fOj9EfbQqCggL+wCVFAAvJETtnWv3vC31bfOQSeH08CPHCzn07Ji5FQZ7qcpQK2/vOn5XS3cY2tTbbg== 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=JIsxySUJDVvwvGulLjF9BwJQj/+CtYmgTxAMihXOobs=; b=bep5FaVmcQRkdQ/7XZleWzOa/d83h/IHI2y6vMaLfDSTM0/DVdFisoluuwT8cOQ/e4oCVsAWNYNlrZ5uCYoJhdUL6i1drHVaz03z/06hYxK2Pq+wZQT6WY9P5DLvtHfKa39me4LVXTDI1OGGfkGxhmXh+u7yAXt0OsM8gBFI15G2nmK+Xz3yB1m8/E/haTJJAJRU/wzgHop8Lf6Ve0asB686UNaCrxheL7gSPtNTqQMiUMVYHHqka8uocfcIpQYdRUqnT1jc5i9KUiWjz1ecgU0MjhnFmbzE22k4l9yYQwz7YSWbw7iZWC7N7CFqwNpNuYMVBBfmO8g4NhRYS7cNTQ== 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=JIsxySUJDVvwvGulLjF9BwJQj/+CtYmgTxAMihXOobs=; b=tcTSg7jHj5kOA2dxvdG9ogKKxrrmemRAALvr/3OFdxSeCpBbLiLzLDUt6J7jYaoa87PPsoNmJX+yawLfIeyl0LELAmf10BoZIZWP8CLBtLTVTHj5j3oFpHPIHL23LCahoZ5/bechGhDueU1md7f4dAtDv9r6ETZoUu/aNiT97Fg= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by BYAPR18MB2648.namprd18.prod.outlook.com (2603:10b6:a03:13b::19) 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:41:48 +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:41:48 +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+Hscv4K0xDukQgAAEq4CAAABRIIAABagAgAAAORA= Date: Thu, 26 May 2022 12:41:48 +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: 61bc75e2-52e7-4976-e5b8-08da3f151991 x-ms-traffictypediagnostic: BYAPR18MB2648: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: 422IfTHF34ZE4fm4KEEzkY7c0X6Jl1ehlJwNLXVKqMLbsw3kHlU7EfuLUUsiun6/eZo1TKHmqCLSb20FzMxRtketxTZNmbMONux8xfBMivbMoXPnGS23PnCF9KnyFRnFcycLqbyk8WR9APZO9QzAwD4r61jkPjJPVDFTwUh9RkRpRaaVzDOB38ZXzVrEgYfduJS3osK0SsYzlKM3bOZFt28vHXxnkxvjDauSPvq2jvWk9JKgG9O090qdMkmsz5BD1b1vwJSq0Brj9N+YJB6hIl7YW/x1mymdE4LCs6lYfWL46P1ptJd5Wr37JRx3qXpTEpfmspowwSpShUphhDZSQ45D7Fm93WSS3cJHTKQqlWfCuI6p8soSrDOTmC+Lp3akwHerneE5WLRHMzwrqtm+b5VQrgHhfp9KxXlqQPfcUr019qW5/YAK+2rOKuSruKu+4yMQaxY2RRtyA9DMgXHlH7ERmbMpL70kvU+9PwE52B6TlVaio539My8GKstOK/VJP+Z+Zku/IFkEu25GPd88Ubvx7iQBSqYLZSt7bL56hd4OafZDEWRiF46ftcBo+/QTvX1jFwCRLg/1P2Nck2f1M5Np8M0ovdJeNjT4h6azJjI36JMKMMijqnWu6vkHxaAlD3md1XnwWF7DPLLOCFRn9IPYCe1+BB+0wxiUH6/T4GIuODhFi5h/QucEAz4aU1Bit8VBqWn+xl5CJHOmGxPg2a9t2RILmIcYoXZOgNCH2zI= 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)(9686003)(66946007)(66476007)(66446008)(8676002)(64756008)(66556008)(5660300002)(4326008)(8936002)(76116006)(55016003)(52536014)(122000001)(83380400001)(508600001)(33656002)(71200400001)(6506007)(316002)(7696005)(186003)(110136005)(86362001)(2906002)(26005)(38070700005)(55236004)(38100700002)(473944003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Em7I8vK/DxmBQ3seLo80MrgHoCqjekQQ/4HIfYqTPRMLvnHqcgRTa69vRLzN?= =?us-ascii?Q?l2r8Oq8iOJwXq4lm+hqnX34ZpRzF3TDaX5gFq4KZyKzNXzqsktLaZDRP1D94?= =?us-ascii?Q?lGf2zradAErZnWXB2frzWAZzGiG+kbE18B6LduqyDjh7+iIinoeTHnBWQp65?= =?us-ascii?Q?KfvRuOL9M2vsjX5ER5U3wxP/PJMhAfj4KhEU/KV6pZZbLzsJKm8h0pRpIYup?= =?us-ascii?Q?aK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K52T58/ufj?= =?us-ascii?Q?HiICUvT0O34jPvRd9uq9r6PUm4bGjZXUO9b9J0eFkqvlCvLcOOE5OPgDW+hO?= =?us-ascii?Q?DUdzvlBKVG85ph1avzsdhDGk8w7MZDwha9WtHc0lkQvBv1ZkGd2vw7hcIT5i?= =?us-ascii?Q?hyV9zYwU9Y41dv1qvypuf/R60J6MsY7kJvEaqeLlPOjTtfjD41YVSJGPTZJU?= =?us-ascii?Q?8eauLF/gbHlFGFKWMfmOI6piASswFE4PktLlxQi19W0/Z3mRJUv5kXU/m+11?= =?us-ascii?Q?yiCbV5pR8gPP0NhmrLNXEsIhha5s2qFdoy5L/NzMNxFXbbc/xhuze+3eIseL?= =?us-ascii?Q?K04zkhu13fjAx9V+Yccg2FWEs/+gyRxvMYjQJl1+b3NmsKtwzGhDsez0lRRA?= =?us-ascii?Q?ugCbUPpzsGIgz8p5U+LAbPWhswxPBIrvBjnqMI4qp4MKQmPuR+tXrZT1nGhG?= =?us-ascii?Q?72ARW0cVd8DlMnhasb6haHrYmsJyZ2I6w2k2+4zeRoRstCNVnlm2BPrwtGV+?= =?us-ascii?Q?lmxME5v1Z6PIJjy7iWFH2yiHUIU99Q7Tctx2JO0vsRrzhwFxxhdJwlpa+Zuw?= =?us-ascii?Q?V3M13QmtAxuGjzgJn+/Oc44kc7oLl9WbLdr8AY+jul7oOma/k9bzB4p7ET6R?= =?us-ascii?Q?PL6UUFVL6g=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: 61bc75e2-52e7-4976-e5b8-08da3f151991 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2022 12:41:48.1889 (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: VeR/5g+qn+QUd1gaTkow3jDSXjx4CF89l2R068LUmZrRsugSA8x3Uo0KVGfu8DiOBfojh2N7Lk6YUt6ayARpIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2648 X-Proofpoint-GUID: uRt871zw7YN4VAWiyXNGYqRkxuBnSB5t X-Proofpoint-ORIG-GUID: uRt871zw7YN4VAWiyXNGYqRkxuBnSB5t 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 > apply: > > > > > + * - 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 > algorithm > > > > > + * 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. R= ight? > > > 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 function= s > > > together with mac aglorithms, so that's why it was probably included > > > in the 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. Ri= ght? > This > > is not RFC, it is our implementation of the RFC. If we are combining wi= th mac > > algos, it makes more sense to specify the valid algos. > Its actually not that big problem, though I thought it is stating the obv= ious. > So we can add it back again but with full RSA hash list (including 512/22= 4 256), or > we will add it when this will be added to rte_crypto_auth_algorithm? Whatever current support is there, it should be added to specify which all = can be Used from the rte_crypto_auth_algorithm enum. As not all can be blindly use= d.