mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-24 05:34:45 -07:00
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:
@@ -6,6 +6,7 @@
|
||||
#include <furi_hal_version.h>
|
||||
|
||||
#define GAP_MAC_ADDR_SIZE (6)
|
||||
#define GAP_KEY_SIZE (0x10)
|
||||
|
||||
/*
|
||||
* GAP helpers - background thread that handles BLE GAP events and advertising.
|
||||
@@ -83,7 +84,18 @@ typedef struct {
|
||||
GapConnectionParamsRequest conn_param;
|
||||
} GapConfig;
|
||||
|
||||
bool gap_init(GapConfig* config, GapEventCallback on_event_cb, void* context);
|
||||
typedef struct {
|
||||
// Encryption Root key. Must be unique per-device (or app)
|
||||
uint8_t erk[GAP_KEY_SIZE];
|
||||
// Identity Root key. Used for resolving RPAs, if configured
|
||||
uint8_t irk[GAP_KEY_SIZE];
|
||||
} GapRootSecurityKeys;
|
||||
|
||||
bool gap_init(
|
||||
GapConfig* config,
|
||||
const GapRootSecurityKeys* root_keys,
|
||||
GapEventCallback on_event_cb,
|
||||
void* context);
|
||||
|
||||
void gap_start_advertising(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user