Home
last modified time | relevance | path

Searched refs:irk (Results 1 – 25 of 30) sorted by relevance

12

/Zephyr-Core-3.4.0/subsys/bluetooth/common/
Drpa.c56 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()
Drpa.h15 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/
Dtest_suite_bt_privacy_enabled.c88 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/
Dtest_suite_bt_privacy_enabled.c102 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/
Dtest_suite_privacy_enabled.c71 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/
Dsettings.c206 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()
Did.c303 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 …]
Dsmp.h98 uint8_t irk[16]; member
180 int bt_smp_irk_get(uint8_t *ir, uint8_t *irk);
Dkeys.c247 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()
Dkeys.h69 struct bt_irk irk; member
Dhci_core.h382 uint8_t irk[CONFIG_BT_ID_MAX][16]; member
/Zephyr-Core-3.4.0/tests/bluetooth/host/id/mocks/
Drpa_expects.c12 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()
Drpa_expects.h15 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/
Dmain.c63 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(&current_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/
Dmain.c52 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()
Dtest_suite_invalid_cases.c124 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/
Dmain.c49 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/
Dtest_suite_bt_settings.c70 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()
Dmain.c75 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/
Dtest_suite_invalid_inputs.c100 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/
Dtest_suite_invalid_inputs.c130 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/
Dradio.h101 void radio_ar_configure(uint32_t nirk, void *irk);
/Zephyr-Core-3.4.0/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/
Dradio.h171 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/
Dmain.c260 memcpy(keys.irk.val, testing_irk_value, 16); in ZTEST()
/Zephyr-Core-3.4.0/include/zephyr/bluetooth/
Dbluetooth.h359 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);

12