Lines Matching refs:keys
142 struct bt_mesh_subnet_keys *keys; in secure_beacon_create() local
146 keys = &sub->keys[SUBNET_KEY_TX_IDX(sub)]; in secure_beacon_create()
151 net_buf_simple_add_mem(buf, keys->net_id, 8); in secure_beacon_create()
159 bt_hex(keys->net_id, 8)); in secure_beacon_create()
199 struct bt_mesh_subnet_keys *keys = &sub->keys[SUBNET_KEY_TX_IDX(sub)]; in private_beacon_update() local
203 err = bt_mesh_beacon_encrypt(&keys->priv_beacon, flags, bt_mesh.iv_index, in private_beacon_update()
522 static bool auth_match(struct bt_mesh_subnet_keys *keys, in auth_match() argument
527 if (memcmp(params->net_id, keys->net_id, 8)) { in auth_match()
531 if (bt_mesh_beacon_auth(&keys->beacon, params->flags, keys->net_id, params->iv_index, in auth_match()
549 for (int i = 0; i < ARRAY_SIZE(sub->keys); i++) { in secure_beacon_authenticate()
550 if (sub->keys[i].valid && auth_match(&sub->keys[i], params)) { in secure_beacon_authenticate()
580 for (int i = 0; i < ARRAY_SIZE(sub->keys); i++) { in priv_beacon_decrypt()
581 if (!sub->keys[i].valid) { in priv_beacon_decrypt()
585 err = bt_mesh_beacon_decrypt(&sub->keys[i].priv_beacon, params->random, in priv_beacon_decrypt()
752 struct bt_mesh_subnet_keys *keys; in bt_mesh_beacon_update() local
754 keys = &sub->keys[SUBNET_KEY_TX_IDX(sub)]; in bt_mesh_beacon_update()
766 bt_mesh_beacon_auth(&keys->beacon, flags, keys->net_id, bt_mesh.iv_index, in bt_mesh_beacon_update()