diff --git a/samples/bluetooth/bap_broadcast_assistant/prj.conf b/samples/bluetooth/bap_broadcast_assistant/prj.conf index 409683026cb..e39c4c3eef0 100644 --- a/samples/bluetooth/bap_broadcast_assistant/prj.conf +++ b/samples/bluetooth/bap_broadcast_assistant/prj.conf @@ -10,7 +10,7 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=191 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_EXT_ADV=y CONFIG_BT_PER_ADV_SYNC=y diff --git a/samples/bluetooth/bap_broadcast_sink/prj.conf b/samples/bluetooth/bap_broadcast_sink/prj.conf index 3e0b269e7cf..fe0d8787d76 100644 --- a/samples/bluetooth/bap_broadcast_sink/prj.conf +++ b/samples/bluetooth/bap_broadcast_sink/prj.conf @@ -26,4 +26,4 @@ CONFIG_BT_AUDIO_CODEC_CAP_MAX_DATA_SIZE=64 CONFIG_BT_DEVICE_NAME="Broadcast Audio Sink" -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/bap_unicast_client/boards/native_sim.conf b/samples/bluetooth/bap_unicast_client/boards/native_sim.conf index 3d06b9f321f..c951fcc8c33 100644 --- a/samples/bluetooth/bap_unicast_client/boards/native_sim.conf +++ b/samples/bluetooth/bap_unicast_client/boards/native_sim.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/bluetooth/bap_unicast_client/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf b/samples/bluetooth/bap_unicast_client/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf index f28300b84c5..50ba07e8522 100644 --- a/samples/bluetooth/bap_unicast_client/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/bap_unicast_client/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf @@ -10,4 +10,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/bap_unicast_client/boards/nrf5340bsim_nrf5340_cpuapp.conf b/samples/bluetooth/bap_unicast_client/boards/nrf5340bsim_nrf5340_cpuapp.conf index 7c6a3aecc26..ffb0e27ed64 100644 --- a/samples/bluetooth/bap_unicast_client/boards/nrf5340bsim_nrf5340_cpuapp.conf +++ b/samples/bluetooth/bap_unicast_client/boards/nrf5340bsim_nrf5340_cpuapp.conf @@ -7,4 +7,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/bap_unicast_client/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/bluetooth/bap_unicast_client/boards/nrf5340dk_nrf5340_cpuapp.conf index 76df8dba27a..e02323fb3f7 100644 --- a/samples/bluetooth/bap_unicast_client/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/bap_unicast_client/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -10,4 +10,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/bap_unicast_server/boards/native_sim.conf b/samples/bluetooth/bap_unicast_server/boards/native_sim.conf index 3d06b9f321f..c951fcc8c33 100644 --- a/samples/bluetooth/bap_unicast_server/boards/native_sim.conf +++ b/samples/bluetooth/bap_unicast_server/boards/native_sim.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/bluetooth/bap_unicast_server/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf b/samples/bluetooth/bap_unicast_server/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf index 7c6a3aecc26..ffb0e27ed64 100644 --- a/samples/bluetooth/bap_unicast_server/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/bap_unicast_server/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf @@ -7,4 +7,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/bap_unicast_server/boards/nrf5340bsim_nrf5340_cpuapp.conf b/samples/bluetooth/bap_unicast_server/boards/nrf5340bsim_nrf5340_cpuapp.conf index 7c6a3aecc26..ffb0e27ed64 100644 --- a/samples/bluetooth/bap_unicast_server/boards/nrf5340bsim_nrf5340_cpuapp.conf +++ b/samples/bluetooth/bap_unicast_server/boards/nrf5340bsim_nrf5340_cpuapp.conf @@ -7,4 +7,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/bap_unicast_server/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/bluetooth/bap_unicast_server/boards/nrf5340dk_nrf5340_cpuapp.conf index 76df8dba27a..e02323fb3f7 100644 --- a/samples/bluetooth/bap_unicast_server/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/bap_unicast_server/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -10,4 +10,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/cap_acceptor/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf b/samples/bluetooth/cap_acceptor/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf index 96dc0eb4e3b..f58eedb0453 100644 --- a/samples/bluetooth/cap_acceptor/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/cap_acceptor/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf @@ -3,4 +3,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/cap_acceptor/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/bluetooth/cap_acceptor/boards/nrf5340dk_nrf5340_cpuapp.conf index 96dc0eb4e3b..f58eedb0453 100644 --- a/samples/bluetooth/cap_acceptor/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/cap_acceptor/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -3,4 +3,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/cap_initiator/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf b/samples/bluetooth/cap_initiator/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf index 96dc0eb4e3b..f58eedb0453 100644 --- a/samples/bluetooth/cap_initiator/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/cap_initiator/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf @@ -3,4 +3,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/cap_initiator/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/bluetooth/cap_initiator/boards/nrf5340dk_nrf5340_cpuapp.conf index 96dc0eb4e3b..f58eedb0453 100644 --- a/samples/bluetooth/cap_initiator/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/cap_initiator/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -3,4 +3,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/samples/bluetooth/hap_ha/boards/native_sim.conf b/samples/bluetooth/hap_ha/boards/native_sim.conf index abce1c1111e..f6c82a5dfbb 100644 --- a/samples/bluetooth/hap_ha/boards/native_sim.conf +++ b/samples/bluetooth/hap_ha/boards/native_sim.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y # For LE-audio at 10ms intervals we need the tick counter to occur more frequently # than every 10 ms as each PDU for some reason takes 2 ticks to process. diff --git a/samples/bluetooth/hci_spi/prj.conf b/samples/bluetooth/hci_spi/prj.conf index 65ce21c799c..68c1cdb5a08 100644 --- a/samples/bluetooth/hci_spi/prj.conf +++ b/samples/bluetooth/hci_spi/prj.conf @@ -5,7 +5,7 @@ CONFIG_MAIN_STACK_SIZE=512 CONFIG_BT=y CONFIG_BT_HCI_RAW=y CONFIG_BT_MAX_CONN=16 -CONFIG_BT_TINYCRYPT_ECC=n +CONFIG_BT_SEND_ECC_EMULATION=n # Workaround: Unable to allocate command buffer when using K_NO_WAIT since # Host number of completed commands does not follow normal flow control. diff --git a/samples/bluetooth/hci_uart/prj.conf b/samples/bluetooth/hci_uart/prj.conf index bdc73dd68e2..036a9748910 100644 --- a/samples/bluetooth/hci_uart/prj.conf +++ b/samples/bluetooth/hci_uart/prj.conf @@ -13,7 +13,7 @@ CONFIG_BT_BUF_CMD_TX_SIZE=255 CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255 CONFIG_BT_CTLR_ASSERT_HANDLER=y CONFIG_BT_MAX_CONN=16 -CONFIG_BT_TINYCRYPT_ECC=n +CONFIG_BT_SEND_ECC_EMULATION=n CONFIG_BT_CTLR_DTM_HCI=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 diff --git a/samples/bluetooth/hci_uart_3wire/prj.conf b/samples/bluetooth/hci_uart_3wire/prj.conf index 02f16a24138..670bcec3234 100644 --- a/samples/bluetooth/hci_uart_3wire/prj.conf +++ b/samples/bluetooth/hci_uart_3wire/prj.conf @@ -12,7 +12,7 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_CMD_TX_SIZE=255 CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255 CONFIG_BT_MAX_CONN=16 -CONFIG_BT_TINYCRYPT_ECC=n +CONFIG_BT_SEND_ECC_EMULATION=n CONFIG_BT_CTLR_DTM_HCI=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 diff --git a/samples/bluetooth/peripheral_esp/prj.conf b/samples/bluetooth/peripheral_esp/prj.conf index 70f9b5d27e2..fd13ca2f3e4 100644 --- a/samples/bluetooth/peripheral_esp/prj.conf +++ b/samples/bluetooth/peripheral_esp/prj.conf @@ -1,7 +1,6 @@ CONFIG_BT=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_SMP=y -CONFIG_TINYCRYPT=y CONFIG_BT_DEVICE_NAME="ESP peripheral" CONFIG_BT_DIS=y CONFIG_BT_DIS_PNP=n diff --git a/samples/bluetooth/peripheral_sc_only/boards/tlsr9518adk80d.conf b/samples/bluetooth/peripheral_sc_only/boards/tlsr9518adk80d.conf index 04d0a95bd89..ce0a87933b7 100644 --- a/samples/bluetooth/peripheral_sc_only/boards/tlsr9518adk80d.conf +++ b/samples/bluetooth/peripheral_sc_only/boards/tlsr9518adk80d.conf @@ -1,4 +1,4 @@ # Copyright (c) 2022 Telink Semiconductor # SPDX-License-Identifier: Apache-2.0 -CONFIG_BT_TINYCRYPT_ECC=n +CONFIG_BT_SEND_ECC_EMULATION=n diff --git a/samples/bluetooth/peripheral_sc_only/prj.conf b/samples/bluetooth/peripheral_sc_only/prj.conf index c43abee996d..b8086b247fe 100644 --- a/samples/bluetooth/peripheral_sc_only/prj.conf +++ b/samples/bluetooth/peripheral_sc_only/prj.conf @@ -7,6 +7,6 @@ CONFIG_LOG=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_SMP=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_MAX_PAIRED=2 CONFIG_BT_DEVICE_NAME="SC only peripheral" diff --git a/samples/bluetooth/tmap_bmr/boards/native_posix.conf b/samples/bluetooth/tmap_bmr/boards/native_posix.conf index 3d06b9f321f..c951fcc8c33 100644 --- a/samples/bluetooth/tmap_bmr/boards/native_posix.conf +++ b/samples/bluetooth/tmap_bmr/boards/native_posix.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/bluetooth/tmap_bmr/boards/native_sim.conf b/samples/bluetooth/tmap_bmr/boards/native_sim.conf index e06b2999381..8927008819a 100644 --- a/samples/bluetooth/tmap_bmr/boards/native_sim.conf +++ b/samples/bluetooth/tmap_bmr/boards/native_sim.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/bluetooth/tmap_bms/boards/native_posix.conf b/samples/bluetooth/tmap_bms/boards/native_posix.conf index 3d06b9f321f..c951fcc8c33 100644 --- a/samples/bluetooth/tmap_bms/boards/native_posix.conf +++ b/samples/bluetooth/tmap_bms/boards/native_posix.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/bluetooth/tmap_bms/boards/native_sim.conf b/samples/bluetooth/tmap_bms/boards/native_sim.conf index e06b2999381..8927008819a 100644 --- a/samples/bluetooth/tmap_bms/boards/native_sim.conf +++ b/samples/bluetooth/tmap_bms/boards/native_sim.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/bluetooth/tmap_central/boards/native_posix.conf b/samples/bluetooth/tmap_central/boards/native_posix.conf index 3d06b9f321f..c951fcc8c33 100644 --- a/samples/bluetooth/tmap_central/boards/native_posix.conf +++ b/samples/bluetooth/tmap_central/boards/native_posix.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/bluetooth/tmap_central/boards/native_sim.conf b/samples/bluetooth/tmap_central/boards/native_sim.conf index e06b2999381..8927008819a 100644 --- a/samples/bluetooth/tmap_central/boards/native_sim.conf +++ b/samples/bluetooth/tmap_central/boards/native_sim.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/bluetooth/tmap_peripheral/boards/native_posix.conf b/samples/bluetooth/tmap_peripheral/boards/native_posix.conf index 3d06b9f321f..c951fcc8c33 100644 --- a/samples/bluetooth/tmap_peripheral/boards/native_posix.conf +++ b/samples/bluetooth/tmap_peripheral/boards/native_posix.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/bluetooth/tmap_peripheral/boards/native_sim.conf b/samples/bluetooth/tmap_peripheral/boards/native_sim.conf index e06b2999381..8927008819a 100644 --- a/samples/bluetooth/tmap_peripheral/boards/native_sim.conf +++ b/samples/bluetooth/tmap_peripheral/boards/native_sim.conf @@ -1,5 +1,5 @@ CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_LIBLC3=y CONFIG_FPU=y diff --git a/samples/boards/nordic/mesh/onoff-app/prj.conf b/samples/boards/nordic/mesh/onoff-app/prj.conf index e6f744fb95a..4c651644564 100644 --- a/samples/boards/nordic/mesh/onoff-app/prj.conf +++ b/samples/boards/nordic/mesh/onoff-app/prj.conf @@ -27,7 +27,7 @@ CONFIG_BT_CTLR_PRIVACY=n CONFIG_BT_PERIPHERAL=y CONFIG_BT=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_L2CAP_TX_BUF_COUNT=8 CONFIG_BT_MESH=y diff --git a/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/prj.conf b/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/prj.conf index f23b4dc2a30..b9ce470b9eb 100644 --- a/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/prj.conf +++ b/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/prj.conf @@ -22,7 +22,7 @@ CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_BT_PERIPHERAL=y CONFIG_BT=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_RX_STACK_SIZE=4096 CONFIG_BT_L2CAP_TX_BUF_COUNT=8 diff --git a/subsys/bluetooth/controller/hci/hci.c b/subsys/bluetooth/controller/hci/hci.c index 059b94d933d..b952092c885 100644 --- a/subsys/bluetooth/controller/hci/hci.c +++ b/subsys/bluetooth/controller/hci/hci.c @@ -1049,9 +1049,9 @@ static void read_supported_commands(struct net_buf *buf, struct net_buf **evt) rp->commands[41] |= BIT(1); #endif /* CONFIG_BT_CTLR_SYNC_TRANSFER_RECEIVER */ -#if defined(CONFIG_BT_HCI_RAW) && defined(CONFIG_BT_TINYCRYPT_ECC) +#if defined(CONFIG_BT_HCI_RAW) && defined(CONFIG_BT_SEND_ECC_EMULATION) bt_hci_ecc_supported_commands(rp->commands); -#endif /* CONFIG_BT_HCI_RAW && CONFIG_BT_TINYCRYPT_ECC */ +#endif /* CONFIG_BT_HCI_RAW && CONFIG_BT_SEND_ECC_EMULATION */ /* LE Read TX Power. */ rp->commands[38] |= BIT(7); diff --git a/subsys/bluetooth/host/CMakeLists.txt b/subsys/bluetooth/host/CMakeLists.txt index e3e461fb0c1..f92a1f1a7b9 100644 --- a/subsys/bluetooth/host/CMakeLists.txt +++ b/subsys/bluetooth/host/CMakeLists.txt @@ -8,7 +8,7 @@ add_subdirectory_ifdef(CONFIG_BT_SHELL shell) zephyr_library_sources_ifdef(CONFIG_BT_HCI_RAW hci_raw.c hci_common.c) zephyr_library_sources_ifdef(CONFIG_BT_MONITOR monitor.c) -zephyr_library_sources_ifdef(CONFIG_BT_TINYCRYPT_ECC hci_ecc.c) +zephyr_library_sources_ifdef(CONFIG_BT_SEND_ECC_EMULATION hci_ecc.c) zephyr_library_sources_ifdef(CONFIG_BT_SETTINGS settings.c) zephyr_library_sources_ifdef(CONFIG_BT_HOST_CCM aes_ccm.c) zephyr_library_sources_ifdef(CONFIG_BT_LONG_WQ long_wq.c) diff --git a/subsys/bluetooth/host/Kconfig b/subsys/bluetooth/host/Kconfig index 484e54cbae9..ee7e52ba64d 100644 --- a/subsys/bluetooth/host/Kconfig +++ b/subsys/bluetooth/host/Kconfig @@ -16,7 +16,7 @@ config BT_LONG_WQ_STACK_SIZE # requirements. int default 1300 if BT_GATT_CACHING - default 1140 if BT_TINYCRYPT_ECC + default 1140 if BT_SEND_ECC_EMULATION default 1024 config BT_LONG_WQ_PRIO @@ -999,15 +999,18 @@ config BT_ECC help This option adds support for ECDH HCI commands. -config BT_TINYCRYPT_ECC - bool "Emulate ECDH in the Host using TinyCrypt library" - select TINYCRYPT - select TINYCRYPT_ECC_DH +config BT_SEND_ECC_EMULATION + bool "Emulate ECDH in the Host using PSA Crypto API library" + select MBEDTLS if !BUILD_WITH_TFM + select MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM + select PSA_WANT_ALG_ECDH + select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE + select PSA_WANT_ECC_SECP_R1_256 select BT_LONG_WQ depends on BT_ECC && (BT_HCI_RAW || BT_HCI_HOST) default y if BT_CTLR && !BT_CTLR_ECDH help - If this option is set TinyCrypt library is used for emulating the + If this option is set PSA Crypto API library is used for emulating the ECDH HCI commands and events needed by e.g. LE Secure Connections. In builds including the BLE Host, if not set the controller crypto is used for ECDH and if the controller doesn't support the required HCI diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index b027ed40537..466707da1d1 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -3210,9 +3210,9 @@ static void read_supported_commands_complete(struct net_buf *buf) sizeof(bt_dev.supported_commands)); /* Report additional HCI commands used for ECDH as - * supported if TinyCrypt ECC is used for emulation. + * supported if PSA Crypto API ECC is used for emulation. */ - if (IS_ENABLED(CONFIG_BT_TINYCRYPT_ECC)) { + if (IS_ENABLED(CONFIG_BT_SEND_ECC_EMULATION)) { bt_hci_ecc_supported_commands(bt_dev.supported_commands); } } @@ -4055,7 +4055,7 @@ int bt_send(struct net_buf *buf) bt_monitor_send(bt_monitor_opcode(buf), buf->data, buf->len); - if (IS_ENABLED(CONFIG_BT_TINYCRYPT_ECC)) { + if (IS_ENABLED(CONFIG_BT_SEND_ECC_EMULATION)) { return bt_hci_ecc_send(buf); } diff --git a/subsys/bluetooth/host/hci_raw.c b/subsys/bluetooth/host/hci_raw.c index 0f0b93e99e6..037a301458f 100644 --- a/subsys/bluetooth/host/hci_raw.c +++ b/subsys/bluetooth/host/hci_raw.c @@ -296,7 +296,7 @@ int bt_send(struct net_buf *buf) } } - if (IS_ENABLED(CONFIG_BT_TINYCRYPT_ECC)) { + if (IS_ENABLED(CONFIG_BT_SEND_ECC_EMULATION)) { return bt_hci_ecc_send(buf); } diff --git a/tests/bluetooth/init/prj_10.conf b/tests/bluetooth/init/prj_10.conf index 6aca7357972..317857577d7 100644 --- a/tests/bluetooth/init/prj_10.conf +++ b/tests/bluetooth/init/prj_10.conf @@ -4,6 +4,6 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_ZTEST=y diff --git a/tests/bluetooth/init/prj_11.conf b/tests/bluetooth/init/prj_11.conf index 6b46c845df8..d0523c0fda2 100644 --- a/tests/bluetooth/init/prj_11.conf +++ b/tests/bluetooth/init/prj_11.conf @@ -4,7 +4,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y diff --git a/tests/bluetooth/init/prj_12.conf b/tests/bluetooth/init/prj_12.conf index 55111c5b288..2fb4de6e9b3 100644 --- a/tests/bluetooth/init/prj_12.conf +++ b/tests/bluetooth/init/prj_12.conf @@ -3,7 +3,7 @@ CONFIG_BT_PERIPHERAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y diff --git a/tests/bluetooth/init/prj_13.conf b/tests/bluetooth/init/prj_13.conf index 0de0be405ce..79b995a6b46 100644 --- a/tests/bluetooth/init/prj_13.conf +++ b/tests/bluetooth/init/prj_13.conf @@ -3,7 +3,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y diff --git a/tests/bluetooth/init/prj_14.conf b/tests/bluetooth/init/prj_14.conf index a25c48d4bbb..d030c856e26 100644 --- a/tests/bluetooth/init/prj_14.conf +++ b/tests/bluetooth/init/prj_14.conf @@ -3,5 +3,5 @@ CONFIG_BT_PERIPHERAL=y CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_ZTEST=y diff --git a/tests/bluetooth/init/prj_15.conf b/tests/bluetooth/init/prj_15.conf index 3839272ce11..296cfb0dbe3 100644 --- a/tests/bluetooth/init/prj_15.conf +++ b/tests/bluetooth/init/prj_15.conf @@ -3,5 +3,5 @@ CONFIG_BT_PERIPHERAL=y CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_ZTEST=y diff --git a/tests/bluetooth/init/prj_17.conf b/tests/bluetooth/init/prj_17.conf index 4ee00dca586..7cd0ea16996 100644 --- a/tests/bluetooth/init/prj_17.conf +++ b/tests/bluetooth/init/prj_17.conf @@ -4,7 +4,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y diff --git a/tests/bluetooth/init/prj_20.conf b/tests/bluetooth/init/prj_20.conf index 43022222067..6df91453eb6 100644 --- a/tests/bluetooth/init/prj_20.conf +++ b/tests/bluetooth/init/prj_20.conf @@ -4,7 +4,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y diff --git a/tests/bluetooth/init/prj_21.conf b/tests/bluetooth/init/prj_21.conf index 2c0fad1fa13..c930cc02c74 100644 --- a/tests/bluetooth/init/prj_21.conf +++ b/tests/bluetooth/init/prj_21.conf @@ -4,7 +4,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y diff --git a/tests/bluetooth/init/prj_9.conf b/tests/bluetooth/init/prj_9.conf index be22972e42d..5e07e0f9479 100644 --- a/tests/bluetooth/init/prj_9.conf +++ b/tests/bluetooth/init/prj_9.conf @@ -4,5 +4,5 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_ZTEST=y diff --git a/tests/bluetooth/init/prj_ctlr.conf b/tests/bluetooth/init/prj_ctlr.conf index 3b5ba787a0f..2c437948782 100644 --- a/tests/bluetooth/init/prj_ctlr.conf +++ b/tests/bluetooth/init/prj_ctlr.conf @@ -7,7 +7,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y CONFIG_BT_CLASSIC=n diff --git a/tests/bluetooth/init/prj_ctlr_5_x_dbg.conf b/tests/bluetooth/init/prj_ctlr_5_x_dbg.conf index 920a9f08860..b244d14dd03 100644 --- a/tests/bluetooth/init/prj_ctlr_5_x_dbg.conf +++ b/tests/bluetooth/init/prj_ctlr_5_x_dbg.conf @@ -59,7 +59,7 @@ CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y diff --git a/tests/bluetooth/init/prj_ctlr_dbg.conf b/tests/bluetooth/init/prj_ctlr_dbg.conf index 386e81a33f9..19dda6f9b82 100644 --- a/tests/bluetooth/init/prj_ctlr_dbg.conf +++ b/tests/bluetooth/init/prj_ctlr_dbg.conf @@ -42,7 +42,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y diff --git a/tests/bluetooth/init/prj_ctlr_ticker.conf b/tests/bluetooth/init/prj_ctlr_ticker.conf index 47c4f3f7062..d2b4d31692e 100644 --- a/tests/bluetooth/init/prj_ctlr_ticker.conf +++ b/tests/bluetooth/init/prj_ctlr_ticker.conf @@ -42,7 +42,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_USE_DEBUG_KEYS=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y diff --git a/tests/bluetooth/init/prj_ctlr_tiny.conf b/tests/bluetooth/init/prj_ctlr_tiny.conf index a9dcf2327e0..7cffa215307 100644 --- a/tests/bluetooth/init/prj_ctlr_tiny.conf +++ b/tests/bluetooth/init/prj_ctlr_tiny.conf @@ -35,7 +35,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y CONFIG_BT_CLASSIC=n diff --git a/tests/bluetooth/init/prj_llcp.conf b/tests/bluetooth/init/prj_llcp.conf index 05eb2197c1d..33dc3aff1a1 100644 --- a/tests/bluetooth/init/prj_llcp.conf +++ b/tests/bluetooth/init/prj_llcp.conf @@ -7,7 +7,7 @@ CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_SMP_SC_ONLY=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_GATT_CLIENT=y CONFIG_BT_CLASSIC=n diff --git a/tests/bluetooth/shell/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf b/tests/bluetooth/shell/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf index 68e0a8a7e50..4658bfcca48 100644 --- a/tests/bluetooth/shell/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf +++ b/tests/bluetooth/shell/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf @@ -9,4 +9,4 @@ CONFIG_USB_DEVICE_AUDIO=y CONFIG_USB_DEVICE_PRODUCT="Zephyr Shell USB" # Enable encryption in the host -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/tests/bluetooth/shell/boards/nrf5340dk_nrf5340_cpuapp.conf b/tests/bluetooth/shell/boards/nrf5340dk_nrf5340_cpuapp.conf index 68e0a8a7e50..4658bfcca48 100644 --- a/tests/bluetooth/shell/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/tests/bluetooth/shell/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -9,4 +9,4 @@ CONFIG_USB_DEVICE_AUDIO=y CONFIG_USB_DEVICE_PRODUCT="Zephyr Shell USB" # Enable encryption in the host -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/tests/bluetooth/tester/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf b/tests/bluetooth/tester/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf index 6f723ffa160..b55471d8b62 100644 --- a/tests/bluetooth/tester/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf +++ b/tests/bluetooth/tester/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf @@ -22,4 +22,4 @@ CONFIG_BTTESTER_LOG_LEVEL_DBG=y CONFIG_UART_INTERRUPT_DRIVEN=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/tests/bluetooth/tester/boards/nrf5340dk_nrf5340_cpuapp.conf b/tests/bluetooth/tester/boards/nrf5340dk_nrf5340_cpuapp.conf index 6f723ffa160..b55471d8b62 100644 --- a/tests/bluetooth/tester/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/tests/bluetooth/tester/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -22,4 +22,4 @@ CONFIG_BTTESTER_LOG_LEVEL_DBG=y CONFIG_UART_INTERRUPT_DRIVEN=y -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y diff --git a/tests/bsim/bluetooth/audio/prj.conf b/tests/bsim/bluetooth/audio/prj.conf index 16d251e7e8b..8c88146875a 100644 --- a/tests/bsim/bluetooth/audio/prj.conf +++ b/tests/bsim/bluetooth/audio/prj.conf @@ -29,7 +29,7 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_EVT_RX_SIZE=255 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y CONFIG_BT_AUDIO=y CONFIG_BT_BAP_UNICAST_SERVER=y diff --git a/tests/bsim/bluetooth/audio_samples/bap_unicast_client/boards/nrf5340bsim_nrf5340_cpuapp.conf b/tests/bsim/bluetooth/audio_samples/bap_unicast_client/boards/nrf5340bsim_nrf5340_cpuapp.conf index f1624acbc19..6bf3108da1b 100644 --- a/tests/bsim/bluetooth/audio_samples/bap_unicast_client/boards/nrf5340bsim_nrf5340_cpuapp.conf +++ b/tests/bsim/bluetooth/audio_samples/bap_unicast_client/boards/nrf5340bsim_nrf5340_cpuapp.conf @@ -9,4 +9,4 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_TINYCRYPT_ECC=y +CONFIG_BT_SEND_ECC_EMULATION=y