From c1fe14717492cf4bd1610c1f637fba69ca88e50c Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Thu, 28 Nov 2024 10:08:16 +0100 Subject: [PATCH] Bluetooth: Host: use P256-M in ECC emulation When BT_SEND_ECC_EMULATION and the platform uses Mbed TLS as PSA Crypto provider, we select the Cortex-M software optimized implementation of the secp256r1 curve algorithms. This is much faster than the standard support provided by Mbed TLS and it also reduces ROM footprint. Signed-off-by: Valerio Setti --- subsys/bluetooth/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/subsys/bluetooth/host/Kconfig b/subsys/bluetooth/host/Kconfig index ee7e52ba64d73f..56923d7819a9bc 100644 --- a/subsys/bluetooth/host/Kconfig +++ b/subsys/bluetooth/host/Kconfig @@ -1006,6 +1006,7 @@ config BT_SEND_ECC_EMULATION select PSA_WANT_ALG_ECDH select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE select PSA_WANT_ECC_SECP_R1_256 + select MBEDTLS_PSA_P256M_DRIVER_ENABLED if MBEDTLS_PSA_CRYPTO_C select BT_LONG_WQ depends on BT_ECC && (BT_HCI_RAW || BT_HCI_HOST) default y if BT_CTLR && !BT_CTLR_ECDH