[PATCH v6 0/9] add the support of sha256_hmac and sha256_hkdf

Philippe REYNES philippe.reynes at softathome.com
Thu Dec 19 13:21:40 CET 2024


Hi Raymond,


Le 18/12/2024 à 16:23, Raymond Mao a écrit :
>
> *This Mail comes from Outside of SoftAtHome: *Do not answer, click 
> links or open attachments unless you recognize the sender and know the 
> content is safe.**
>
> Hi Philippe,
>
> On Tue, 17 Dec 2024 at 16:36, Philippe Reynes 
> <philippe.reynes at softathome.com> wrote:
>
>     This serie adds the support of sha256_hmac and sha256_hkdf.
>     A first version was sent several months ago just before the
>     integration of mbedtls. This new version is based on mbedtls.
>
>     The first patch of this serie add the support of hkdf
>     using mbedtls.
>
>     v6:
>     - use const for test
>     - set buffer to 0 before using to to compute hmac
>
>     v5:
>     - use mbedtls to compute hmac
>     - add tests for hkdf
>     - enabled mbedtls in sandbox_defconfig
>     - some cleanup
>
>     v4:
>     - fix computation of the hmac
>     - add more test for hmac
>     - move sha256 common functions to sha256_common.c
>     - some cleanup
>
>     v3:
>     - also define sha256_hmac for legacy sha256
>     - add some #if to define function only when needed
>
>
> Can you add my review tag to the commit messages for those ones I 
> stated if there are no new changes?
> So that I can skip them in the next round.


Oh sorry, I missed to add this tag on my patches.

I add them and I send a v7.


>     Philippe Reynes (9):
>       tools: kwbimage.h: use linux/compiler_attributes.h
>       tools: renesas_spkgimage.h: use linux/compiler_attributes.h
>       mbedtls: enable support of hkdf
>       lib: sha256: move common function to sha256_common.c
>       lib: sha256: add feature sha256_hmac
>       test: lib: add test for sha256_hmac
>       lib: mbedtls: sha256: add support of key derivation
>       test: lib: add test for key derivation
>       configs: sandbox: enable mbedtls
>
>      configs/sandbox_defconfig        |   2 +
>      include/u-boot/sha256.h          |  24 +++
>      lib/Makefile                     |   1 +
>      lib/mbedtls/Kconfig              |  14 ++
>      lib/mbedtls/Makefile             |   2 +
>      lib/mbedtls/mbedtls_def_config.h |   4 +
>      lib/mbedtls/sha256.c             |  59 ++++---
>      lib/sha256.c                     |  67 ++++---
>      lib/sha256_common.c              |  50 ++++++
>      test/lib/Makefile                |   2 +
>      test/lib/test_sha256_hkdf.c      | 198 +++++++++++++++++++++
>      test/lib/test_sha256_hmac.c      | 294
>     +++++++++++++++++++++++++++++++
>      tools/Makefile                   |   1 +
>      tools/kwbimage.h                 |   6 +-
>      tools/renesas_spkgimage.h        |   6 +-
>      15 files changed, 670 insertions(+), 60 deletions(-)
>      create mode 100644 lib/sha256_common.c
>      create mode 100644 test/lib/test_sha256_hkdf.c
>      create mode 100644 test/lib/test_sha256_hmac.c
>
>     -- 
>     2.25.1
>
>
> Thanks and regards,
> Raymond



Regards,

Philippe



More information about the U-Boot mailing list