Commit graph

4 commits

Author SHA1 Message Date
Philippe Reynes
12e841114d lib: mbedtls: sha256: add support of key derivation
Adds the support of key derivation using the scheme hkdf.
This scheme is defined in rfc5869.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
2025-01-18 17:12:47 -06:00
Philippe Reynes
e364a9148f lib: sha256: add feature sha256_hmac
Adds the support of the hmac based on sha256.
This implementation is based on rfc2104.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
2025-01-18 17:12:47 -06:00
Philippe Reynes
ccc5e16683 lib: sha256: move common function to sha256_common.c
The function sha256_csum_wd is defined in lib/sha256.c
and in lib/mbedtls/sha256.c. To avoid duplicating this
function (and future function), we move this function
to the file lib/sha256_common.c

Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2025-01-18 17:12:47 -06:00
Raymond Mao
bdc3f44a6b mbedtls: add digest shim layer for MbedTLS
Implement digest shim layer on top of MbedTLS crypto library.
Introduce <alg>_MBEDTLS kconfig for MbedTLS crypto implementations.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2024-10-14 17:58:31 -06:00