public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V2 0/3] CryptoPkg: Add BigNum support
@ 2022-09-21  4:53 yi1 li
  2022-09-21  5:31 ` [PATCH V3 0/3] CryptoPkg: Add EC support yi1 li
  2022-09-23 10:09 ` [PATCH V3 0/3] CryptoPkg: Add BigNum support Yao, Jiewen
  0 siblings, 2 replies; 3+ messages in thread
From: yi1 li @ 2022-09-21  4:53 UTC (permalink / raw)
  To: devel; +Cc: Yi Li, Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang

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

Review PR: https://github.com/tianocore/edk2/pull/3309
This patch sequence is used to add CryptBn library, which are wrapped
over OpenSSL. The implementation provides library functions for EFI
BaseCrypt protocol and EFI BaseCrypt Configuration Protocol.

All APIs passed unit test and fuzzing test, detail as:
1. Unit test:
The purpose of unit testing is to ensure that the function obtains the
expected result under specific input, that is, to ensure the correctness
of APIs.
All test case show in patch 3 :CryptoPkg/Test: Add unit test for CryptoBn.
2. Fuzzing test:
Various Fuzz Testing are employed across the all introduced APIs, and the
test is used AFL (2.52b) and Libfuzzer (clang+llvm-11.0.0) as the fuzzer,
based on HBFA.
Fuzzing Pass Rate is 100%;
The Code Coverage new APIs is 100%;
All test case show in:
https://github.com/liyi77/edk2-staging/tree/HBFA/HBFA/UefiHostFuzzTestCasePkg/TestCase/CryptoPkg

V2 change:
1. Squash uncrustify tool update into previous patch. 
2. Increase EDKII_CRYPTO_VERSION to 9.

Tested-by: Yi Li <yi1.li@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>

Signed-off-by: Yi Li <yi1.li@intel.com>

Yi Li (3):
  CryptoPkg: Add EC support
  CryptoPkg: Add EC APIs to DXE and protocol
  CryptoPkg/Test: Add unit test for CryptoEc

 CryptoPkg/CryptoPkg.dsc                       |   1 +
 CryptoPkg/Driver/Crypto.c                     | 496 +++++++++++
 CryptoPkg/Include/Library/BaseCryptLib.h      | 424 +++++++++
 .../Pcd/PcdCryptoServiceFamilyEnable.h        |  25 +
 .../Library/BaseCryptLib/BaseCryptLib.inf     |   2 +
 .../Library/BaseCryptLib/PeiCryptLib.inf      |   1 +
 CryptoPkg/Library/BaseCryptLib/Pk/CryptEc.c   | 765 +++++++++++++++++
 .../Library/BaseCryptLib/Pk/CryptEcNull.c     | 496 +++++++++++
 .../Library/BaseCryptLib/SmmCryptLib.inf      |   1 +
 .../BaseCryptLib/UnitTestHostBaseCryptLib.inf |   2 +
 .../BaseCryptLibNull/BaseCryptLibNull.inf     |   1 +
 .../Library/BaseCryptLibNull/Pk/CryptEcNull.c | 496 +++++++++++
 .../BaseCryptLibOnProtocolPpi/CryptLib.c      | 469 ++++++++++
 CryptoPkg/Private/Protocol/Crypto.h           | 801 ++++++++++++++----
 CryptoPkg/Test/CryptoPkgHostUnitTest.dsc      |   3 +
 .../BaseCryptLib/BaseCryptLibUnitTests.c      |   1 +
 .../UnitTest/Library/BaseCryptLib/EcTests.c   | 290 +++++++
 .../Library/BaseCryptLib/TestBaseCryptLib.h   |   2 +
 .../BaseCryptLib/TestBaseCryptLibHost.inf     |   1 +
 .../BaseCryptLib/TestBaseCryptLibShell.inf    |   1 +
 20 files changed, 4093 insertions(+), 185 deletions(-)
 create mode 100644 CryptoPkg/Library/BaseCryptLib/Pk/CryptEc.c
 create mode 100644 CryptoPkg/Library/BaseCryptLib/Pk/CryptEcNull.c
 create mode 100644 CryptoPkg/Library/BaseCryptLibNull/Pk/CryptEcNull.c
 create mode 100644 CryptoPkg/Test/UnitTest/Library/BaseCryptLib/EcTests.c

-- 
2.31.1.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V3 0/3] CryptoPkg: Add EC support
  2022-09-21  4:53 [PATCH V2 0/3] CryptoPkg: Add BigNum support yi1 li
@ 2022-09-21  5:31 ` yi1 li
  2022-09-23 10:09 ` [PATCH V3 0/3] CryptoPkg: Add BigNum support Yao, Jiewen
  1 sibling, 0 replies; 3+ messages in thread
From: yi1 li @ 2022-09-21  5:31 UTC (permalink / raw)
  To: devel@edk2.groups.io
  Cc: Yao, Jiewen, Wang, Jian J, Lu, Xiaoyu1, Jiang, Guomin

Resend patch sets because of typos in comment message.

-----Original Message-----
From: Li, Yi1 <yi1.li@intel.com> 
Sent: Wednesday, September 21, 2022 1:27 PM
To: devel@edk2.groups.io
Cc: Li, Yi1 <yi1.li@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>
Subject: [PATCH V3 0/3] CryptoPkg: Add EC support

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

Review PR: https://github.com/tianocore/edk2/pull/3309
This patch sequence is used to add CryptEc library, which are wrapped over OpenSSL. The implementation provides library functions for EFI BaseCrypt protocol and EFI BaseCrypt Configuration Protocol.

All APIs passed unit test and fuzzing test, detail as:
1. Unit test:
The purpose of unit testing is to ensure that the function obtains the expected result under specific input, that is, to ensure the correctness of APIs.
All test case show in patch 3 :CryptoPkg/Test: Add unit test for CryptoEc.
2. Fuzzing test:
Various Fuzz Testing are employed across the all introduced APIs, and the test is used AFL (2.52b) and Libfuzzer (clang+llvm-11.0.0) as the fuzzer, based on HBFA.
Fuzzing Pass Rate is 100%;
The Code Coverage new APIs is 90.3%.
All test case show in:
https://github.com/liyi77/edk2-staging/tree/HBFA/HBFA/UefiHostFuzzTestCasePkg/TestCase/CryptoPkg

V2 change:
1. Squash uncrustify tool update into previous patch. 
2. Increase EDKII_CRYPTO_VERSION to 10.

Tested-by: Yi Li <yi1.li@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>

Signed-off-by: Yi Li <yi1.li@intel.com>

Yi Li (3):
  CryptoPkg: Add EC support
  CryptoPkg: Add EC APIs to DXE and protocol
  CryptoPkg/Test: Add unit test for CryptoEc

 CryptoPkg/CryptoPkg.dsc                       |   1 +
 CryptoPkg/Driver/Crypto.c                     | 496 +++++++++++
 CryptoPkg/Include/Library/BaseCryptLib.h      | 424 +++++++++
 .../Pcd/PcdCryptoServiceFamilyEnable.h        |  25 +
 .../Library/BaseCryptLib/BaseCryptLib.inf     |   2 +
 .../Library/BaseCryptLib/PeiCryptLib.inf      |   1 +
 CryptoPkg/Library/BaseCryptLib/Pk/CryptEc.c   | 765 +++++++++++++++++
 .../Library/BaseCryptLib/Pk/CryptEcNull.c     | 496 +++++++++++
 .../Library/BaseCryptLib/SmmCryptLib.inf      |   1 +
 .../BaseCryptLib/UnitTestHostBaseCryptLib.inf |   2 +
 .../BaseCryptLibNull/BaseCryptLibNull.inf     |   1 +
 .../Library/BaseCryptLibNull/Pk/CryptEcNull.c | 496 +++++++++++
 .../BaseCryptLibOnProtocolPpi/CryptLib.c      | 469 ++++++++++
 CryptoPkg/Private/Protocol/Crypto.h           | 801 ++++++++++++++----
 CryptoPkg/Test/CryptoPkgHostUnitTest.dsc      |   3 +
 .../BaseCryptLib/BaseCryptLibUnitTests.c      |   1 +
 .../UnitTest/Library/BaseCryptLib/EcTests.c   | 290 +++++++
 .../Library/BaseCryptLib/TestBaseCryptLib.h   |   2 +
 .../BaseCryptLib/TestBaseCryptLibHost.inf     |   1 +
 .../BaseCryptLib/TestBaseCryptLibShell.inf    |   1 +
 20 files changed, 4093 insertions(+), 185 deletions(-)  create mode 100644 CryptoPkg/Library/BaseCryptLib/Pk/CryptEc.c
 create mode 100644 CryptoPkg/Library/BaseCryptLib/Pk/CryptEcNull.c
 create mode 100644 CryptoPkg/Library/BaseCryptLibNull/Pk/CryptEcNull.c
 create mode 100644 CryptoPkg/Test/UnitTest/Library/BaseCryptLib/EcTests.c

--
2.31.1.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V3 0/3] CryptoPkg: Add BigNum support
  2022-09-21  4:53 [PATCH V2 0/3] CryptoPkg: Add BigNum support yi1 li
  2022-09-21  5:31 ` [PATCH V3 0/3] CryptoPkg: Add EC support yi1 li
@ 2022-09-23 10:09 ` Yao, Jiewen
  1 sibling, 0 replies; 3+ messages in thread
From: Yao, Jiewen @ 2022-09-23 10:09 UTC (permalink / raw)
  To: Li, Yi1, devel@edk2.groups.io; +Cc: Wang, Jian J, Lu, Xiaoyu1, Jiang, Guomin

Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>

Merged https://github.com/tianocore/edk2/pull/3390

> -----Original Message-----
> From: Li, Yi1 <yi1.li@intel.com>
> Sent: Wednesday, September 21, 2022 1:28 PM
> To: devel@edk2.groups.io
> Cc: Li, Yi1 <yi1.li@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wang,
> Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang,
> Guomin <guomin.jiang@intel.com>
> Subject: [PATCH V3 0/3] CryptoPkg: Add BigNum support
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828
> 
> Review PR: https://github.com/tianocore/edk2/pull/3309
> This patch sequence is used to add CryptBn library, which are wrapped
> over OpenSSL. The implementation provides library functions for EFI
> BaseCrypt protocol and EFI BaseCrypt Configuration Protocol.
> 
> All APIs passed unit test and fuzzing test, detail as:
> 1. Unit test:
> The purpose of unit testing is to ensure that the function obtains the
> expected result under specific input, that is, to ensure the correctness
> of APIs.
> All test case show in patch 3 :CryptoPkg/Test: Add unit test for CryptoBn.
> 2. Fuzzing test:
> Various Fuzz Testing are employed across the all introduced APIs, and the
> test is used AFL (2.52b) and Libfuzzer (clang+llvm-11.0.0) as the fuzzer,
> based on HBFA.
> Fuzzing Pass Rate is 100%;
> The Code Coverage new APIs is 100%;
> All test case show in:
> https://github.com/liyi77/edk2-
> staging/tree/HBFA/HBFA/UefiHostFuzzTestCasePkg/TestCase/CryptoPkg
> 
> V2 change:
> 1. Squash uncrustify tool update into previous patch.
> 2. Increase EDKII_CRYPTO_VERSION to 9.
> 
> Tested-by: Yi Li <yi1.li@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>
> 
> Signed-off-by: Yi Li <yi1.li@intel.com>
> 
> Yi Li (3):
>   CryptoPkg: Add BigNum support
>   CryptoPkg: Add BigNum API to DXE and protocol
>   CryptoPkg/Test: Add unit test for CryptoBn
> 
>  CryptoPkg/CryptoPkg.dsc                       |   1 +
>  CryptoPkg/Driver/Crypto.c                     | 520 +++++++++++++++-
>  CryptoPkg/Include/Library/BaseCryptLib.h      | 418 +++++++++++++
>  .../Pcd/PcdCryptoServiceFamilyEnable.h        |  30 +
>  .../Library/BaseCryptLib/BaseCryptLib.inf     |   1 +
>  CryptoPkg/Library/BaseCryptLib/Bn/CryptBn.c   | 581
> ++++++++++++++++++
>  .../Library/BaseCryptLib/Bn/CryptBnNull.c     | 520 ++++++++++++++++
>  .../Library/BaseCryptLib/PeiCryptLib.inf      |   1 +
>  .../Library/BaseCryptLib/SmmCryptLib.inf      |   1 +
>  .../BaseCryptLib/UnitTestHostBaseCryptLib.inf |   1 +
>  .../BaseCryptLibNull/BaseCryptLibNull.inf     |   1 +
>  .../Library/BaseCryptLibNull/Bn/CryptBnNull.c | 520 ++++++++++++++++
>  .../BaseCryptLibOnProtocolPpi/CryptLib.c      | 492 +++++++++++++++
>  CryptoPkg/Private/Protocol/Crypto.h           | 429 ++++++++++++-
>  .../BaseCryptLib/BaseCryptLibUnitTests.c      |   1 +
>  .../UnitTest/Library/BaseCryptLib/BnTests.c   | 266 ++++++++
>  .../Library/BaseCryptLib/TestBaseCryptLib.h   |   3 +
>  .../BaseCryptLib/TestBaseCryptLibHost.inf     |   1 +
>  .../BaseCryptLib/TestBaseCryptLibShell.inf    |   1 +
>  19 files changed, 3786 insertions(+), 2 deletions(-)
>  create mode 100644 CryptoPkg/Library/BaseCryptLib/Bn/CryptBn.c
>  create mode 100644 CryptoPkg/Library/BaseCryptLib/Bn/CryptBnNull.c
>  create mode 100644
> CryptoPkg/Library/BaseCryptLibNull/Bn/CryptBnNull.c
>  create mode 100644
> CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BnTests.c
> 
> --
> 2.31.1.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-23 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-21  4:53 [PATCH V2 0/3] CryptoPkg: Add BigNum support yi1 li
2022-09-21  5:31 ` [PATCH V3 0/3] CryptoPkg: Add EC support yi1 li
2022-09-23 10:09 ` [PATCH V3 0/3] CryptoPkg: Add BigNum support Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox