public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"kraxel@redhat.com" <kraxel@redhat.com>
Cc: Pawel Polawski <ppolawsk@redhat.com>,
	"Li, Yi1" <yi1.li@intel.com>,
	Oliver Steffen <osteffen@redhat.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	"Jiang, Guomin" <guomin.jiang@intel.com>,
	"Lu, Xiaoyu1" <xiaoyu1.lu@intel.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>
Subject: Re: [edk2-devel] [PATCH 0/5] CryptoPkg/openssl: enable EC unconditionally.
Date: Mon, 9 May 2022 12:12:00 +0000	[thread overview]
Message-ID: <MW4PR11MB58723B3EA87A2F804122CD098CC69@MW4PR11MB5872.namprd11.prod.outlook.com> (raw)
In-Reply-To: <16ED6E30C7B1AB9D.18911@groups.io>

I am not sure how good the openssl MACRO is designed to remove unnecessary crypto.

I think we may submit patch to openssl to add more configuration, if that can help reduce size.

Thank you
Yao Jiewen


> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao, Jiewen
> Sent: Monday, May 9, 2022 8:03 PM
> To: devel@edk2.groups.io; James.Bottomley@HansenPartnership.com;
> kraxel@redhat.com
> Cc: Pawel Polawski <ppolawsk@redhat.com>; Li, Yi1 <yi1.li@intel.com>; Oliver
> Steffen <osteffen@redhat.com>; Wang, Jian J <jian.j.wang@intel.com>; Ard
> Biesheuvel <ardb+tianocore@kernel.org>; Jiang, Guomin
> <guomin.jiang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Justen, Jordan
> L <jordan.l.justen@intel.com>
> Subject: Re: [edk2-devel] [PATCH 0/5] CryptoPkg/openssl: enable EC
> unconditionally.
> 
> It is possible to switch to other crypt lib.
> 
> For example, the *mbedtls* version POC can be found at
> https://github.com/jyao1/edk2/tree/DeviceSecurity/CryptoMbedTlsPkg
> The advantage is: the size is much smaller.
> The disadvantage is: some required functions are not available, such as PKCS7.
> 
> Thank you
> Yao Jiewen
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of James
> > Bottomley
> > Sent: Monday, May 9, 2022 7:48 PM
> > To: devel@edk2.groups.io; kraxel@redhat.com; Yao, Jiewen
> > <jiewen.yao@intel.com>
> > Cc: Pawel Polawski <ppolawsk@redhat.com>; Li, Yi1 <yi1.li@intel.com>;
> Oliver
> > Steffen <osteffen@redhat.com>; Wang, Jian J <jian.j.wang@intel.com>; Ard
> > Biesheuvel <ardb+tianocore@kernel.org>; Jiang, Guomin
> > <guomin.jiang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Justen,
> Jordan
> > L <jordan.l.justen@intel.com>
> > Subject: Re: [edk2-devel] [PATCH 0/5] CryptoPkg/openssl: enable EC
> > unconditionally.
> >
> > On Mon, 2022-05-09 at 13:27 +0200, Gerd Hoffmann wrote:
> > [...]
> > > > 1) Please keep the good work to enable OPENSSL3.0 in your personal
> > > > branch.
> > > > 2) If you have some way to control the size, then do it. If there
> > > > is no much size difference by default, then you can submit to EDKII
> > > > directly.
> > >
> > > I suspect I wouldn't get it down to 1.1.1 levels even if I find some
> > > ways to make it smaller than it is in my branch today.  The code for
> > > the new "provider" concept simply needs space and I think it also
> > > makes LTO optimization less effective.
> >
> > Having just looked into converting engine code to provider code, I
> > would concur with this.  The design of providers, with their many to
> > many functional mappings, seems designed to promote code bloat.
> >
> > > Maybe creating our own crypto providers which include only the
> > > algorithms actually needed by edk2 gets the size down a bit.
> >
> > What about switching to a different crypto backend?  Since we don't
> > expose any openssl APIs at all and we wrapper everything we do expose,
> > it should be possible to switch to one of the non-openssl (or forked
> > from openssl) variants that value size, like mbedtls or boringssl?
> >
> > James
> >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 


      parent reply	other threads:[~2022-05-09 12:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 10:34 [PATCH 0/5] CryptoPkg/openssl: enable EC unconditionally Gerd Hoffmann
2022-05-02 10:34 ` [PATCH 1/5] Revert "CryptoPkg: Declare PcdEcEnabled in Library consuming OpensslLib" Gerd Hoffmann
2022-05-02 10:34 ` [PATCH 2/5] Revert "CryptoPkg: Make EC source file config-able" Gerd Hoffmann
2022-05-02 10:34 ` [PATCH 3/5] OvmfPkg: make DXEFV larger Gerd Hoffmann
2022-05-02 19:39   ` Ard Biesheuvel
2022-05-02 10:34 ` [PATCH 4/5] CryptoPkg/openssl: update generated files Gerd Hoffmann
2022-05-02 10:34 ` [PATCH 5/5] CryptoPkg/openssl: disable codestyle checks for " Gerd Hoffmann
2022-05-03 15:39 ` [PATCH 0/5] CryptoPkg/openssl: enable EC unconditionally Yao, Jiewen
2022-05-05  8:06   ` Gerd Hoffmann
2022-05-05  9:15     ` [edk2-devel] " Gerd Hoffmann
2022-05-09  1:38       ` Yao, Jiewen
2022-05-09  9:45         ` Gerd Hoffmann
2022-05-09 10:17           ` Yao, Jiewen
2022-05-09 11:27             ` Gerd Hoffmann
2022-05-09 11:47               ` James Bottomley
2022-05-09 12:03                 ` Yao, Jiewen
2022-05-09 13:41                   ` James Bottomley
2022-05-10 10:40                     ` Gerd Hoffmann
2022-05-10 11:20                       ` Yao, Jiewen
2022-05-10 14:31                       ` James Bottomley
     [not found]                 ` <16ED6E30C7B1AB9D.18911@groups.io>
2022-05-09 12:12                   ` Yao, Jiewen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MW4PR11MB58723B3EA87A2F804122CD098CC69@MW4PR11MB5872.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox