Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-19 Thread Ilias Apalodimas
Hi Heinrich, On Wed, Jan 19, 2022 at 03:22:53PM +0100, Heinrich Schuchardt wrote: > On 1/18/22 19:12, Ilias Apalodimas wrote: > > Hi Heinrich, > > > > On Tue, 18 Jan 2022 at 18:22, Heinrich Schuchardt > > wrote: > > > > > > On 1/18/22 15:03, Ilias Apalodimas wrote: > > > > Hi Heinrich, > > >

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-19 Thread Heinrich Schuchardt
On 1/18/22 19:12, Ilias Apalodimas wrote: Hi Heinrich, On Tue, 18 Jan 2022 at 18:22, Heinrich Schuchardt wrote: On 1/18/22 15:03, Ilias Apalodimas wrote: Hi Heinrich, - info.checksum = image_get_checksum_algo("sha256,rsa2048"); [...] - info.name = "sha256,rsa2048"; - }

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-19 Thread Ilias Apalodimas
\> > > > No that's not doable. Things like EFI_TCG2 protocol needs that since > > we use a sha1 in the tcg eventlog. > > I simply wonder why you can trust SHA1 in PCR/event log while you don't > trust it in secure boot. You don't trust the PCRs in the eventlog. The eventlog is a human readable f

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-19 Thread AKASHI Takahiro
On Wed, Jan 19, 2022 at 09:07:04AM +0200, Ilias Apalodimas wrote: > Hi Akashi-san, > > > On Wed, 19 Jan 2022 at 06:47, AKASHI Takahiro > wrote: > > > > On Tue, Jan 18, 2022 at 08:12:22PM +0200, Ilias Apalodimas wrote: > > > Hi Heinrich, > > > > > > On Tue, 18 Jan 2022 at 18:22, Heinrich Schuchar

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-18 Thread Ilias Apalodimas
Hi Akashi-san, On Wed, 19 Jan 2022 at 06:47, AKASHI Takahiro wrote: > > On Tue, Jan 18, 2022 at 08:12:22PM +0200, Ilias Apalodimas wrote: > > Hi Heinrich, > > > > On Tue, 18 Jan 2022 at 18:22, Heinrich Schuchardt > > wrote: > > > > > > On 1/18/22 15:03, Ilias Apalodimas wrote: > > > > Hi Heinr

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-18 Thread AKASHI Takahiro
On Tue, Jan 18, 2022 at 08:12:22PM +0200, Ilias Apalodimas wrote: > Hi Heinrich, > > On Tue, 18 Jan 2022 at 18:22, Heinrich Schuchardt wrote: > > > > On 1/18/22 15:03, Ilias Apalodimas wrote: > > > Hi Heinrich, > > > > > > - info.checksum = image_get_checksum_algo("sha256,rsa2048"); >

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-18 Thread Ilias Apalodimas
Hi Heinrich, On Tue, 18 Jan 2022 at 18:22, Heinrich Schuchardt wrote: > > On 1/18/22 15:03, Ilias Apalodimas wrote: > > Hi Heinrich, > > > > - info.checksum = image_get_checksum_algo("sha256,rsa2048"); > > > > [...] > > > > - info.name = "sha256,rsa2048"; > > - } else

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-18 Thread Heinrich Schuchardt
On 1/18/22 15:03, Ilias Apalodimas wrote: Hi Heinrich, - info.checksum = image_get_checksum_algo("sha256,rsa2048"); [...] - info.name = "sha256,rsa2048"; - } else { - pr_warn("unknown msg digest algo: %s\n", sig->hash_algo); + if (strcmp

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-18 Thread Ilias Apalodimas
Hi Heinrich, > > > > - info.checksum = > > > > image_get_checksum_algo("sha256,rsa2048"); [...] > > > > - info.name = "sha256,rsa2048"; > > > > - } else { > > > > - pr_warn("unknown msg digest algo: %s\n", > > > > sig->hash_algo); > > > > +

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-18 Thread Heinrich Schuchardt
On 1/18/22 13:50, Ilias Apalodimas wrote: Akashi-san, On Tue, Jan 18, 2022 at 09:38:22PM +0900, AKASHI Takahiro wrote: Hi Ilias, On Tue, Jan 18, 2022 at 01:12:37PM +0200, Ilias Apalodimas wrote: Right now the code explicitly limits us to sha1,256 hashes with RSA2048 encryption. But the limit

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-18 Thread Ilias Apalodimas
Akashi-san, On Tue, Jan 18, 2022 at 09:38:22PM +0900, AKASHI Takahiro wrote: > Hi Ilias, > > On Tue, Jan 18, 2022 at 01:12:37PM +0200, Ilias Apalodimas wrote: > > Right now the code explicitly limits us to sha1,256 hashes with RSA2048 > > encryption. But the limitation is artificial since U-Boot

Re: [PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-18 Thread AKASHI Takahiro
Hi Ilias, On Tue, Jan 18, 2022 at 01:12:37PM +0200, Ilias Apalodimas wrote: > Right now the code explicitly limits us to sha1,256 hashes with RSA2048 > encryption. But the limitation is artificial since U-Boot supports > a wider range of algorithms. > > The internal image_get_[checksum|crypto]_a

[PATCH] lib/crypto: Enable more algorithms in cert verification

2022-01-18 Thread Ilias Apalodimas
Right now the code explicitly limits us to sha1,256 hashes with RSA2048 encryption. But the limitation is artificial since U-Boot supports a wider range of algorithms. The internal image_get_[checksum|crypto]_algo() functions expect an argument in the format of ,. So let's remove the size checki