[PATCH 3/4] lib: sha256: add support of key derivation

Simon Glass sjg at chromium.org
Fri Sep 20 18:01:35 CEST 2024


On Tue, 16 Jul 2024 at 17:06, Philippe Reynes
<philippe.reynes at softathome.com> wrote:
>
> Adds the support of key derivation using the scheme hkdf.
> This scheme is defined in rfc5869.
>
> Signed-off-by: Philippe Reynes <philippe.reynes at softathome.com>
> ---
>  include/u-boot/sha256.h |  8 ++++++++
>  lib/sha256.c            | 42 +++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 50 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>

>
> 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?
[..]


More information about the U-Boot mailing list