BLE: improved pairing security (#4240)

* ble: use unique root security keys for new pairings after pairing reset; added migrations for existing pairing data; unit_tests: added migration tests

* bt: lower logging level

* hal: bt: updated doxygen strings

* hal: ble: Added checks for root_keys ptr

* service: ble: bt_keys_storage minor cleanup
This commit is contained in:
hedger
2025-09-24 19:36:45 +01:00
committed by GitHub
parent 30077dd512
commit 0d5beedb01
11 changed files with 391 additions and 86 deletions

View File

@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,86.1,,
Version,+,87.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
Header,+,applications/services/cli/cli.h,,
@@ -703,6 +703,7 @@ Function,+,bt_forget_bonded_devices,void,Bt*
Function,+,bt_keys_storage_alloc,BtKeysStorage*,const char*
Function,+,bt_keys_storage_delete,_Bool,BtKeysStorage*
Function,+,bt_keys_storage_free,void,BtKeysStorage*
Function,+,bt_keys_storage_get_root_keys,const GapRootSecurityKeys*,BtKeysStorage*
Function,+,bt_keys_storage_is_changed,_Bool,BtKeysStorage*
Function,+,bt_keys_storage_load,_Bool,BtKeysStorage*
Function,+,bt_keys_storage_set_default_path,void,Bt*
@@ -1173,7 +1174,7 @@ Function,+,furi_hal_adc_convert_vref,float,"FuriHalAdcHandle*, uint16_t"
Function,+,furi_hal_adc_init,void,
Function,+,furi_hal_adc_read,uint16_t,"FuriHalAdcHandle*, FuriHalAdcChannel"
Function,+,furi_hal_adc_release,void,FuriHalAdcHandle*
Function,+,furi_hal_bt_change_app,FuriHalBleProfileBase*,"const FuriHalBleProfileTemplate*, FuriHalBleProfileParams, GapEventCallback, void*"
Function,+,furi_hal_bt_change_app,FuriHalBleProfileBase*,"const FuriHalBleProfileTemplate*, FuriHalBleProfileParams, const GapRootSecurityKeys*, GapEventCallback, void*"
Function,+,furi_hal_bt_check_profile_type,_Bool,"FuriHalBleProfileBase*, const FuriHalBleProfileTemplate*"
Function,+,furi_hal_bt_clear_white_list,_Bool,
Function,+,furi_hal_bt_dump_state,void,FuriString*
@@ -1200,7 +1201,7 @@ Function,+,furi_hal_bt_nvm_sram_sem_release,void,
Function,+,furi_hal_bt_reinit,void,
Function,+,furi_hal_bt_set_key_storage_change_callback,void,"BleGlueKeyStorageChangedCallback, void*"
Function,+,furi_hal_bt_start_advertising,void,
Function,+,furi_hal_bt_start_app,FuriHalBleProfileBase*,"const FuriHalBleProfileTemplate*, FuriHalBleProfileParams, GapEventCallback, void*"
Function,+,furi_hal_bt_start_app,FuriHalBleProfileBase*,"const FuriHalBleProfileTemplate*, FuriHalBleProfileParams, const GapRootSecurityKeys*, GapEventCallback, void*"
Function,+,furi_hal_bt_start_packet_rx,void,"uint8_t, uint8_t"
Function,+,furi_hal_bt_start_packet_tx,void,"uint8_t, uint8_t, uint8_t"
Function,+,furi_hal_bt_start_radio_stack,_Bool,
@@ -1740,7 +1741,7 @@ Function,-,gap_extra_beacon_set_data,_Bool,"const uint8_t*, uint8_t"
Function,-,gap_extra_beacon_start,_Bool,
Function,-,gap_extra_beacon_stop,_Bool,
Function,-,gap_get_state,GapState,
Function,-,gap_init,_Bool,"GapConfig*, GapEventCallback, void*"
Function,-,gap_init,_Bool,"GapConfig*, const GapRootSecurityKeys*, GapEventCallback, void*"
Function,-,gap_start_advertising,void,
Function,-,gap_stop_advertising,void,
Function,-,gap_thread_stop,void,
1 entry status name type params
2 Version + 86.1 87.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/bt/bt_service/bt_keys_storage.h
5 Header + applications/services/cli/cli.h
703 Function + bt_keys_storage_alloc BtKeysStorage* const char*
704 Function + bt_keys_storage_delete _Bool BtKeysStorage*
705 Function + bt_keys_storage_free void BtKeysStorage*
706 Function + bt_keys_storage_get_root_keys const GapRootSecurityKeys* BtKeysStorage*
707 Function + bt_keys_storage_is_changed _Bool BtKeysStorage*
708 Function + bt_keys_storage_load _Bool BtKeysStorage*
709 Function + bt_keys_storage_set_default_path void Bt*
1174 Function + furi_hal_adc_init void
1175 Function + furi_hal_adc_read uint16_t FuriHalAdcHandle*, FuriHalAdcChannel
1176 Function + furi_hal_adc_release void FuriHalAdcHandle*
1177 Function + furi_hal_bt_change_app FuriHalBleProfileBase* const FuriHalBleProfileTemplate*, FuriHalBleProfileParams, GapEventCallback, void* const FuriHalBleProfileTemplate*, FuriHalBleProfileParams, const GapRootSecurityKeys*, GapEventCallback, void*
1178 Function + furi_hal_bt_check_profile_type _Bool FuriHalBleProfileBase*, const FuriHalBleProfileTemplate*
1179 Function + furi_hal_bt_clear_white_list _Bool
1180 Function + furi_hal_bt_dump_state void FuriString*
1201 Function + furi_hal_bt_reinit void
1202 Function + furi_hal_bt_set_key_storage_change_callback void BleGlueKeyStorageChangedCallback, void*
1203 Function + furi_hal_bt_start_advertising void
1204 Function + furi_hal_bt_start_app FuriHalBleProfileBase* const FuriHalBleProfileTemplate*, FuriHalBleProfileParams, GapEventCallback, void* const FuriHalBleProfileTemplate*, FuriHalBleProfileParams, const GapRootSecurityKeys*, GapEventCallback, void*
1205 Function + furi_hal_bt_start_packet_rx void uint8_t, uint8_t
1206 Function + furi_hal_bt_start_packet_tx void uint8_t, uint8_t, uint8_t
1207 Function + furi_hal_bt_start_radio_stack _Bool
1741 Function - gap_extra_beacon_start _Bool
1742 Function - gap_extra_beacon_stop _Bool
1743 Function - gap_get_state GapState
1744 Function - gap_init _Bool GapConfig*, GapEventCallback, void* GapConfig*, const GapRootSecurityKeys*, GapEventCallback, void*
1745 Function - gap_start_advertising void
1746 Function - gap_stop_advertising void
1747 Function - gap_thread_stop void