/Zephyr-Core-3.4.0/subsys/bluetooth/common/ |
D | rpa.c | 56 static int ah(const uint8_t irk[16], const uint8_t r[3], uint8_t out[3]) in ah() 61 LOG_DBG("irk %s", bt_hex(irk, 16)); in ah() 68 err = internal_encrypt_le(irk, res, res); in ah() 85 bool bt_rpa_irk_matches(const uint8_t irk[16], const bt_addr_t *addr) in bt_rpa_irk_matches() 90 LOG_DBG("IRK %s bdaddr %s", bt_hex(irk, 16), bt_addr_str(addr)); in bt_rpa_irk_matches() 92 err = ah(irk, addr->val + 3, hash); in bt_rpa_irk_matches() 102 int bt_rpa_create(const uint8_t irk[16], bt_addr_t *rpa) in bt_rpa_create() 113 err = ah(irk, rpa->val + 3, rpa->val); in bt_rpa_create() 123 int bt_rpa_create(const uint8_t irk[16], bt_addr_t *rpa) in bt_rpa_create()
|
D | rpa.h | 15 bool bt_rpa_irk_matches(const uint8_t irk[16], const bt_addr_t *addr); 16 int bt_rpa_create(const uint8_t irk[16], bt_addr_t *rpa);
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/bt_setup_public_id_addr/src/ |
D | test_suite_bt_privacy_enabled.c | 88 expect_single_call_bt_rand(&bt_dev.irk[BT_ID_DEFAULT], 16); in ZTEST() 120 expect_single_call_bt_rand(&bt_dev.irk[BT_ID_DEFAULT], 16); in ZTEST() 125 static int bt_smp_irk_get_fill_zero_irk_custom_fake(uint8_t *ir, uint8_t *irk) in bt_smp_irk_get_fill_zero_irk_custom_fake() argument 128 __ASSERT_NO_MSG(irk != NULL); in bt_smp_irk_get_fill_zero_irk_custom_fake() 130 memset(irk, 0x00, 16); in bt_smp_irk_get_fill_zero_irk_custom_fake() 162 expect_single_call_bt_rand(&bt_dev.irk[BT_ID_DEFAULT], 16); in ZTEST() 167 static int bt_smp_irk_get_non_zero_irk_custom_fake(uint8_t *ir, uint8_t *irk) in bt_smp_irk_get_non_zero_irk_custom_fake() argument 170 __ASSERT_NO_MSG(irk != NULL); in bt_smp_irk_get_non_zero_irk_custom_fake() 172 memcpy(irk, testing_irk_value, 16); in bt_smp_irk_get_non_zero_irk_custom_fake() 206 zassert_mem_equal(&bt_dev.irk[BT_ID_DEFAULT], testing_irk_value, sizeof(testing_irk_value), in ZTEST()
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/bt_setup_random_id_addr/src/ |
D | test_suite_bt_privacy_enabled.c | 102 expect_single_call_bt_rand(&bt_dev.irk[0], 16); in ZTEST() 144 expect_single_call_bt_rand(&bt_dev.irk[0], 16); in ZTEST() 149 static int bt_smp_irk_get_fill_zero_irk_custom_fake(uint8_t *ir, uint8_t *irk) in bt_smp_irk_get_fill_zero_irk_custom_fake() argument 152 __ASSERT_NO_MSG(irk != NULL); in bt_smp_irk_get_fill_zero_irk_custom_fake() 154 memset(irk, 0x00, 16); in bt_smp_irk_get_fill_zero_irk_custom_fake() 196 expect_single_call_bt_rand(&bt_dev.irk[0], 16); in ZTEST() 201 static int bt_smp_irk_get_non_zero_irk_custom_fake(uint8_t *ir, uint8_t *irk) in bt_smp_irk_get_non_zero_irk_custom_fake() argument 204 __ASSERT_NO_MSG(irk != NULL); in bt_smp_irk_get_non_zero_irk_custom_fake() 206 memcpy(irk, testing_irk_value, 16); in bt_smp_irk_get_non_zero_irk_custom_fake() 250 zassert_mem_equal(&bt_dev.irk[0], testing_irk_value, sizeof(testing_irk_value), in ZTEST()
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/bt_id_create/src/ |
D | test_suite_privacy_enabled.c | 71 expect_single_call_bt_rand(&bt_dev.irk[new_id], 16); in ZTEST() 78 zassert_mem_equal(&bt_dev.irk[new_id], testing_irk_value, sizeof(testing_irk_value), in ZTEST() 113 expect_single_call_bt_rand(&bt_dev.irk[new_id], 16); in ZTEST() 120 zassert_mem_equal(&bt_dev.irk[new_id], testing_irk_value, sizeof(testing_irk_value), in ZTEST() 162 zassert_mem_equal(&bt_dev.irk[new_id], testing_irk_value, sizeof(testing_irk_value), in ZTEST()
|
/Zephyr-Core-3.4.0/subsys/bluetooth/host/ |
D | settings.c | 206 len = read_cb(cb_arg, bt_dev.irk, sizeof(bt_dev.irk)); in set_setting() 207 if (len < sizeof(bt_dev.irk[0])) { in set_setting() 213 (void)memset(bt_dev.irk, 0, sizeof(bt_dev.irk)); in set_setting() 218 count = len / sizeof(bt_dev.irk[0]); in set_setting() 220 LOG_DBG("IRK[%d] %s", i, bt_hex(bt_dev.irk[i], 16)); in set_setting() 244 err = settings_save_one("bt/irk", bt_dev.irk, ID_DATA_LEN(bt_dev.irk)); in save_id()
|
D | id.c | 303 err = bt_rpa_create(bt_dev.irk[id], &rpa); in bt_id_set_private_addr() 367 err = bt_rpa_create(bt_dev.irk[adv->id], &bt_dev.rpa[adv->id]); in bt_id_set_adv_private_addr() 808 (void)memcpy(cp->local_irk, &bt_dev.irk[id], 16); in hci_id_add() 884 irk_conflict = (!bt_irk_eq(&conflict->candidate->irk, &(struct bt_irk){}) && in find_rl_conflict() 885 bt_irk_eq(&conflict->candidate->irk, &resident->irk)); in find_rl_conflict() 986 err = hci_id_add(keys->id, &keys->addr, keys->irk.val); in bt_id_add() 1030 hci_id_add(keys->id, &keys->addr, keys->irk.val); in keys_add_id() 1181 static int id_create(uint8_t id, bt_addr_le_t *addr, uint8_t *irk) in id_create() argument 1209 if (irk && memcmp(irk, zero_irk, 16)) { in id_create() 1210 memcpy(&bt_dev.irk[id], irk, 16); in id_create() [all …]
|
D | smp.h | 98 uint8_t irk[16]; member 180 int bt_smp_irk_get(uint8_t *ir, uint8_t *irk);
|
D | keys.c | 247 bt_addr_eq(&addr->a, &key_pool[i].irk.rpa)) { in bt_keys_find_irk() 248 LOG_DBG("cached RPA %s for %s", bt_addr_str(&key_pool[i].irk.rpa), in bt_keys_find_irk() 263 if (bt_rpa_irk_matches(key_pool[i].irk.val, &addr->a)) { in bt_keys_find_irk() 264 LOG_DBG("RPA %s matches %s", bt_addr_str(&key_pool[i].irk.rpa), in bt_keys_find_irk() 267 bt_addr_copy(&key_pool[i].irk.rpa, &addr->a); in bt_keys_find_irk()
|
D | keys.h | 69 struct bt_irk irk; member
|
D | hci_core.h | 382 uint8_t irk[CONFIG_BT_ID_MAX][16]; member
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/mocks/ |
D | rpa_expects.c | 12 void expect_single_call_bt_rpa_create(const uint8_t irk[16]) in expect_single_call_bt_rpa_create() 18 zassert_equal(bt_rpa_create_fake.arg0_val, irk, in expect_single_call_bt_rpa_create()
|
D | rpa_expects.h | 15 void expect_single_call_bt_rpa_create(const uint8_t irk[16]);
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/keys/bt_keys_find_irk/src/ |
D | main.c | 63 static bool bt_rpa_irk_matches_unreachable_custom_fake(const uint8_t irk[16], const bt_addr_t *addr) in bt_rpa_irk_matches_unreachable_custom_fake() 69 static bool bt_rpa_irk_matches_custom_fake(const uint8_t irk[16], const bt_addr_t *addr) in bt_rpa_irk_matches_custom_fake() 71 if (irk[0] != (params_it) && bt_addr_eq(¤t_params_vector->addr->a, addr)) { in bt_rpa_irk_matches_custom_fake() 128 returned_keys_refs[it]->irk.val[0] = it; in rpa_resolving_ts_setup() 220 zassert_mem_equal(&returned_ref->irk.rpa, &addr->a, sizeof(bt_addr_t), in ZTEST() 245 returned_keys_refs[it]->irk.val[0] = it; in no_resolving_ts_setup() 256 bt_addr_copy(&returned_keys_refs[it]->irk.rpa, &addr->a); in no_resolving_ts_setup() 321 zassert_mem_equal(&returned_ref->irk.rpa, &addr->a, sizeof(bt_addr_t), in ZTEST()
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/bt_id_set_adv_private_addr/src/ |
D | main.c | 52 static int bt_rpa_create_custom_fake(const uint8_t irk[16], bt_addr_t *rpa) in bt_rpa_create_custom_fake() 54 __ASSERT_NO_MSG(irk != NULL); in bt_rpa_create_custom_fake() 89 expect_single_call_bt_rpa_create(bt_dev.irk[adv_param.id]); in ZTEST() 123 expect_single_call_bt_rpa_create(bt_dev.irk[adv_param.id]); in ZTEST()
|
D | test_suite_invalid_cases.c | 124 static int bt_rpa_create_custom_fake(const uint8_t irk[16], bt_addr_t *rpa) in bt_rpa_create_custom_fake() 126 __ASSERT_NO_MSG(irk != NULL); in bt_rpa_create_custom_fake()
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/bt_id_set_private_addr/src/ |
D | main.c | 49 static int bt_rpa_create_custom_fake(const uint8_t irk[16], bt_addr_t *rpa) in bt_rpa_create_custom_fake() 51 __ASSERT_NO_MSG(irk != NULL); in bt_rpa_create_custom_fake() 87 expect_single_call_bt_rpa_create(bt_dev.irk[id]); in ZTEST()
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/bt_id_delete/src/ |
D | test_suite_bt_settings.c | 70 zassert_mem_equal(bt_dev.irk[id], zero_irk, sizeof(zero_irk), in ZTEST() 123 zassert_mem_equal(bt_dev.irk[id], zero_irk, sizeof(zero_irk), in ZTEST()
|
D | main.c | 75 zassert_mem_equal(bt_dev.irk[id], zero_irk, sizeof(zero_irk), in ZTEST() 122 zassert_mem_equal(bt_dev.irk[id], zero_irk, sizeof(zero_irk), in ZTEST()
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/bt_id_set_create_conn_own_addr/src/ |
D | test_suite_invalid_inputs.c | 100 expect_single_call_bt_rpa_create(bt_dev.irk[BT_ID_DEFAULT]); in ZTEST()
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/bt_id_set_scan_own_addr/src/ |
D | test_suite_invalid_inputs.c | 130 expect_single_call_bt_rpa_create(bt_dev.irk[BT_ID_DEFAULT]); in ZTEST()
|
/Zephyr-Core-3.4.0/subsys/bluetooth/controller/ll_sw/openisa/hal/RV32M1/radio/ |
D | radio.h | 101 void radio_ar_configure(uint32_t nirk, void *irk);
|
/Zephyr-Core-3.4.0/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/ |
D | radio.h | 171 void radio_ar_configure(uint32_t nirk, void *irk, uint8_t flags);
|
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/bt_id_add/src/ |
D | main.c | 260 memcpy(keys.irk.val, testing_irk_value, 16); in ZTEST()
|
/Zephyr-Core-3.4.0/include/zephyr/bluetooth/ |
D | bluetooth.h | 359 int bt_id_create(bt_addr_le_t *addr, uint8_t *irk); 393 int bt_id_reset(uint8_t id, bt_addr_le_t *addr, uint8_t *irk);
|