[edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain openssl library calls

Gerd Hoffmann posted 4 patches 1 year, 2 months ago
Failed in applying to current master (apply log)
.../Library/BaseCryptLib/Hash/CryptSha1.c     | 16 ++++++++--
.../Library/BaseCryptLib/Hash/CryptSha256.c   | 16 ++++++++--
.../Library/BaseCryptLib/Hash/CryptSha512.c   | 32 +++++++++++++++----
3 files changed, 52 insertions(+), 12 deletions(-)
[edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain openssl library calls
Posted by Gerd Hoffmann 1 year, 2 months ago
In preparation for the openssl 3.0 switch ...

openssl 3.0 sneak preview (WIP still, does not yet pass CI) is at
https://github.com/kraxel/edk2/commits/openssl3

Gerd Hoffmann (4):
  CryptoPkg/BaseCryptLib: avoid using SHA1()
  CryptoPkg/BaseCryptLib: avoid using SHA256()
  CryptoPkg/BaseCryptLib: avoid using SHA384()
  CryptoPkg/BaseCryptLib: avoid using SHA512()

 .../Library/BaseCryptLib/Hash/CryptSha1.c     | 16 ++++++++--
 .../Library/BaseCryptLib/Hash/CryptSha256.c   | 16 ++++++++--
 .../Library/BaseCryptLib/Hash/CryptSha512.c   | 32 +++++++++++++++----
 3 files changed, 52 insertions(+), 12 deletions(-)

-- 
2.39.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100123): https://edk2.groups.io/g/devel/message/100123
Mute This Topic: https://groups.io/mt/96943599/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain openssl library calls
Posted by Yao, Jiewen 1 year, 2 months ago
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
> Hoffmann
> Sent: Tuesday, February 14, 2023 3:20 AM
> To: devel@edk2.groups.io
> Cc: Oliver Steffen <osteffen@redhat.com>; Pawel Polawski
> <ppolawsk@redhat.com>; Gerd Hoffmann <kraxel@redhat.com>
> Subject: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain
> openssl library calls
> 
> In preparation for the openssl 3.0 switch ...
> 
> openssl 3.0 sneak preview (WIP still, does not yet pass CI) is at
> https://github.com/kraxel/edk2/commits/openssl3
> 
> Gerd Hoffmann (4):
>   CryptoPkg/BaseCryptLib: avoid using SHA1()
>   CryptoPkg/BaseCryptLib: avoid using SHA256()
>   CryptoPkg/BaseCryptLib: avoid using SHA384()
>   CryptoPkg/BaseCryptLib: avoid using SHA512()
> 
>  .../Library/BaseCryptLib/Hash/CryptSha1.c     | 16 ++++++++--
>  .../Library/BaseCryptLib/Hash/CryptSha256.c   | 16 ++++++++--
>  .../Library/BaseCryptLib/Hash/CryptSha512.c   | 32 +++++++++++++++----
>  3 files changed, 52 insertions(+), 12 deletions(-)
> 
> --
> 2.39.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100229): https://edk2.groups.io/g/devel/message/100229
Mute This Topic: https://groups.io/mt/96943599/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain openssl library calls
Posted by Gerd Hoffmann 1 year, 1 month ago
  Hi,

Ping.  Code freeze is over, can we merge this now?

thanks,
  Gerd

On Wed, Feb 15, 2023 at 08:15:32AM +0000, Yao, Jiewen wrote:
> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
> > Hoffmann
> > Sent: Tuesday, February 14, 2023 3:20 AM
> > To: devel@edk2.groups.io
> > Cc: Oliver Steffen <osteffen@redhat.com>; Pawel Polawski
> > <ppolawsk@redhat.com>; Gerd Hoffmann <kraxel@redhat.com>
> > Subject: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain
> > openssl library calls
> > 
> > In preparation for the openssl 3.0 switch ...
> > 
> > openssl 3.0 sneak preview (WIP still, does not yet pass CI) is at
> > https://github.com/kraxel/edk2/commits/openssl3
> > 
> > Gerd Hoffmann (4):
> >   CryptoPkg/BaseCryptLib: avoid using SHA1()
> >   CryptoPkg/BaseCryptLib: avoid using SHA256()
> >   CryptoPkg/BaseCryptLib: avoid using SHA384()
> >   CryptoPkg/BaseCryptLib: avoid using SHA512()
> > 
> >  .../Library/BaseCryptLib/Hash/CryptSha1.c     | 16 ++++++++--
> >  .../Library/BaseCryptLib/Hash/CryptSha256.c   | 16 ++++++++--
> >  .../Library/BaseCryptLib/Hash/CryptSha512.c   | 32 +++++++++++++++----
> >  3 files changed, 52 insertions(+), 12 deletions(-)
> > 
> > --
> > 2.39.1
> > 
> > 
> > 
> > 
> > 
> 

-- 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100782): https://edk2.groups.io/g/devel/message/100782
Mute This Topic: https://groups.io/mt/96943599/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain openssl library calls
Posted by Yao, Jiewen 1 year, 1 month ago
Sure.
Thanks to remind me.
https://github.com/tianocore/edk2/pull/4104.

Thank you
Yao, Jiewen

> -----Original Message-----
> From: kraxel@redhat.com <kraxel@redhat.com>
> Sent: Tuesday, March 7, 2023 2:54 PM
> To: Yao, Jiewen <jiewen.yao@intel.com>
> Cc: devel@edk2.groups.io; Oliver Steffen <osteffen@redhat.com>; Pawel
> Polawski <ppolawsk@redhat.com>
> Subject: Re: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain
> openssl library calls
> 
>   Hi,
> 
> Ping.  Code freeze is over, can we merge this now?
> 
> thanks,
>   Gerd
> 
> On Wed, Feb 15, 2023 at 08:15:32AM +0000, Yao, Jiewen wrote:
> > Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
> > > Hoffmann
> > > Sent: Tuesday, February 14, 2023 3:20 AM
> > > To: devel@edk2.groups.io
> > > Cc: Oliver Steffen <osteffen@redhat.com>; Pawel Polawski
> > > <ppolawsk@redhat.com>; Gerd Hoffmann <kraxel@redhat.com>
> > > Subject: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain
> > > openssl library calls
> > >
> > > In preparation for the openssl 3.0 switch ...
> > >
> > > openssl 3.0 sneak preview (WIP still, does not yet pass CI) is at
> > > https://github.com/kraxel/edk2/commits/openssl3
> > >
> > > Gerd Hoffmann (4):
> > >   CryptoPkg/BaseCryptLib: avoid using SHA1()
> > >   CryptoPkg/BaseCryptLib: avoid using SHA256()
> > >   CryptoPkg/BaseCryptLib: avoid using SHA384()
> > >   CryptoPkg/BaseCryptLib: avoid using SHA512()
> > >
> > >  .../Library/BaseCryptLib/Hash/CryptSha1.c     | 16 ++++++++--
> > >  .../Library/BaseCryptLib/Hash/CryptSha256.c   | 16 ++++++++--
> > >  .../Library/BaseCryptLib/Hash/CryptSha512.c   | 32 +++++++++++++++---
> -
> > >  3 files changed, 52 insertions(+), 12 deletions(-)
> > >
> > > --
> > > 2.39.1
> > >
> > >
> > >
> > > 
> > >
> >
> 
> --



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100791): https://edk2.groups.io/g/devel/message/100791
Mute This Topic: https://groups.io/mt/96943599/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain openssl library calls
Posted by Yao, Jiewen 1 year, 2 months ago
Good work, Gerd!

Do you have any data on how many K can be saved?

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
> Hoffmann
> Sent: Tuesday, February 14, 2023 3:20 AM
> To: devel@edk2.groups.io
> Cc: Oliver Steffen <osteffen@redhat.com>; Pawel Polawski
> <ppolawsk@redhat.com>; Gerd Hoffmann <kraxel@redhat.com>
> Subject: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain
> openssl library calls
> 
> In preparation for the openssl 3.0 switch ...
> 
> openssl 3.0 sneak preview (WIP still, does not yet pass CI) is at
> https://github.com/kraxel/edk2/commits/openssl3
> 
> Gerd Hoffmann (4):
>   CryptoPkg/BaseCryptLib: avoid using SHA1()
>   CryptoPkg/BaseCryptLib: avoid using SHA256()
>   CryptoPkg/BaseCryptLib: avoid using SHA384()
>   CryptoPkg/BaseCryptLib: avoid using SHA512()
> 
>  .../Library/BaseCryptLib/Hash/CryptSha1.c     | 16 ++++++++--
>  .../Library/BaseCryptLib/Hash/CryptSha256.c   | 16 ++++++++--
>  .../Library/BaseCryptLib/Hash/CryptSha512.c   | 32 +++++++++++++++----
>  3 files changed, 52 insertions(+), 12 deletions(-)
> 
> --
> 2.39.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100149): https://edk2.groups.io/g/devel/message/100149
Mute This Topic: https://groups.io/mt/96943599/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain openssl library calls
Posted by Gerd Hoffmann 1 year, 2 months ago
On Tue, Feb 14, 2023 at 01:17:55AM +0000, Yao, Jiewen wrote:
> Good work, Gerd!
> 
> Do you have any data on how many K can be saved?

Essentially we are down to a handfull of source files for SEC and PEI,
assuming both only need hash functions for tdx/tpm measurements.

https://github.com/kraxel/edk2/commit/58f323f68dfaeaf4b88a8658790f0b0a4b578642

SMM and DXE are still a significant increase in size and I don't see an
easy way around that.  Switching to the crypto driver should mitigate
that somewhat.  Don't have detailed numbers at hand.

take care,
  Gerd

> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
> > Hoffmann
> > Sent: Tuesday, February 14, 2023 3:20 AM
> > To: devel@edk2.groups.io
> > Cc: Oliver Steffen <osteffen@redhat.com>; Pawel Polawski
> > <ppolawsk@redhat.com>; Gerd Hoffmann <kraxel@redhat.com>
> > Subject: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain
> > openssl library calls
> > 
> > In preparation for the openssl 3.0 switch ...
> > 
> > openssl 3.0 sneak preview (WIP still, does not yet pass CI) is at
> > https://github.com/kraxel/edk2/commits/openssl3
> > 
> > Gerd Hoffmann (4):
> >   CryptoPkg/BaseCryptLib: avoid using SHA1()
> >   CryptoPkg/BaseCryptLib: avoid using SHA256()
> >   CryptoPkg/BaseCryptLib: avoid using SHA384()
> >   CryptoPkg/BaseCryptLib: avoid using SHA512()
> > 
> >  .../Library/BaseCryptLib/Hash/CryptSha1.c     | 16 ++++++++--
> >  .../Library/BaseCryptLib/Hash/CryptSha256.c   | 16 ++++++++--
> >  .../Library/BaseCryptLib/Hash/CryptSha512.c   | 32 +++++++++++++++----
> >  3 files changed, 52 insertions(+), 12 deletions(-)
> > 
> > --
> > 2.39.1
> > 
> > 
> > 
> > 
> > 
> 

-- 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100167): https://edk2.groups.io/g/devel/message/100167
Mute This Topic: https://groups.io/mt/96943599/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-