Define "light" subset of MD

See docs/architecture/psa-migration/md-cipher-dispatch.md

Regarding testing, the no_md component was never very useful, as that's
not something people are likely to want to do: it was mostly useful as
executable documentation of what depends on MD. It's going to be even
less useful when more and more modules auto-enable MD_LIGHT or even
MD_C. So, recycle it to test the build with only MD_LIGHT, which is
something that might happen in practice, and is necessary to ensure that
the division is consistent.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2023-02-16 19:07:31 +01:00
parent ba2412fd21
commit b9b630d628
6 changed files with 101 additions and 22 deletions

View file

@ -2643,7 +2643,7 @@
/**
* \def MBEDTLS_MD_C
*
* Enable the generic message digest layer.
* Enable the generic layer for message digest (hashing) and HMAC.
*
* Requires: one of: MBEDTLS_MD5_C, MBEDTLS_RIPEMD160_C, MBEDTLS_SHA1_C,
* MBEDTLS_SHA224_C, MBEDTLS_SHA256_C, MBEDTLS_SHA384_C,
@ -2672,6 +2672,25 @@
*/
#define MBEDTLS_MD_C
/**
* \def MBEDTLS_MD_LIGHT
*
* Enable the "light" subset of MBEDTLS_MD_C: just hashing and basic
* meta-data.
*
* This is automatically enabled whenever MBEDTLS_MD_C is enabled, but it is
* possible to enable this with MBEDTLS_MD_C if support for HMAC or extra
* metadata functions is not needed.
*
* Requires: one of: MBEDTLS_MD5_C, MBEDTLS_RIPEMD160_C, MBEDTLS_SHA1_C,
* MBEDTLS_SHA224_C, MBEDTLS_SHA256_C, MBEDTLS_SHA384_C,
* MBEDTLS_SHA512_C.
* Module: library/md.c
*
* Uncomment to enabled the "light" subsect of MD.
*/
#define MBEDTLS_MD_LIGHT
/**
* \def MBEDTLS_MD5_C
*