Re: [edk2-devel] [PATCH 0/7] CryptoPkg: Add BigNum and EC support to BaseCryptLib

2022-09-18 Thread yi1 li
Hi all, Is there any comment on this patch? Thanks. Regards, Yi -Original Message- From: devel@edk2.groups.io On Behalf Of yi1 li Sent: Wednesday, September 7, 2022 4:29 PM To: devel@edk2.groups.io Cc: Li, Yi1 ; Yao, Jiewen ; Wang, Jian J ; Xiaoyu Lu ; Jiang, Guomin Subject: [edk2

[edk2-devel] [PATCH V2 0/3] CryptoPkg: Add BigNum support

2022-09-20 Thread yi1 li
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 Configurati

[edk2-devel] [PATCH V2 1/3] CryptoPkg: Add BigNum support

2022-09-20 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 This patch is used to add CryptBn library, which is wrapped over OpenSSL. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/Include/Library/BaseCryptLib.h | 418 + .../Li

[edk2-devel] [PATCH V2 2/3] CryptoPkg: Add BigNum API to DXE and protocol

2022-09-20 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 The implementation provides CryptBn library functions for EFI Driver and EFI BaseCrypt Protocol. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/CryptoPkg.dsc |

[edk2-devel] [PATCH V2 3/3] CryptoPkg/Test: Add unit test for CryptoBn

2022-09-20 Thread yi1 li
Add unit test for CryptoBn. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- .../BaseCryptLib/UnitTestHostBaseCryptLib.inf | 1 + .../BaseCryptLib/BaseCryptLibUnitTests.c | 1 + .../UnitTest/Library/BaseCryptLib/BnTests.c | 266 +++

[edk2-devel] [PATCH V2 1/3] CryptoPkg: Add EC support

2022-09-20 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 This patch is used to add CryptEc library, which is wrapped over OpenSSL. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/Include/Library/BaseCryptLib.h | 424 ++ .../Libr

[edk2-devel] [PATCH V2 2/3] CryptoPkg: Add EC APIs to DXE and protocol

2022-09-20 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 The implementation provides CryptEc library functions for EFI Driveer and EFI BaseCrypt Protocol. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/CryptoPkg.dsc |

[edk2-devel] [PATCH V2 3/3] CryptoPkg/Test: Add unit test for CryptoEc

2022-09-20 Thread yi1 li
Add unit test for CryptoEc. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- .../BaseCryptLib/UnitTestHostBaseCryptLib.inf | 2 + CryptoPkg/Test/CryptoPkgHostUnitTest.dsc | 3 + .../BaseCryptLib/BaseCryptLibUnitTests.c | 1 + .../UnitTest

Re: [edk2-devel] [PATCH 0/7] CryptoPkg: Add BigNum and EC support to BaseCryptLib

2022-09-20 Thread yi1 li
Hi Jiewen, Thanks for review, changes done. Since both BN and EC extend many structures, splitting them will cause git conflicts, I've adjusted the order of patches: Ec commits are based on Bn commits. Just convenient for merge. Thanks, Yi -Original Message- From: Yao, Jiewen Sent: Wed

Re: [edk2-devel] [PATCH V3 0/3] CryptoPkg: Add EC support

2022-09-20 Thread yi1 li
Resend patch sets because of typos in comment message. -Original Message- From: Li, Yi1 Sent: Wednesday, September 21, 2022 1:27 PM To: devel@edk2.groups.io Cc: Li, Yi1 ; Yao, Jiewen ; Wang, Jian J ; Lu, Xiaoyu1 ; Jiang, Guomin Subject: [PATCH V3 0/3] CryptoPkg: Add EC support REF: h

Re: [edk2-devel] [PATCH V2 1/3] CryptoPkg: Add EC support

2022-09-21 Thread yi1 li
2.groups.io; Li, Yi1 ; Kinney, Michael D Cc: Yao, Jiewen ; Wang, Jian J ; Lu, Xiaoyu1 ; Jiang, Guomin Subject: RE: [edk2-devel] [PATCH V2 1/3] CryptoPkg: Add EC support Comments embedded below. Mike > -Original Message----- > From: devel@edk2.groups.io On Behalf Of yi1 li > Sent: Tue

[edk2-devel] [PATCH 1/1] CryptoPkg: Fix pem heap-buffer-overflow due to BIO_snprintf()

2022-09-22 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4075 Fake BIO_snprintf() need to return error status -1. 0 will be considered a correct return value, this may cause crash, please refer to bugzilla link for details. Signed-off-by: Yi Li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guo

Re: [edk2-devel] [PATCH V2 1/3] CryptoPkg: Add EC support

2022-09-22 Thread yi1 li
o: devel@edk2.groups.io; Li, Yi1 ; Kinney, Michael D > > Cc: Yao, Jiewen ; Wang, Jian J ; > Lu, Xiaoyu1 ; Jiang, > Guomin > Subject: RE: [edk2-devel] [PATCH V2 1/3] CryptoPkg: Add EC support > > Comments embedded below. > > Mike > > > -Original Message-

Re: [edk2-devel] [PATCH V2 1/3] CryptoPkg: Add EC support

2022-09-22 Thread yi1 li
; welcome. > > > > Thanks, > > Yi > > > > -Original Message- > > From: Kinney, Michael D > > Sent: Thursday, September 22, 2022 12:22 AM > > To: devel@edk2.groups.io; Li, Yi1 ; Kinney, Michael D > > > > Cc: Yao, Jiewen ; Wang, Jian J

Re: [edk2-devel] [PATCH V2 1/3] CryptoPkg: Add EC support

2022-09-23 Thread yi1 li
ot cause is that we have enabled conditional ec in > > > OpensslLib.inf before by PcdOpensslEcEnabled, > > > > > > https://github.com/tianocore/edk2/blob/2c17d676e402d75a3a674499342f7ddaccf387bd/CryptoPkg/Library/OpensslLib/OpensslLib.inf#L2 > > > 02-L238 > > >

[edk2-devel] [PATCH V4 0/4] CryptoPkg: Add EC support

2022-09-24 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 Review PR: https://github.com/tianocore/edk2/pull/3398 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 Configurati

[edk2-devel] [PATCH V4 1/4] CryptoPkg: Add EC support

2022-09-24 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 This patch is used to add CryptEc library, which is wrapped over OpenSSL. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/Include/Library/BaseCryptLib.h | 424 ++ .../Libr

[edk2-devel] [PATCH V4 2/4] CryptoPkg: Add EC APIs to DXE and protocol

2022-09-24 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 The implementation provides CryptEc library functions for EFI Driveer and EFI BaseCrypt Protocol. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/CryptoPkg.dsc |

[edk2-devel] [PATCH V4 3/4] CryptoPkg: Add ECC related usage reference

2022-09-24 Thread yi1 li
Describes the use cases under which ECC needs to be enabled, and provides the impact on memory size for developers' reference. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Cc: Michael D Kinney Signed-off-by: Yi Li --- CryptoPkg/CryptoPkg.dec | 28 ++

[edk2-devel] [PATCH V4 4/4] CryptoPkg/Test: Add unit test for CryptoEc

2022-09-24 Thread yi1 li
Add unit test for CryptoEc. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- .../BaseCryptLib/UnitTestHostBaseCryptLib.inf | 2 + CryptoPkg/Test/CryptoPkgHostUnitTest.dsc | 3 + .../BaseCryptLib/BaseCryptLibUnitTests.c | 1 + .../UnitTest

[edk2-devel] [PATCH V5 0/4] CryptoPkg: Add EC support

2022-09-25 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 Review PR: https://github.com/tianocore/edk2/pull/3398 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 Configurati

[edk2-devel] [PATCH V5 2/4] CryptoPkg: Add EC APIs to DXE and protocol

2022-09-25 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 The implementation provides CryptEc library functions for EFI Driveer and EFI BaseCrypt Protocol. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/CryptoPkg.dsc |

[edk2-devel] [PATCH V5 3/4] CryptoPkg: Add ECC related usage reference

2022-09-25 Thread yi1 li
Describes the use cases under which ECC needs to be enabled, and provides the impact on memory size for developers' reference. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Cc: Michael D Kinney Signed-off-by: Yi Li --- CryptoPkg/CryptoPkg.dec | 29 ++

[edk2-devel] [PATCH V5 1/4] CryptoPkg: Add EC support

2022-09-25 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 This patch is used to add CryptEc library, which is wrapped over OpenSSL. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/Include/Library/BaseCryptLib.h | 424 ++ .../Libr

[edk2-devel] [PATCH V5 4/4] CryptoPkg/Test: Add unit test for CryptoEc

2022-09-25 Thread yi1 li
Add unit test for CryptoEc. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- .../BaseCryptLib/UnitTestHostBaseCryptLib.inf | 2 + CryptoPkg/Test/CryptoPkgHostUnitTest.dsc | 3 + .../BaseCryptLib/BaseCryptLibUnitTests.c | 1 + .../UnitTest

Re: [edk2-devel] [PATCH 1/1] CryptoPkg: Fix pem heap-buffer-overflow due to BIO_snprintf()

2022-09-25 Thread yi1 li
Hi Jiewen, Can you take a look at this patch? WPA3 Tls API fuzzing is blocked because of same pem API. Thanks, Yi -Original Message- From: devel@edk2.groups.io On Behalf Of yi1 li Sent: Thursday, September 22, 2022 8:53 PM To: devel@edk2.groups.io Cc: Li, Yi1 ; Yao, Jiewen ; Wang, Jian

[edk2-devel] [PATCH V2 1/1] CryptoPkg: Fix pem heap-buffer-overflow due to BIO_snprintf()

2022-09-25 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4075 Fake BIO_snprintf() does not actually print anything to buf, it should return -1 as error. 0 will be considered a correct return value, the consumer may think that the buf is valid and parse the buffer. please refer to bugzilla link for deta

[edk2-devel] [PATCH 0/2] CryptoPkg: Add BigNum support

2022-01-29 Thread yi1 li
This patch series is used to add CryptBn library, which is wrapped over OpenSSL. The implementation provides CryptBn library functions for EFI BaseCrypt protocol and EFI BaseCrypt Configuration Protocol. yi1 li (2): CryptoPkg: Add BigNum support CryptoPkg: Add BigNum NullLib CryptoPkg

[edk2-devel] [PATCH 1/2] CryptoPkg: Add BigNum support

2022-01-29 Thread yi1 li
This patch is used to add CryptBn library, which is wrapped over OpenSSL. The implementation provides CryptBn library functions for EFI BaseCrypt protocol and EFI BaseCrypt Configuration Protocol. Signed-off-by: yi1 li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang

[edk2-devel] [PATCH 2/2] CryptoPkg: Add BigNum NullLib

2022-01-29 Thread yi1 li
This patch is used to add CryptBnNull library, which is used to optimize code size. Signed-off-by: yi1 li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- .../Library/BaseCryptLib/Bn/CryptBnNull.c | 525 ++ .../Library/BaseCryptLib/PeiCryptLib.inf

Re: [edk2-devel] [PATCH 2/2] CryptoPkg: Add BigNum NullLib

2022-01-30 Thread yi1 li
y, which is used to > optimize code size. > > Signed-off-by: yi1 li > > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Xiaoyu Lu > Cc: Guomin Jiang > --- > .../Library/BaseCryptLib/Bn/CryptBnNull.c | 525 ++ > .../Library/BaseCryptLib/PeiC

Re: [edk2-devel] [PATCH 2/2] CryptoPkg: Add BigNum NullLib

2022-02-08 Thread yi1 li
午6:10,Li, Yi1 写道: >> >> This patch is used to add CryptBnNull library, which is used to >> optimize code size. >> >> Signed-off-by: yi1 li >> >> Cc: Jiewen Yao >> Cc: Jian J Wang >> Cc: Xiaoyu Lu >> Cc: Guomin Jiang >

Re: [edk2-devel] [PATCH 1/2] Reconfigure OpensslLib to add elliptic curve chipher algorithms

2022-02-22 Thread yi1 li
Hi Vineel, Are you still working on this issue? I'm glad to see that edk2 will enable EC and other crypto features and would like some advice. I found from the previous discussion that there are only some issues with Ovmf binary size left, Have you tried enlarging the size of DXEFV in OvmfPkgIa

Re: [edk2-devel] [PATCH 1/2] Reconfigure OpensslLib to add elliptic curve chipher algorithms

2022-02-22 Thread yi1 li
for providing the inputs here. Really appreciated. I will try to resume the work(had to put it aside due to other priorities). Please expect the patch by EOW. Thanks, Vineel From: devel@edk2.groups.io On Behalf Of yi1 li via groups.io Sent: Tuesday, February 22, 2022 6:33 PM To: Vineel Kovvuri

Re: [edk2-devel] [PATCH 1/2] Reconfigure OpensslLib to add elliptic curve chipher algorithms

2022-02-24 Thread yi1 li
Hi Vineel, Code is good to me, just some BKM for edk2 upstream: 1. It's a little strange that there are submodule changes in the patch 0004, maybe you forget to run git submodule update: diff --git a/BaseTools/Source/C/BrotliCompress/brotli b/BaseTools/Source/C/BrotliCompress/brotli index

Re: [edk2-devel] [PATCH 1/2] Reconfigure OpensslLib to add elliptic curve chipher algorithms

2022-02-26 Thread yi1 li
Well done! And Edk2 has code style tools internal, use this cmd to fix it: pip install -r pip-requirements.txt git ls-files CryptoPkg*.c CryptoPkg*.h | .\.pytool\Plugin\UncrustifyCheck\mu-uncrustify-release_extdep\Windows-x86\uncrustify.exe -c .\.pytool\Plugin\UncrustifyCheck\uncrustify.cfg -F

Re: [edk2-devel] [PATCH 1/2] Reconfigure OpensslLib to add elliptic curve chipher algorithms

2022-02-28 Thread yi1 li
Hi Vineel, I noticed that there are some CI errors still in PR, 1. The VsIntrinscicLib is only used in OpenSSL related lib, putting it only in the CryptoPkg would make more sense and simplify the review process. 1. A BKM: NULL LibraryClass means that its internal API will not be called

Re: [edk2-devel] [PATCH 1/2] Reconfigure OpensslLib to add elliptic curve chipher algorithms

2022-03-01 Thread yi1 li
Thanks for your information, 1.See also https://edk2.groups.io/g/devel/message/87130 & followups. git branch here: https://github.com/kraxel/edk2/commits/intrinsics It's good to me, make code more clear. 2. Jiewen (Cc'ed) suggested to look into using CryptoPkg/Driver instead of linking openssl

Re: [edk2-devel] [PATCH 1/2] Reconfigure OpensslLib to add elliptic curve chipher algorithms

2022-03-03 Thread yi1 li
Agree with that and I think the first issue is OPENSSL_NO_* be not cover every file related to some feature in openssl (like ec). Once those macro defines can cover everything, we can put all files in OpensslLib.inf [Source], and control macro defines in opensslconf.h by PCDs to do customization.

[edk2-devel] [PATCH 0/2] BaseTools:Add the FeatureFlagExpression usage to the InfBuildData

2022-03-07 Thread yi1 li
is valid. If the expression evaluates to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Cc: Bob Feng Cc: Liming Gao Signed-off-by: yi1 li Signed-off-by: Zhiju.Fan yi1 li (2): BaseTools:Add the FeatureFlagExpression usage to the InfBuildData

[edk2-devel] [PATCH 1/2] BaseTools:Add the FeatureFlagExpression usage to the InfBuildData

2022-03-07 Thread yi1 li
. If the expression evaluates to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Cc: Bob Feng Cc: Liming Gao Signed-off-by: yi1 li Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Common/Expression.py | 2 +- BaseTools/Source/Python

[edk2-devel] [PATCH 2/2] BaseTools:Add the FeatureFlagExpression usage to the Source Section

2022-03-07 Thread yi1 li
to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Cc: Bob Feng Cc: Liming Gao Cc: Heng Luo Signed-off-by: yi1 li --- .../Source/Python/Workspace/InfBuildData.py | 16 +++- .../Source/Python/Workspace/MetaFileParser.py

[edk2-devel] [PATCH V2 0/2] BaseTools:Add the FeatureFlagExpression usage to the InfBuildData

2022-03-08 Thread yi1 li
is valid. If the expression evaluates to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Cc: Bob Feng Cc: Liming Gao Cc: Heng Luo Signed-off-by: yi1 li Signed-off-by: Zhiju.Fan yi1 li (2): BaseTools:Add the FeatureFlagExpression usage to

[edk2-devel] [PATCH V2 2/2] BaseTools:Add the FeatureFlagExpression usage to the Source Section

2022-03-08 Thread yi1 li
to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Cc: Bob Feng Cc: Liming Gao Cc: Heng Luo Signed-off-by: yi1 li --- BaseTools/Source/Python/Workspace/InfBuildData.py | 14 ++ .../Source/Python/Workspace/MetaFileParser.py

[edk2-devel] [PATCH V2 1/2] BaseTools:Add the FeatureFlagExpression usage to the InfBuildData

2022-03-08 Thread yi1 li
. If the expression evaluates to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Cc: Bob Feng Cc: Liming Gao Signed-off-by: yi1 li Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Common/Expression.py | 2 +- BaseTools/Source/Python

Re: [edk2-devel] [PATCH V2 2/2] BaseTools:Add the FeatureFlagExpression usage to the Source Section

2022-03-08 Thread yi1 li
TRUE,then the entry is valid. If the expression evaluates to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Cc: Bob Feng Cc: Liming Gao Cc: Heng Luo Signed-off-by: yi1 li --- BaseTools/Source/Python/Workspace/InfBuildData.py | 14

[edk2-devel] [PATCH 0/2] BaseTools: TEST ONLY0 FeatureFlagExpression

2022-03-16 Thread yi1 li
is valid. If the expression evaluates to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Signed-off-by: yi1 li yi1 li (2): BaseTools:Add the FeatureFlagExpression usage to the InfBuildData BaseTools:Add the FeatureFlagExpression usage to the

[edk2-devel] [PATCH 2/2] BaseTools: TEST ONLY2 FeatureFlagExpression

2022-03-16 Thread yi1 li
to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Signed-off-by: yi1 li --- BaseTools/Source/Python/Workspace/InfBuildData.py | 14 ++ .../Source/Python/Workspace/MetaFileParser.py | 4 2 files changed, 14 insertions

[edk2-devel] [PATCH 1/2] BaseTools: TEST ONLY1 FeatureFlagExpression

2022-03-16 Thread yi1 li
. If the expression evaluates to FALSE, then the EDK II build tools must ignore the entry. This patch is going to add this feature. Signed-off-by: yi1 li --- BaseTools/Source/Python/Common/Expression.py | 2 +- BaseTools/Source/Python/Common/GlobalData.py | 1 + .../Source/Python/Workspace

[edk2-devel] [PATCH V3 1/1] BaseTools: Add the FeatureFlagExpression usage to the Source Section

2022-03-22 Thread yi1 li
From: Yi Li REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3828 FeatureFlagExpression Support in Source section of INF file. The Pcd value in the expression is from INF or DEC. When a FeatureFlagExpression is present,if the expression evaluates to TRUE,then the entry is valid. If the express

[edk2-devel] [PATCH V3 0/1] BaseTools: Add the FeatureFlagExpression usage to the Source Section

2022-03-22 Thread yi1 li
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3828 FeatureFlagExpression Support in Source section of INF file. The Pcd value in the expression is from INF or DEC. When a FeatureFlagExpression is present,if the expression evaluates to TRUE,then the entry is valid. If the expression evaluates

[edk2-devel] [PATCH 1/1] CryptoPkg: Add consumed library class by SMM to dsc file

2022-03-22 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3881 LibraryClass MmServicesTableLib SynchronizationLib in SmmCryptLib.inf should be listed in CryptoPkg.dsc. Cc: Jiewen Yao Cc: Jian J Wang Cc: Zhihao Li Signed-off-by: yi1 li --- CryptoPkg/CryptoPkg.dsc | 2 ++ 1 file changed, 2

[edk2-devel] [PATCH 1/1] BaseTools: INF should use latest Pcd value instead of default value

2022-07-10 Thread yi1 li
This patch is a bug fix about FeatureFlagExpression in INF file: INF [Source] section now unconditionally use Pcd default value in DEC when handling FeatureFlagExpression, it is wrong. If a Pcd value has been set in the DSC file, we should use latest value in DSC instead of default value. Cc:

[edk2-devel] [staging/crypto-new-api PATCH] CryptoPkg: Fix issues from crypto code review.

2022-07-14 Thread yi1 li
Details: 1. Some APIs need more detail comment. 2. Correct BnRShift() param order. 3. Remove unsecure ECC curve from GroupToNid(). 4. Add full public key validating procedures to EcDhDeriveSecret(). Cc: Ming Tan Cc: Heng Luo Signed-off-by: Yi Li --- CryptoPkg/Driver/Crypto.c

[edk2-devel] [staging/crypto-new-api PATCH] CryptoPkg: Fixed possible security implications in ECDH and BN.

2022-07-14 Thread yi1 li
1. Origenal code mixes up the input/output parameters for the BN_rshift() function - the output is actually the first parameter and not the second one. Now we correct BnRShift() param order. 2. NID_X9_62_prime192v1() and NID_secp224r1 prohibited by Intel Crypto/TLS Guidelines (due to being insuffi

Re: [edk2-devel] [PATCH 1/1] BaseTools: INF should use latest Pcd value instead of default value

2022-07-21 Thread yi1 li
- > From: devel@edk2.groups.io On Behalf Of yi1 li > Sent: Monday, July 11, 2022 1:48 PM > To: devel@edk2.groups.io > Cc: Li, Yi1 ; Feng, Bob C ; > Gao, Liming > Subject: [edk2-devel] [PATCH 1/1] BaseTools: INF should use latest Pcd > value instead of default value >

[edk2-devel] [PATCH 0/7] CryptoPkg: Add BigNum and EC support to BaseCryptLib

2022-09-07 Thread yi1 li
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 and CryptEc library, which are wrapped over OpenSSL. The implementation provides library functions for EFI BaseCrypt protocol and EFI BaseCrypt

[edk2-devel] [PATCH 1/7] CryptoPkg: Add BigNum support

2022-09-07 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 This patch is used to add CryptBn library, which is wrapped over OpenSSL. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/Include/Library/BaseCryptLib.h | 418 + .../Li

[edk2-devel] [PATCH 2/7] CryptoPkg: Add BigNum API to DXE and protocol

2022-09-07 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 The implementation provides CryptBn library functions for EFI CryptoDxe and EFI BaseCrypt Protocol. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/CryptoPkg.dsc

[edk2-devel] [PATCH 3/7] CryptoPkg: Add EC support

2022-09-07 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 This patch is used to add CryptEc library, which is wrapped over OpenSSL. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/Include/Library/BaseCryptLib.h | 424 ++ .../Libr

[edk2-devel] [PATCH 4/7] CryptoPkg: Add EC APIs to DXE and protocol

2022-09-07 Thread yi1 li
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 The implementation provides CryptEc library functions for EFI Driveer and EFI BaseCrypt Protocol. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/CryptoPkg.dsc |

[edk2-devel] [PATCH 5/7] CryptoPkg/Test: Add unit test for CryptoBn

2022-09-07 Thread yi1 li
Add unit test for CryptoBn. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- .../BaseCryptLib/UnitTestHostBaseCryptLib.inf | 1 + .../BaseCryptLib/BaseCryptLibUnitTests.c | 1 + .../UnitTest/Library/BaseCryptLib/BnTests.c | 257 +++

[edk2-devel] [PATCH 6/7] CryptoPkg/Test: Add unit test for CryptoEc

2022-09-07 Thread yi1 li
Add unit test for CryptoEc. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- .../BaseCryptLib/UnitTestHostBaseCryptLib.inf | 2 + CryptoPkg/Test/CryptoPkgHostUnitTest.dsc | 3 + .../BaseCryptLib/BaseCryptLibUnitTests.c | 1 + .../UnitTest

[edk2-devel] [PATCH 7/7] CryptoPkg: Run uncrustify tools on EC and BN change

2022-09-07 Thread yi1 li
Run uncrustify tools on EC and BN change to meet UEFI code style. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/Driver/Crypto.c | 2 +- CryptoPkg/Include/Library/BaseCryptLib.h | 8 +- CryptoPkg/Library/BaseCryp

[edk2-devel] [PATCH 0/3] CryptoPkg: Enable ECC in openssllib by a customize-able way

2022-04-12 Thread yi1 li
| 1,008,352 | 721,408| 744,832| Cc: Jiewen Yao Cc: Jian J Wang Signed-off-by: yi1 li yi1 li (3): CryptoPkg: Add instrinsics to support building ECC on IA32 windows CryptoPkg: Reconfigure OpensslLib to add EC algorithms CryptoPkg: Make EC source file config-able CryptoPkg

[edk2-devel] [PATCH 1/3] CryptoPkg: Add instrinsics to support building ECC on IA32 windows

2022-04-12 Thread yi1 li
Signed-off-by: yi1 li --- .../Library/IntrinsicLib/Ia32/MathLlmul.asm | 98 +++ .../Library/IntrinsicLib/Ia32/MathLlshr.asm | 78 +++ .../Library/IntrinsicLib/IntrinsicLib.inf | 2 + 3 files changed, 178 insertions(+) create mode 100644 CryptoPkg/Library

[edk2-devel] [PATCH 2/3] CryptoPkg: Reconfigure OpensslLib to add EC algorithms

2022-04-12 Thread yi1 li
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3679 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3828 Reconfigure OpensslLib to add elliptic curve cipher algorithms. Cc: Jiewen Yao Cc: Jian J Wang Signed-off-by: yi1 li --- .../Library/Include/openssl/opensslconf.h | 3

[edk2-devel] [PATCH 3/3] CryptoPkg: Make EC source file config-able

2022-04-12 Thread yi1 li
compiled. Cc: Jiewen Yao Cc: Jian J Wang Signed-off-by: yi1 li --- CryptoPkg/CryptoPkg.dec | 4 + .../Library/Include/openssl/opensslconf.h | 7 +- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 96 ++- .../Library/OpensslLib/OpensslLibCrypto.inf | 96

[edk2-devel] [PATCH V2 1/3] CryptoPkg: Add instrinsics to support building ECC on IA32 windows

2022-04-13 Thread yi1 li
Signed-off-by: yi1 li --- .../Library/IntrinsicLib/Ia32/MathLlmul.asm | 98 +++ .../Library/IntrinsicLib/Ia32/MathLlshr.asm | 78 +++ .../Library/IntrinsicLib/IntrinsicLib.inf | 2 + 3 files changed, 178 insertions(+) create mode 100644 CryptoPkg/Library

[edk2-devel] [PATCH V2 2/3] CryptoPkg: Reconfigure OpensslLib to add EC algorithms

2022-04-13 Thread yi1 li
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3679 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3828 Reconfigure OpensslLib to add elliptic curve cipher algorithms. Cc: Jiewen Yao Cc: Jian J Wang Signed-off-by: yi1 li --- .../Library/Include/openssl/opensslconf.h | 3

[edk2-devel] [PATCH V2 3/3] CryptoPkg: Make EC source file config-able

2022-04-13 Thread yi1 li
compiled. Cc: Jiewen Yao Cc: Jian J Wang Signed-off-by: yi1 li --- CryptoPkg/CryptoPkg.dec | 4 + .../Library/Include/openssl/opensslconf.h | 7 +- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 95 ++- .../Library/OpensslLib/OpensslLibCrypto.inf | 95

Re: [edk2-devel] [PATCH 0/3] CryptoPkg: Enable ECC in openssllib by a customize-able way

2022-04-13 Thread yi1 li
| CryptPei.efi | CryptSmm.efi | > Before | 815,616| 540,544| 563,712| > Diabled | 815,616| 540,544| 563,712| > Enabled | 1,008,352 | 721,408 | 744,832 | > > Cc: Jiewen Yao > Cc: Jian J Wang > > Signed-off-by

[edk2-devel] [PATCH 1/1] BaseTools: Move gPlatformFinalPcd to Datapipe and optimize size

2022-04-18 Thread yi1 li
gPlatformFinalPcd into datapipe and modifies the assignment logicto fix this. Cc: Bob Feng Cc: Liming Gao Signed-off-by: yi1 li --- BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 1 + BaseTools/Source/Python/AutoGen/DataPipe.py | 2 ++ BaseTools/Source/Python/Workspace/DscBuildData.py | 1

[edk2-devel] [PATCH 1/4] CryptoPkg: Add instrinsics to support building ECC on IA32 windows

2022-04-18 Thread yi1 li
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3679 This dependency is needed to build openssl lib with ECC ciphers under IA32 Windows and adds implementation for _allmul and _allshr instrinsics. It is taken from Project Mu: microsoft/mu_basecore@b55b341 Signed-off-by: yi1 li

[edk2-devel] [PATCH 0/4] !!TEST Fix warnings of EC feature

2022-04-18 Thread yi1 li
As subject. yi1 li (4): CryptoPkg: Add instrinsics to support building ECC on IA32 windows CryptoPkg: Reconfigure OpensslLib to add EC algorithms CryptoPkg: Make EC source file config-able CryptoPkg: Add PcdEcEnabled to Base/Pei/SmmCryptLib.inf CryptoPkg/CryptoPkg.dec

[edk2-devel] [PATCH 2/4] CryptoPkg: Reconfigure OpensslLib to add EC algorithms

2022-04-18 Thread yi1 li
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3679 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3828 Reconfigure OpensslLib to add elliptic curve cipher algorithms. Signed-off-by: yi1 li --- .../Library/Include/openssl/opensslconf.h | 3 -- CryptoPkg/Library/OpensslLib

[edk2-devel] [PATCH 4/4] CryptoPkg: Add PcdEcEnabled to Base/Pei/SmmCryptLib.inf

2022-04-18 Thread yi1 li
compilers Signed-off-by: yi1 li --- CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf | 3 +++ CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf| 3 +++ CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf| 3 +++ CryptoPkg/Library/OpensslLib/OpensslLib.inf | 3 +-- CryptoPkg/Library/OpensslLib

[edk2-devel] [PATCH 3/4] CryptoPkg: Make EC source file config-able

2022-04-18 Thread yi1 li
compiled. Signed-off-by: yi1 li --- CryptoPkg/CryptoPkg.dec | 4 + .../Library/Include/openssl/opensslconf.h | 7 +- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 95 ++- .../Library/OpensslLib/OpensslLibCrypto.inf | 95 ++- 4 files

Re: [edk2-devel] [PATCH 1/4] CryptoPkg: Add instrinsics to support building ECC on IA32 windows

2022-04-18 Thread yi1 li
io On Behalf Of yi1 li > Sent: Monday, April 18, 2022 6:03 AM > To: devel@edk2.groups.io > Cc: Li, Yi1 > Subject: [edk2-devel] [PATCH 1/4] CryptoPkg: Add instrinsics to > support building ECC on IA32 windows > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3679 >

[edk2-devel] [PATCH 1/1] CryptoPkg: Declare PcdEcEnabled in Library consuming OpensslLib

2022-04-19 Thread yi1 li
From: Yi Li REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3679 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3828 Tls/Base/Pei/Smm/RuntimeCryptLib.inf will use OpensslLib, and the opensslconf.h in openssllib will use PcdEcEnabled, but it is not declared in the inf file now, it will cau

Re: [edk2-devel] [PATCH 3/4] CryptoPkg: Make EC source file config-able

2022-04-25 Thread yi1 li
value is not handled yet. The edk2 CI doesn't seem to build modules relying on OpenSSL due to the CONTINUOUS_INTEGRATION flag, explaining why the patch passed the CI I think. I added Bob as I think he knows more about BaseTools. Regards, Pierre On 4/18/22 15:03, yi1 li vi

[edk2-devel] [PATCH 1/1] MdePkg: Add WPA3 related TLS configure macro

2022-05-04 Thread yi1 li
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3892 Which are needed for SUITE-B and SUITE-B-192. Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: yi1 li --- MdePkg/Include/IndustryStandard/Tls1.h | 133 ++--- 1 file changed, 97 insertions(+), 36 deletions(-) diff

Re: [edk2-devel] [PATCH 1/1] MdePkg: Add WPA3 related TLS configure macro

2022-05-04 Thread yi1 li
Thank you Yao, Jiewen > -Original Message- > From: devel@edk2.groups.io On Behalf Of yi1 li > Sent: Wednesday, May 4, 2022 5:31 PM > To: devel@edk2.groups.io > Cc: Li, Yi1 ; Kinney, Michael D > ; Gao, Liming > Subject: [edk2-devel] [PATCH 1/1] MdePkg: Add WPA3 relat

Re: [edk2-devel] [PATCH 1/1] MdePkg: Add WPA3 related TLS configure macro

2022-05-06 Thread yi1 li
out consumer, it is hard for me to understand why they are needed, or if we miss something else. Thank you Yao, Jiewen > -Original Message- > From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> > mailto:devel@edk2.groups.io>> On Behalf Of yi1 li > Sent

[edk2-devel] [PATCH 0/3] CryptoPkg/openssl: Enable EC conditionally.

2022-05-08 Thread yi1 li
Recommend for Gerd: (2) Keep the EC config option, but update process_files.pl to automatically add the PcdEcEnabled config option handling to the files it generates. This patch set does (2). When remove 'no-ec' from openssl configure list, will automatically remove 'OPENSSL_NO_EC', 'OPENSSL_

[edk2-devel] [PATCH 1/3] CryptoPkg: Update process_files.pl to automatically add PCD config option

2022-05-08 Thread yi1 li
Recommend from Gerd: (2) Keep the EC config option, but update process_files.pl to automatically add the PcdEcEnabled config option handling to the files it generates. When remove 'no-ec' from openssl configure list, will automatically remove 'OPENSSL_NO_EC', 'OPENSSL_NO_ECDH', 'OPENSSL_NO_ECD

[edk2-devel] [PATCH 2/3] CryptoPkg/openssl: disable codestyle checks for generated files

2022-05-08 Thread yi1 li
Files generated by process_files.pl from openssl sources should not be checked for edk2 code style. Signed-off-by: Gerd Hoffmann Signed-off-by: Yi Li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- CryptoPkg/CryptoPkg.ci.yaml | 10 ++ 1 file changed, 10 insertions

[edk2-devel] [PATCH 3/3] CryptoPkg/openssl: update generated files

2022-05-08 Thread yi1 li
Run process_files.pl with the current openssl submodule version. Signed-off-by: Yi Li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Cc: Gerd Hoffmann --- CryptoPkg/Library/Include/crypto/dso_conf.h | 7 +- .../Library/Include/openssl/opensslconf.h | 266 +

Re: [edk2-devel] [PATCH 3/3] CryptoPkg/openssl: update generated files

2022-05-08 Thread yi1 li
Hi, Changes to this file are automatically generated by perl script. Modified them before to follow edk2 code style. Gerd thinks files generated by process_files.pl from openssl sources should not be checked for edk2 code style, I agree with him. So the changes are back. -Original Message--

Re: [edk2-devel] [PATCH 1/3] CryptoPkg: Update process_files.pl to automatically add PCD config option

2022-05-09 Thread yi1 li
Sounds good, I like this idea which make openssl generated part and edk2 conditional part more clear. Thank you, Yi -Original Message- From: devel@edk2.groups.io On Behalf Of Gerd Hoffmann Sent: Monday, May 9, 2022 5:34 PM To: Li, Yi1 Cc: devel@edk2.groups.io; Yao, Jiewen ; Wang, Jian

Re: [edk2-devel] [PATCH 3/3] CryptoPkg/openssl: update generated files

2022-05-09 Thread yi1 li
Yes it does come from running the generated files though uncrustify once last year when uncrustify was introduced: https://github.com/tianocore/edk2/commit/7c342378317039e632d9a1a5d4cf7c21aec8cb7a I can remove those change next patch to avoid confusion. Thank you, Yi -Original Message

[edk2-devel] [PATCH V2 0/5] CryptoPkg/openssl: Enable EC conditionally.

2022-05-09 Thread yi1 li
Recommend from Gerd: (2) Keep the EC config option, but update process_files.pl to automatically add the PcdEcEnabled config option handling to the files it generates. This patch set does (2). When remove 'no-ec' from openssl configure list, will automatically remove 'OPENSSL_NO_EC', 'OPENSSL

[edk2-devel] [PATCH V2 1/5] CryptoPkg: Rename PCD about openssl EC configuration

2022-05-09 Thread yi1 li
PcdOpensslXXXEnabled is a more appropriate choice. Signed-off-by: Yi Li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- CryptoPkg/CryptoPkg.dec | 2 +- .../Library/BaseCryptLib/BaseCryptLib.inf | 2 +- .../Library/BaseCryptLib/PeiCryptLib.inf

[edk2-devel] [PATCH V2 2/5] CryptoPkg: Separate auto-generated openssl config and edk2 openssl config

2022-05-09 Thread yi1 li
Move auto-generated openssl config to opensslconf_generated.h, And opensslconf.h will contain both edk2 conditional openssl feature and opensslconf_generated.h. Will make two part more clear. New conditional feture code in opensslconf.h will look like: /* Autogenerated conditional openssl featur

[edk2-devel] [PATCH V2 3/5] CryptoPkg: Update process_files.pl to automatically add PCD config option

2022-05-09 Thread yi1 li
Recommend from Gerd: (2) Keep the EC config option, but update process_files.pl to automatically add the PcdEcEnabled config option handling to the files it generates. When remove 'no-ec' from openssl configure list, will automatically remove 'OPENSSL_NO_EC', 'OPENSSL_NO_ECDH', 'OPENSSL_NO_ECD

[edk2-devel] [PATCH V2 4/5] CryptoPkg/openssl: update generated files

2022-05-09 Thread yi1 li
Run process_files.pl with the current openssl submodule version. Signed-off-by: Yi Li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Cc: Gerd Hoffmann --- CryptoPkg/Library/Include/crypto/dso_conf.h | 7 +- .../Library/Include/openssl/opensslconf.h | 17 ++ .../Inclu

[edk2-devel] [PATCH V2 5/5] CryptoPkg/openssl: disable codestyle checks for generated files

2022-05-09 Thread yi1 li
Files generated by process_files.pl from openssl sources should not be checked for edk2 code style. Signed-off-by: Gerd Hoffmann Signed-off-by: Yi Li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- CryptoPkg/CryptoPkg.ci.yaml | 11 +++ 1 file changed, 11 insertion

[edk2-devel] [PATCH V3 5/5] CryptoPkg/openssl: disable codestyle checks for generated files

2022-05-09 Thread yi1 li
Files generated by process_files.pl from openssl sources should not be checked for edk2 code style. Signed-off-by: Gerd Hoffmann Signed-off-by: Yi Li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- CryptoPkg/CryptoPkg.ci.yaml | 14 +- 1 file changed, 13 insert

[edk2-devel] [PATCH V4 0/5] CryptoPkg/openssl: Enable EC conditionally.

2022-05-10 Thread yi1 li
Recommend from Gerd: (2) Keep the EC config option, but update process_files.pl to automatically add the PcdEcEnabled config option handling to the files it generates. This patch set does (2). When remove 'no-ec' from openssl configure list, will automatically remove 'OPENSSL_NO_EC', 'OPENSS

[edk2-devel] [PATCH V4 1/5] CryptoPkg: Rename PCD about openssl EC configuration

2022-05-10 Thread yi1 li
PcdOpensslXXXEnabled is a more appropriate choice. Signed-off-by: Yi Li Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- CryptoPkg/CryptoPkg.dec | 2 +- .../Library/BaseCryptLib/BaseCryptLib.inf | 2 +- .../Library/BaseCryptLib/PeiCryptLib.inf

  1   2   >