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 20DE9941EA1 for ; Sat, 30 Mar 2024 22:00:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=e6pexCB5liMIY8PwR+bSqqvCP72rNvZIDIDtQyFEK1U=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Feedback-ID:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1711836006; v=1; b=0D3xVP71+TlNO7vYV4++07tdSK9pECfhDffXQ0YKukMpCZ9+ko5t98qeLzdKhlrnGAk0iiCc /pYpTih0zuk74CEc9+3I4JEj6Bzd8d+L367k503XQyHm1F17jRcLEcmUWlS3dB4pMFF4XYLoXXC Mi4sLcRfAdUNBEIgUv/gmC6/RjbWQAL1g9vNHa8gYRH2PSDOjxr7oGCZtEJ+YPandbAINrtlHaN pDr9z/AoCASLKM2NKFZoOli0EzLgPRlghOxr8q9DBsmhOYArZOkFpt0yVwn1AGIyJratLhZd6hf qG/dH59xaHG6zO+MDktqXGVA7Dy2waTLmBmSBt0KHjVJw== X-Received: by 127.0.0.2 with SMTP id mk0JYY7687511xrvULGwSIGY; Sat, 30 Mar 2024 15:00:06 -0700 X-Received: from a2i971.smtp2go.com (a2i971.smtp2go.com [103.47.207.203]) by mx.groups.io with SMTP id smtpd.web11.6637.1711836005809721893 for ; Sat, 30 Mar 2024 15:00:06 -0700 X-Received: from [10.66.228.43] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2-S2G) (envelope-from ) id 1rqgk8-gL4SDa-TW; Sat, 30 Mar 2024 22:00:04 +0000 X-Received: from [10.90.237.184] (helo=localhost.localdomain) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96.1-S2G) (envelope-from ) id 1rqgk8-wSPEb9-1b; Sat, 30 Mar 2024 22:00:04 +0000 From: "Chris Ruffin via groups.io" To: devel@edk2.groups.io Cc: Chris Ruffin Subject: [edk2-devel] [PATCH v2 0/3] CryptoPkg/BaseCryptLib: add additional RSAES-OAEP crypto functions Date: Sat, 30 Mar 2024 17:59:42 -0400 Message-ID: In-Reply-To: <20240318215205.1339-1-cruffin@millcore.com> References: <20240318215205.1339-1-cruffin@millcore.com> MIME-Version: 1.0 X-Smtpcorp-Track: 1rqgk8wSeEP91P.CEt_DpSud9AHY Feedback-ID: 401384m:401384aZcXcRg:401384s-eaFYXl2u X-Report-Abuse: Please forward a copy of this message, including all headers, to 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: Sat, 30 Mar 2024 15:00:06 -0700 Reply-To: devel@edk2.groups.io,cruffin@millcore.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: yoFmBMwgGLzVLP5uINhehB2mx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=0D3xVP71; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 be 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117249): https://edk2.groups.io/g/devel/message/117249 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] -=-=-=-=-=-=-=-=-=-=-=-