Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-05-21 Thread Ilias Apalodimas
top posting but if it makes your life easier this would probably work on top of your patch (compile tested only). We ofc need to make proper patches and merge this first, but it will probably help you understand what's wrong with the current code diff --git a/include/tpm-v2.h b/include/tpm-v2.h

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-05-21 Thread Ilias Apalodimas
Hi Tim, > > > > > > > > > > > > > > > > > > > > -const enum tpm2_algorithms tpm2_supported_algorithms[4] = { > > > > > > > > > > - TPM2_ALG_SHA1, > > > > > > > > > > - , > > > > > > > > > > - TPM2_ALG_SHA384, > > > > > > > > > > - TPM2_ALG_SHA512, > > > > > > > > > > -}; >

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-05-21 Thread Ilias Apalodimas
On Tue, 21 May 2024 at 13:17, Ilias Apalodimas wrote: > > Hi Tim, > > Apologies for the late reply. I was attending a conference. > > > On Thu, 16 May 2024 at 03:28, Tim Harvey wrote: > > > > On Fri, Apr 19, 2024 at 1:04 PM Ilias Apalodimas > > wrote: > > > > > > On Fri, 19 Apr 2024 at 20:52,

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-05-21 Thread Ilias Apalodimas
Hi Tim, Apologies for the late reply. I was attending a conference. On Thu, 16 May 2024 at 03:28, Tim Harvey wrote: > > On Fri, Apr 19, 2024 at 1:04 PM Ilias Apalodimas > wrote: > > > > On Fri, 19 Apr 2024 at 20:52, Tim Harvey wrote: > > > > > > On Fri, Apr 19, 2024 at 10:37 AM Ilias

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-05-15 Thread Tim Harvey
On Fri, Apr 19, 2024 at 1:04 PM Ilias Apalodimas wrote: > > On Fri, 19 Apr 2024 at 20:52, Tim Harvey wrote: > > > > On Fri, Apr 19, 2024 at 10:37 AM Ilias Apalodimas > > wrote: > > > > > > Also quickly looking at this, you need a new function for > > > tpm2_algorithm_to_mask() (look below) > >

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-19 Thread Ilias Apalodimas
On Fri, 19 Apr 2024 at 20:52, Tim Harvey wrote: > > On Fri, Apr 19, 2024 at 10:37 AM Ilias Apalodimas > wrote: > > > > Also quickly looking at this, you need a new function for > > tpm2_algorithm_to_mask() (look below) > > > > On Fri, 19 Apr 2024 at 20:20, Ilias Apalodimas > > wrote: > > > > >

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-19 Thread Tim Harvey
On Fri, Apr 19, 2024 at 10:37 AM Ilias Apalodimas wrote: > > Also quickly looking at this, you need a new function for > tpm2_algorithm_to_mask() (look below) > > On Fri, 19 Apr 2024 at 20:20, Ilias Apalodimas > wrote: > > > > Hi Tim, > > > > On Fri, 19 Apr 2024 at 20:13, Tim Harvey wrote: > >

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-19 Thread Ilias Apalodimas
Also quickly looking at this, you need a new function for tpm2_algorithm_to_mask() (look below) On Fri, 19 Apr 2024 at 20:20, Ilias Apalodimas wrote: > > Hi Tim, > > On Fri, 19 Apr 2024 at 20:13, Tim Harvey wrote: > > > > On Sat, Apr 6, 2024 at 9:33 AM Ilias Apalodimas > > wrote: > > > > > >

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-19 Thread Ilias Apalodimas
Hi Tim, On Fri, 19 Apr 2024 at 20:13, Tim Harvey wrote: > > On Sat, Apr 6, 2024 at 9:33 AM Ilias Apalodimas > wrote: > > > > Hi Tim, > > > > Thanks for the patch > > > > I'll be away next week, I'll try to find time and take a closer look. > > The pipeline [0] shows some TPM related failures >

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-19 Thread Tim Harvey
On Sat, Apr 6, 2024 at 9:33 AM Ilias Apalodimas wrote: > > Hi Tim, > > Thanks for the patch > > I'll be away next week, I'll try to find time and take a closer look. > The pipeline [0] shows some TPM related failures > > [0] >

Re: [PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-06 Thread Ilias Apalodimas
Hi Tim, Thanks for the patch I'll be away next week, I'll try to find time and take a closer look. The pipeline [0] shows some TPM related failures [0] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/commit/9b4be64e41454e17269a968397933eeff300c380 Cheers /Ilias On Fri, 5 Apr 2024 at

[PATCH v3] tpm-v2: allow algoirthm name to be configured for pcr_read and pcr_extend

2024-04-04 Thread Tim Harvey
For pcr_read and pcr_extend commands allow the digest algorithm to be specified by an additional argument. If not specified it will default to SHA256 for backwards compatibility. A follow-on to this could be to extend all PCR banks with the detected algo when the argument is 'auto'.