From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 0E27678003C for ; Mon, 1 Apr 2024 01:46:37 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=rMiGNhOX11GwcS4bHAl1rfNPYXMMzEWp6iKbP6m7ddA=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1711935996; v=1; b=3hhtexCMKhJX5Y/DMzkTqcn0a3I2acUPQ0QQ11Nw2Pg5y0Hm6biAgGamFIsA2S3uKNYo/vRs dtJewrxGxffJZOvaUs+wrMygpLqoY0qey0ZgDpRPfnd6J5XTvf4MrjNoTAL2BCry8ZQHeOokhFX iWQPIalja1FvrCn7t+dllQ+Xyp386n6XvzcSZkKWFoS3YauPmHJtw7mnIkhFQSi0grqWPO4P9cy 906LbMc0GYd9PYg3Wb/BcLZcH4feqr328n47aRhIxy/J+Of1z+prj3TI0ixPJzDTSZv81b8hVkd +cbR+EXvwv9+NTSCmXbptnHus4PRxkh6RkYPzRBrrfgLg== X-Received: by 127.0.0.2 with SMTP id g4QBYY7687511xshvIMny5gD; Sun, 31 Mar 2024 18:46:36 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by mx.groups.io with SMTP id smtpd.web10.29035.1711935995613550215 for ; Sun, 31 Mar 2024 18:46:35 -0700 X-CSE-ConnectionGUID: gt1fq8fdTpmj0XLqWVUNZw== X-CSE-MsgGUID: G4Y5zLNkSP2PEuCZcYVGoA== X-IronPort-AV: E=McAfee;i="6600,9927,11030"; a="7240153" X-IronPort-AV: E=Sophos;i="6.07,171,1708416000"; d="scan'208";a="7240153" X-Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2024 18:46:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,171,1708416000"; d="scan'208";a="22061238" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 31 Mar 2024 18:46:31 -0700 X-Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 31 Mar 2024 18:46:30 -0700 X-Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Sun, 31 Mar 2024 18:46:30 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 31 Mar 2024 18:46:29 -0700 X-Received: from SJ1PR11MB6227.namprd11.prod.outlook.com (2603:10b6:a03:45a::10) by PH7PR11MB8525.namprd11.prod.outlook.com (2603:10b6:510:304::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.41; Mon, 1 Apr 2024 01:46:28 +0000 X-Received: from SJ1PR11MB6227.namprd11.prod.outlook.com ([fe80::301:5dbd:207b:5578]) by SJ1PR11MB6227.namprd11.prod.outlook.com ([fe80::301:5dbd:207b:5578%4]) with mapi id 15.20.7452.019; Mon, 1 Apr 2024 01:46:28 +0000 From: "Li, Yi" To: "devel@edk2.groups.io" , "cruffin@millcore.com" CC: Chris Ruffin , "Yao, Jiewen" , "Hou, Wenxing" Subject: Re: [edk2-devel] [PATCH v2 0/3] CryptoPkg/BaseCryptLib: add additional RSAES-OAEP crypto functions Thread-Topic: [edk2-devel] [PATCH v2 0/3] CryptoPkg/BaseCryptLib: add additional RSAES-OAEP crypto functions Thread-Index: AQHagu2/7CoiIlKe2k2AzhdatbeHPrFSorkQ Date: Mon, 1 Apr 2024 01:46:28 +0000 Message-ID: References: <20240318215205.1339-1-cruffin@millcore.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ1PR11MB6227:EE_|PH7PR11MB8525:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: BZLzujVYngInWx8Bvd8vJa5C29oXlM25nt/ySGiWaMhq2u4x/wzjgY1dcqNZrGJgkXLTV/zz/WxLRJLUP3z/NE3MoirGUPZI4Cl/G/ieyVdByIddLbUAq6r818GNd7LisjKETvupknWgw+kFe42C4rFYvhs7w1IkcVCTFXd1bduZQjyyYwF7WB1eI1bfhfeeQum5YprCZtiOulGg6Eg/IBjf2E6lCjcSIM7N+uF6DOL3Gp8h9EyE3oKJwsH1zTjIknN7qbgxsjYVbzwijlW7Z8ehyWTnKlwdlmTd4yReYtyZlh4AFPWbshzYNaj4HdBs+zkNgcF8nzqNz4/vHNeU6PD2r07Flky9sFyhUjqcKkQhz5VUbpNNtwzfJpT0KSVXF2q16uvIYmZL8YWcAa/mdpnQAqOQd7bEF4VC9aj4S0e8+Le4+rprjw/n5c72l8EQ2smjZHTDknix9RwGG/yTXwX1BuHYZH3KCgwduHxUA8p+wFSXxpVQsYUNPZ/GYdOHlEqCIr3LLxtpctWs/3ANS44YnKr7Qbi9IQohmCRI2nrEhGBSDJzcmSczfujJ19l6jCKYRxS1I6v8faYmSiR/CoqYWiZU8meth1ZacF0te0qMTDLh7bZ/La+2OaW6n9sc x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gAsfiiBwxhi9VRk7bbmjyGGkluDHnyQhzzNrwydwAf4fbZMa0IdjlBs/PEGs?= =?us-ascii?Q?UrR/6A+ameILyQ5BPBpcJR8HJFy6aFFdRIQ85zryhIlB3vP8+aAVBb4YHMzG?= =?us-ascii?Q?LXVu9Bzcw0LmUzxpN8d7qST3yjlRH9pG9nKCrLDAMZ9IdkOMcob/NkSdtYFT?= =?us-ascii?Q?5gw/GpF3KMzjiC1NImsjmW+0ULpNSzJH2RV++3CgR2YTD5tbHdn5oLKICl4P?= =?us-ascii?Q?lIM9i35YAJWUQbDcS1JawScUUYzm7X0d9Jx5AQFvY1y53LaFppGd2SCo845Q?= =?us-ascii?Q?TrksRqwK5oCUTksclnFw3H3CUQEtScfHZ7ouFJxi194ZRNG6lEvUhkET8xJL?= =?us-ascii?Q?dXnZ+JzbdWdFxw/7qgVtBv/UtOExli7FU/3SoigkLXWA/j9+43lux2bv8TSi?= =?us-ascii?Q?An+fo3BSLmJrks/RKEoW2UmhHUxnwyi8D42z59f7Wugnw7weOsIc2eNdGK1a?= =?us-ascii?Q?ev0Rg7Ij6GbDE/36H2ywI3fyoNyxc7JHKPj4ENCtgockiFrYPj5Dx68+KhW9?= =?us-ascii?Q?4xuJU0N3i+YVUQG/p6N5BeeGy6ckpXCKtUgZ3uzvv/xDnsdvRTjUMYUQGksL?= =?us-ascii?Q?n/p91zS9KhGG16TAumclNsA6iC5OC0Kje+DZWNhJFrEuX35Ev35ViCR32LT/?= =?us-ascii?Q?t6PrazRIF/eeouacWRd4HYMg3DQUCmzrbTM7tdBeDtatpHxE8bbvGwAovsep?= =?us-ascii?Q?L74UpVQAuSwfU+PsHTih7ZQALSXPIh1X0VgmhQLUt1hw0JvPuTOySzExYani?= =?us-ascii?Q?hOaVv6dJI5BZOIP2z3TLbwX5yOYLGxmKOm0RWJO4JtRVsPhCNlS/BbJE/NRf?= =?us-ascii?Q?kZNIlDkTJDHsJZDtU8K12mBKECgu6CHIuZbthK/eY6YP23LcUhhLTo8pRgiD?= =?us-ascii?Q?lMYqX/7Pf0CylF5LaYV9eO3EsPeoXYl9DyvIyHpwYfJEh6t/UjqPCS/sQ6oY?= =?us-ascii?Q?6Sr28JqGHX07vAMw+o+7llyx/1+zfey9M1c//tXYWyagJL0sS5+FU3VumDIO?= =?us-ascii?Q?H2ze7kh7ewGlgTjRloNZtdjGnV+pqlT/3xR8yHaGj+xCYBsgerCYMhABcqMa?= =?us-ascii?Q?GE+2kSweaYS1x8ZBrdwAxYj931Pc23ifU4bfyKiydKPTV6rHwTRxyLIwHB5u?= =?us-ascii?Q?82yzayeDkfZit/lTqALFAuhPgsdOVVhCEvFfoe/2Of1Hm+GR9xLfD5e6OuCm?= =?us-ascii?Q?bOVH3JGlmP0O+agezeGOssPjp8D01a+92VKHpc7UQ3O98m3/uTqWEr219SEl?= =?us-ascii?Q?sMLnAUUw4aXjfGa5FIueW2nqW4Xzq0dVwyJDwkRtygicLn5cRQkAo1dzr5jk?= =?us-ascii?Q?31SH5F2//OzCdB5/NTxdi1aFBe2ihGwCMIi0TkXMv9HPEvuGF6+nZkmgY+xM?= =?us-ascii?Q?UMRRJC83LF1DNSB0yy09CnPuys6W0U40Kk8mg3bxanB50CPrCyAsJO81VF0V?= =?us-ascii?Q?feHATvJF+zsBFNwnR60Dk1gNCAVfJnMTfX1KqMFgKSGxajH83b65/2MeYPPw?= =?us-ascii?Q?ZqsmGmaJW3ELgKcKCxEMljAqJL84UNk6cWWnShuxoJUr9Hd6wdPIjdaOHUoU?= =?us-ascii?Q?XF+kDuhvSswBMJj59RQ=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ1PR11MB6227.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2152c750-c9ec-44f6-3bc1-08dc51ed8c45 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2024 01:46:28.1707 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 54xFI9YGxSRfYAlsT3qL608YruhQR31tRL8lT3IG33poP/0XpgPLAi+fJnT1wDZWqplEq3GznN+0Chyg6BESPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB8525 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Sun, 31 Mar 2024 18:46:35 -0700 Reply-To: devel@edk2.groups.io,yi1.li@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: VDmsJ9xQdTHLzna3qP4MVSrox7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=3hhtexCM; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Appreciate your efforts in optimization of unit test, for this patch set: Looks good to me. Reviewed-by: Yi Li -----Original Message----- From: devel@edk2.groups.io On Behalf Of Chris Ruffin= via groups.io Sent: Sunday, March 31, 2024 6:00 AM To: devel@edk2.groups.io Cc: Chris Ruffin Subject: [edk2-devel] [PATCH v2 0/3] CryptoPkg/BaseCryptLib: add additional= RSAES-OAEP crypto functions From: Chris Ruffin v2 patchset adds: - Add digest length parameter to RsaOaepEncrypt(), RsaOaepDecrypt() so that= SHA256, SHA384, SHA512 message digests and mask generation functions can b= e used with the API. - Add NullLib implementation for BaseCryptLibMbedTls - Cleanups from v1 review - Significantly refactored and expanded test suite: - Use UNIT_TEST_CONTEXT and abstaction to run same tests on Pkcs1v2Encrypt()/Pkcs1v2Decrypt() and RsaOaepEncrypt() RsaOaepDecrypt() - Align DER Certificate / PrivateKey used with Pkcs1v2 APIs with RsaN, RsaE, RsaD parameters used by RsaOaep APIs so that they represent the same keys. - Implement fixed ciphertext test for Pkcs1v2Decrypt(), RsaOaepDecrypt() - Implementation was also checked with wycheproof test vectors (not included in the patch). Chris Ruffin (3): CryptoPkg/BaseCryptLib: add additional RSAES-OAEP crypto functions CryptoPkg/Driver: add additional RSAES-OAEP crypto functions CryptoPkg/BaseCryptLibUnitTest: add unit test functions CryptoPkg/Driver/Crypto.c | 130 ++- CryptoPkg/Include/Library/BaseCryptLib.h | 117 +++ .../Pcd/PcdCryptoServiceFamilyEnable.h | 4 + .../Library/BaseCryptLib/Pk/CryptPkcs1Oaep.c | 598 ++++++++++++-- .../BaseCryptLib/Pk/CryptPkcs1OaepNull.c | 130 ++- .../Pk/CryptPkcs1OaepNull.c | 135 +++- .../BaseCryptLibNull/Pk/CryptPkcs1OaepNull.c | 130 ++- .../BaseCryptLibOnProtocolPpi/CryptLib.c | 114 +++ CryptoPkg/Private/Protocol/Crypto.h | 109 ++- .../Library/BaseCryptLib/OaepEncryptTests.c | 758 ++++++++++++++++-- 10 files changed, 2098 insertions(+), 127 deletions(-) -- 2.44.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117272): https://edk2.groups.io/g/devel/message/117272 Mute This Topic: https://groups.io/mt/105239222/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-