On Tue, 16 Jul 2024 at 17:06, Philippe Reynes <[email protected]> wrote: > > Adds the support of key derivation using the scheme hkdf. > This scheme is defined in rfc5869. > > Signed-off-by: Philippe Reynes <[email protected]> > --- > include/u-boot/sha256.h | 8 ++++++++ > lib/sha256.c | 42 +++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 50 insertions(+)
Reviewed-by: Simon Glass <[email protected]> > > diff --git a/include/u-boot/sha256.h b/include/u-boot/sha256.h > index 7aa4c54d0d4..46d20bf9b79 100644 > --- a/include/u-boot/sha256.h > +++ b/include/u-boot/sha256.h > @@ -6,6 +6,9 @@ > #define SHA256_SUM_LEN 32 > #define SHA256_DER_LEN 19 > > +#define SHA256_HKDF_MAX_INFO_LEN 256 > +#define SHA256_HKDF_MAX_DATA_LEN (SHA256_HKDF_MAX_INFO_LEN + SHA256_SUM_LEN > + 1) long line? [..]

