From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web09.78.1619626522610477311 for ; Wed, 28 Apr 2021 09:15:22 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: sachin.agrawal@intel.com) IronPort-SDR: Mr5MYahndBKRIdvqT5TyubHBlRmmnBfpdTfHbuAFbUq/OKPUtQG+tOa2Qkvcq451/82UStsad0 aQ9vcJ3Cc38Q== X-IronPort-AV: E=McAfee;i="6200,9189,9968"; a="194668028" X-IronPort-AV: E=Sophos;i="5.82,258,1613462400"; d="scan'208";a="194668028" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2021 09:15:21 -0700 IronPort-SDR: ccMMoJbl/8sYUssApCHWXGcVRhscTmmVzvzcdjZLJ+J+XPiHdeU4SSKz/zR4OaSoIPem8vQ9bm fv80g72ygC0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,258,1613462400"; d="scan'208";a="455124988" Received: from sagraw2-desk1.amr.corp.intel.com ([10.72.4.190]) by FMSMGA003.fm.intel.com with ESMTP; 28 Apr 2021 09:15:21 -0700 From: "Agrawal, Sachin" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang Subject: [PATCH v2 0/1] CryptoPkg: Add RSA PSS verify support Date: Wed, 28 Apr 2021 09:15:19 -0700 Message-Id: <20210428161520.16876-1-sachin.agrawal@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3314 This patch uses Openssl's EVP API's to perform RSASSA-PSS verification of a binary blob. Patch v1 Cover Letter : https://edk2.groups.io/g/devel/message/74286?p=,,,20,0,0,0::Created,,sachin,20,2,0,82225507 https://github.com/sagraw2/edk2/tree/pss_1 https://github.com/sagraw2/edk2/tree/pss_2 Updates from v1: - Added SaltLen as argument (Jiewen) - Added RsaPssSign support (Jiewen) - Added Unit test (Jiewen) - Added RSA PSS API in EDK2 Crypto Protocol (Missed in v1) Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Sachin Agrawal (1): CryptoPkg: BaseCryptLib: Add RSA PSS verify support CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c | 145 +++++++++++++++ CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssNull.c | 46 +++++ CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c | 168 +++++++++++++++++ CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSignNull.c | 60 ++++++ CryptoPkg/Library/BaseCryptLibNull/Pk/CryptRsaPssNull.c | 46 +++++ CryptoPkg/Library/BaseCryptLibNull/Pk/CryptRsaPssSignNull.c | 60 ++++++ CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c | 66 +++++++ CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BaseCryptLibUnitTests.c | 1 + CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RsaPssTests.c | 191 ++++++++++++++++++++ CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RsaTests.c | 2 + CryptoPkg/Include/Library/BaseCryptLib.h | 74 ++++++++ CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf | 2 + CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 2 + CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf | 2 + CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf | 2 + CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf | 2 + CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf | 2 + CryptoPkg/Private/Protocol/Crypto.h | 78 ++++++++ CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLib.h | 3 + CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf | 1 + CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibShell.inf | 1 + 21 files changed, 954 insertions(+) create mode 100644 CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c create mode 100644 CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssNull.c create mode 100644 CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c create mode 100644 CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSignNull.c create mode 100644 CryptoPkg/Library/BaseCryptLibNull/Pk/CryptRsaPssNull.c create mode 100644 CryptoPkg/Library/BaseCryptLibNull/Pk/CryptRsaPssSignNull.c create mode 100644 CryptoPkg/Test/UnitTest/Library/BaseCryptLib/RsaPssTests.c -- 2.14.3.windows.1