[PATCH] CryptoPkg/BaseCryptLib: add crypto algorithms needed by variable protection


Wang, Jian J
 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2594

Crypto algorithms, hkdf-sha256/hmac-sha256/aes, are needed to verify integr=
ity
of variable data, derive hmac and encryption keys, and encrypt/decrypt vari=
ble.
Replacing null version source code with real implementations makes sure we =
can
enable full functionalities of protected variable later.

Cc: Xiaoyu Lu <xiaoyux.lu@...>
Cc: Jiewen Yao <jiewen.yao@...>=0D
Cc: Guomin Jiang <guomin.jiang@...>
Cc: Nishant C Mistry <nishant.c.mistry@...>
Signed-off-by: Jian J Wang <jian.j.wang@...>
---
CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 4 ++--
CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf b/CryptoPkg/Lib=
rary/BaseCryptLib/PeiCryptLib.inf
index c836c257f8..af87c14a8b 100644
--- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
@@ -43,8 +43,8 @@
Hash/CryptSha512.c=0D
Hmac/CryptHmacMd5Null.c=0D
Hmac/CryptHmacSha1Null.c=0D
- Hmac/CryptHmacSha256Null.c=0D
- Kdf/CryptHkdfNull.c=0D
+ Hmac/CryptHmacSha256.c=0D
+ Kdf/CryptHkdf.c=0D
Cipher/CryptAesNull.c=0D
Cipher/CryptTdesNull.c=0D
Cipher/CryptArc4Null.c=0D
diff --git a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf b/CryptoPkg=
/Library/BaseCryptLib/RuntimeCryptLib.inf
index e5b8ececc1..d20a48cd8a 100644
--- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
@@ -43,9 +43,9 @@
Hash/CryptSha512Null.c=0D
Hmac/CryptHmacMd5Null.c=0D
Hmac/CryptHmacSha1Null.c=0D
- Hmac/CryptHmacSha256Null.c=0D
- Kdf/CryptHkdfNull.c=0D
- Cipher/CryptAesNull.c=0D
+ Hmac/CryptHmacSha256.c=0D
+ Kdf/CryptHkdf.c=0D
+ Cipher/CryptAes.c=0D
Cipher/CryptTdesNull.c=0D
Cipher/CryptArc4Null.c=0D
Pk/CryptRsaBasic.c=0D
--=20
2.24.0.windows.2

Join devel@edk2.groups.io to automatically receive all group messages.