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 042DA780091 for ; Sun, 7 Apr 2024 07:51:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=v2Md4OBgKFQFTcmFAkte704g8lOZ9Sb7tpEVm+SbFPc=; 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:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1712476273; v=1; b=cu2kLWD1cpsvVyEGDBpUGwgeccnh10sT7S5wrIHV7MpRKw9FC6D/BY1CKlzeYSb/NS/O1a5Y M9H9W385jVdgw7ud2+oH3Prm72HbeCfRGjwPWXKbboFhV3Cw6M5Hap8aIV/WuhWkroPODtxrRm+ g7LRD51NmpBl0Pp9GapzVuduYcA+JJgKDpFeGDTj9H29MjFWM7kNj9H33jqUYV3DKNAIgoUVaO3 hvcpzz5usptnSaIxCUMZT7GI4fw/fo+UTzgPVwAaZEKuZ0UWzG8s08eojvuuCOWrhi/d7AT/2EG r4fo3wmJZsWCxtfuCluv0GE/un/YLLXPUSQuZIDAAJyKw== X-Received: by 127.0.0.2 with SMTP id b3UoYY7687511xJfDx7Rr3kv; Sun, 07 Apr 2024 00:51:13 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by mx.groups.io with SMTP id smtpd.web10.68168.1712476272176677632 for ; Sun, 07 Apr 2024 00:51:12 -0700 X-CSE-ConnectionGUID: tG7J6EwyRRi33TkZuwb34Q== X-CSE-MsgGUID: i1MBRUboT6GTm8hPoe6Y9A== X-IronPort-AV: E=McAfee;i="6600,9927,11036"; a="7643073" X-IronPort-AV: E=Sophos;i="6.07,184,1708416000"; d="scan'208";a="7643073" X-Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2024 00:51:12 -0700 X-CSE-ConnectionGUID: j14Ihd3sQTO95QOLpAhSgg== X-CSE-MsgGUID: /26X8N75T7GRMJ6Jp5eBqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,184,1708416000"; d="scan'208";a="20013237" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Apr 2024 00:51:12 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 7 Apr 2024 00:51:11 -0700 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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, 7 Apr 2024 00:51:11 -0700 X-Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.40) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 7 Apr 2024 00:51:10 -0700 X-Received: from SJ1PR11MB6227.namprd11.prod.outlook.com (2603:10b6:a03:45a::10) by SN7PR11MB7540.namprd11.prod.outlook.com (2603:10b6:806:340::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Sun, 7 Apr 2024 07:51:08 +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; Sun, 7 Apr 2024 07:51:08 +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/7CoiIlKe2k2AzhdatbeHPrFSorkQgAnWmtA= Date: Sun, 7 Apr 2024 07:51:08 +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_|SN7PR11MB7540:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: rkIP2gB6sPX7gwQRfM2uHa72QVqXLPV/nW2WywOglYV3K5edUOo2XA36bPy+o6JN4IkHYfn0uNsy86Sa7aLsbM+LlNqJgUrEcmBMaPrYi56yncFxUWro+FIvZCnbBsXPITrY6if+wktgk26p4vTypGjLI8VZmXB32R+xdvr4rejk3jwdd0/KGsaFziNmamkfHiMNu26VQOoR7gJWUyTRY+3+TdJqIeTO/C93ea+2zDpaw7OGEFPX35c1qXfjNPX+VGvCGBEyc7V8Zixtlk3A8Wxiro6fPKQI9hoCjkOlU+l/uG3Y4L6TLVWP/6hBE1f16MYz7VsgrMC5MtKdpmqPPD+gIzI0WIcXRU91K00dZjd2K/5Z76+Ar2LkTnhwWNGvI2P8GunoWqy6ywK9yHKVzWn+lSi6UOEXYv2L7EgJeJcAxBfY/8OXExNK64Gx3mK8ZJJjKG9PI9s8TH1bDwNWNPYCp1J6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Zh?= =?us-ascii?Q?BdZf7rONKCFFrdqfMGY=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: 195880dc-2790-4230-e3e9-08dc56d77c42 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2024 07:51:08.2205 (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: oWPd6aZhO/5imKdxBQ6c11ES2KetfUSOfC68lAHZvaj9RZcVxKSJz5VQ7icnk+uQwtbS8VW1cmP0g+nGdIyRHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7540 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, 07 Apr 2024 00:51:12 -0700 Resent-From: yi1.li@intel.com Reply-To: devel@edk2.groups.io,yi1.li@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: DjuYKfqcM7QeaXuvwqqnwixAx7686176AA= 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=cu2kLWD1; 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 Pushed: https://github.com/tianocore/edk2/pull/5532 Thanks, Yi -----Original Message----- From: Li, Yi1=20 Sent: Monday, April 1, 2024 9:46 AM 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 additi= onal RSAES-OAEP crypto functions 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 (#117474): https://edk2.groups.io/g/devel/message/117474 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-