From aaf463ca7beacff51cb723d087c7fdc826a30276 Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Mon, 13 Jan 2025 17:51:27 +0100 Subject: [PATCH] Bluetooth: make MBEDTLS_AES_ROM_TABLES implied not selected MBEDTLS_AES_ROM_TABLES let Mbed TLS use precomputed AES tables instead of generating them at runtime and placing in RAM. It clearly helps reducing the RAM footprint, but at the same time it increases the ROM one. In order to let the final user decide which kind of optimization they prefer, we change the "select" statement with "imply". Signed-off-by: Valerio Setti --- subsys/bluetooth/crypto/Kconfig | 2 +- subsys/bluetooth/host/Kconfig.gatt | 2 +- subsys/bluetooth/mesh/Kconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/subsys/bluetooth/crypto/Kconfig b/subsys/bluetooth/crypto/Kconfig index 5c1c2fb20fd..e5ab2117b3b 100644 --- a/subsys/bluetooth/crypto/Kconfig +++ b/subsys/bluetooth/crypto/Kconfig @@ -7,6 +7,6 @@ config BT_CRYPTO select MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM select PSA_WANT_KEY_TYPE_AES select PSA_WANT_ALG_CMAC - select MBEDTLS_AES_ROM_TABLES if MBEDTLS_PSA_CRYPTO_C + imply MBEDTLS_AES_ROM_TABLES if MBEDTLS_PSA_CRYPTO_C help This option enables the Bluetooth Cryptographic Toolbox. diff --git a/subsys/bluetooth/host/Kconfig.gatt b/subsys/bluetooth/host/Kconfig.gatt index 20f9e53833d..9e3dbd31a35 100644 --- a/subsys/bluetooth/host/Kconfig.gatt +++ b/subsys/bluetooth/host/Kconfig.gatt @@ -118,7 +118,7 @@ config BT_GATT_CACHING depends on PSA_CRYPTO_CLIENT select PSA_WANT_KEY_TYPE_AES select PSA_WANT_ALG_CMAC - select MBEDTLS_AES_ROM_TABLES if MBEDTLS_PSA_CRYPTO_C + imply MBEDTLS_AES_ROM_TABLES if MBEDTLS_PSA_CRYPTO_C help This option enables support for GATT Caching. When enabled the stack will register Client Supported Features and Database Hash diff --git a/subsys/bluetooth/mesh/Kconfig b/subsys/bluetooth/mesh/Kconfig index b7521689634..dffc410b0ff 100644 --- a/subsys/bluetooth/mesh/Kconfig +++ b/subsys/bluetooth/mesh/Kconfig @@ -1488,7 +1488,7 @@ config BT_MESH_USES_MBEDTLS_PSA select PSA_WANT_ALG_CMAC select PSA_WANT_ALG_ECB_NO_PADDING select PSA_WANT_KEY_TYPE_AES - select MBEDTLS_AES_ROM_TABLES + imply MBEDTLS_AES_ROM_TABLES select PSA_WANT_ALG_CCM select PSA_WANT_KEY_TYPE_HMAC select PSA_WANT_ALG_HMAC