From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.68027.1661762578443490177 for ; Mon, 29 Aug 2022 01:42:58 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=DaUXxxCg; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: qi1.zhang@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661762578; x=1693298578; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OCKTHWuEihU4JvBzhRml9Ugn8nIeZyCJB4HlTvjuAw0=; b=DaUXxxCgDl2WR5GmDZswIf7FT3KfCteZiNAmZD5MEBhA3P49gtO8pp8a 2qcueewumJn7rCFV9wj6ibQfEfC6DPShxTtyZgBPpb8bdpRTlr3FfqO9e b+/Llti5vV+h89uDgNEmGVZkd0HBYeCTVAZbNPYOt3hmY28RHWTBKGIzB aN7vNX928V4V5ms5rekSxUmZFHAWdvwT82HztsOdVguE1bs2dIyx8tbQ9 CP6bG2TTwJl/oc8TqbGVwfNR5484YuS7QW7qSe3eq1HPaBcAvOCWAxtjQ 3Lh4BJw/u84n7oGZxpG8/1SY92ny+gr6orsC7yrx+pwDL/6a3zh9QNUA3 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10453"; a="356559952" X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="356559952" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2022 01:42:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="588089202" Received: from shwdesssddpdqi.ccr.corp.intel.com ([10.239.157.129]) by orsmga006.jf.intel.com with ESMTP; 29 Aug 2022 01:42:56 -0700 From: "Qi Zhang" To: devel@edk2.groups.io Cc: Qi Zhang , Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang Subject: [PATCH 0/4] CryptoPkg: add AeadAesGcm support. Date: Mon, 29 Aug 2022 16:42:50 +0800 Message-Id: <20220829084254.8624-1-qi1.zhang@intel.com> X-Mailer: git-send-email 2.26.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add AeadAesGcm Encrypt and Decrypt. With this change, the size increase of BaseCyrptLib is about 60K bytes. The new functions are verifed by the Host UnitTest. And also it has been integratd in https://github.com/tianocore/edk2-staging/tree/DeviceSecurity and been verified. All the code change is on the PR https://github.com/tianocore/edk2/pull/3252. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4036 Signed-off-by: Qi Zhang Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Qi Zhang (4): CryptoPkg: add AeadAesGcm function() definition. CryptoPkg: add AeadAesGcm support. CryptoPkg: add AeadAesGcm to Crypto Service. CryptoPkg: add UnitTest for AeadAesGcm. CryptoPkg/CryptoPkg.dsc | 2 + CryptoPkg/Driver/Crypto.c | 94 +++++- CryptoPkg/Include/Library/BaseCryptLib.h | 87 ++++++ .../Pcd/PcdCryptoServiceFamilyEnable.h | 7 + .../Library/BaseCryptLib/BaseCryptLib.inf | 1 + .../BaseCryptLib/Cipher/CryptAeadAesGcm.c | 279 ++++++++++++++++++ .../BaseCryptLib/Cipher/CryptAeadAesGcmNull.c | 100 +++++++ .../Library/BaseCryptLib/PeiCryptLib.inf | 1 + .../Library/BaseCryptLib/RuntimeCryptLib.inf | 1 + .../Library/BaseCryptLib/SmmCryptLib.inf | 1 + .../BaseCryptLib/UnitTestHostBaseCryptLib.inf | 1 + .../BaseCryptLibNull/BaseCryptLibNull.inf | 1 + .../Cipher/CryptAeadAesGcmNull.c | 100 +++++++ .../BaseCryptLibOnProtocolPpi/CryptLib.c | 93 ++++++ CryptoPkg/Private/Protocol/Crypto.h | 86 ++++++ .../Library/BaseCryptLib/AeadAesGcmTests.c | 112 +++++++ .../BaseCryptLib/BaseCryptLibUnitTests.c | 1 + .../Library/BaseCryptLib/TestBaseCryptLib.h | 3 + .../BaseCryptLib/TestBaseCryptLibHost.inf | 1 + .../BaseCryptLib/TestBaseCryptLibShell.inf | 1 + 20 files changed, 971 insertions(+), 1 deletion(-) create mode 100644 CryptoPkg/Library/BaseCryptLib/Cipher/CryptAeadAesGcm.c create mode 100644 CryptoPkg/Library/BaseCryptLib/Cipher/CryptAeadAesGcmNull.c create mode 100644 CryptoPkg/Library/BaseCryptLibNull/Cipher/CryptAeadAesGcmNull.c create mode 100644 CryptoPkg/Test/UnitTest/Library/BaseCryptLib/AeadAesGcmTests.c -- 2.26.2.windows.1