From b57468b3d029cb123b7881cefc68290cdeb31d9d Mon Sep 17 00:00:00 2001 From: Manish V Badarkhe Date: Mon, 30 Dec 2024 14:31:38 +0000 Subject: [PATCH] feat(mbedtls): optimize SHA256 for reduced memory footprint Set MBEDTLS_SHA256_SMALLER as the default mbedTLS configuration to minimize memory usage, trading off some processing speed for a smaller footprint. Change-Id: Ibfa6e115a0ed94096b9acdd9e237f3fb5457071d Signed-off-by: Manish V Badarkhe --- include/drivers/auth/mbedtls/default_mbedtls_config.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/drivers/auth/mbedtls/default_mbedtls_config.h b/include/drivers/auth/mbedtls/default_mbedtls_config.h index fa5c6f6b5..23daf244b 100644 --- a/include/drivers/auth/mbedtls/default_mbedtls_config.h +++ b/include/drivers/auth/mbedtls/default_mbedtls_config.h @@ -152,3 +152,9 @@ * the warnings to more functions. */ #define MBEDTLS_CHECK_RETURN_WARNING + +/* + * Use an implementation of SHA-256 with a smaller memory footprint but reduced + * speed. + */ +#define MBEDTLS_SHA256_SMALLER