Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CryptoPkg: Add Hkdf SHA384 support #3387

Merged
merged 4 commits into from Sep 23, 2022
Merged

CryptoPkg: Add Hkdf SHA384 support #3387

merged 4 commits into from Sep 23, 2022

Conversation

jyao1
Copy link
Contributor

@jyao1 jyao1 commented Sep 23, 2022

Add Hkdf-SHA384 support and Hkdf-SHA256 extract and expand separately.
With this change, the size increase of BaseCyrptLib is about 6K 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 #3224.

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

Signed-off-by: Qi Zhang qi1.zhang@intel.com
Cc: Jiewen Yao jiewen.yao@intel.com
Cc: Jian J Wang jian.j.wang@intel.com
Cc: Xiaoyu Lu xiaoyu1.lu@intel.com
Cc: Guomin Jiang guomin.jiang@intel.com
Reviewed-by: Jiewen Yao jiewen.yao@intel.com

Qi Zhang (4):
CryptoPkg: add new Hkdf api definition in Crypt Lib.
CryptoPkg: add new Hkdf api in Crypt Lib.
CryptoPkg: add new Hkdf api to Crypto Service.
CryptoPkg: add Hkdf UnitTest.

CryptoPkg/Driver/Crypto.c | 152 +++++++-
CryptoPkg/Include/Library/BaseCryptLib.h | 129 +++++++
.../Pcd/PcdCryptoServiceFamilyEnable.h | 7 +-
.../Library/BaseCryptLib/Kdf/CryptHkdf.c | 362 +++++++++++++++++-
.../Library/BaseCryptLib/Kdf/CryptHkdfNull.c | 151 +++++++-
.../BaseCryptLibNull/Kdf/CryptHkdfNull.c | 151 +++++++-
.../BaseCryptLibOnProtocolPpi/CryptLib.c | 144 +++++++
CryptoPkg/Private/Protocol/Crypto.h | 139 ++++++-
.../BaseCryptLib/BaseCryptLibUnitTests.c | 29 +-
.../UnitTest/Library/BaseCryptLib/HkdfTests.c | 202 ++++++++++
.../Library/BaseCryptLib/TestBaseCryptLib.h | 3 +
.../BaseCryptLib/TestBaseCryptLibHost.inf | 1 +
.../BaseCryptLib/TestBaseCryptLibShell.inf | 1 +
13 files changed, 1440 insertions(+), 31 deletions(-)
create mode 100644 CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HkdfTests.c

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

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4033

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4033

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4033

Signed-off-by: Qi Zhang <qi1.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
@jyao1 jyao1 added the push Auto push patch series in PR if all checks pass label Sep 23, 2022
@mergify mergify bot merged commit b19793a into tianocore:master Sep 23, 2022
@jyao1 jyao1 deleted the patch branch September 23, 2022 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants