Home
last modified time | relevance | path

Searched refs:bt_mesh_key (Results 1 – 23 of 23) sorted by relevance

/Zephyr-Core-3.7.0/subsys/bluetooth/mesh/
Dkeys.h18 int bt_mesh_key_import(enum bt_mesh_key_type type, const uint8_t in[16], struct bt_mesh_key *out);
19 int bt_mesh_key_export(uint8_t out[16], const struct bt_mesh_key *in);
20 void bt_mesh_key_assign(struct bt_mesh_key *dst, const struct bt_mesh_key *src);
21 int bt_mesh_key_destroy(const struct bt_mesh_key *key);
22 int bt_mesh_key_compare(const uint8_t raw_key[16], const struct bt_mesh_key *mesh_key);
27 struct bt_mesh_key *out) in bt_mesh_key_import()
33 static inline int bt_mesh_key_export(uint8_t out[16], const struct bt_mesh_key *in) in bt_mesh_key_export()
39 static inline void bt_mesh_key_assign(struct bt_mesh_key *dst, const struct bt_mesh_key *src) in bt_mesh_key_assign()
41 memcpy(dst, src, sizeof(struct bt_mesh_key)); in bt_mesh_key_assign()
44 static inline int bt_mesh_key_destroy(const struct bt_mesh_key *key) in bt_mesh_key_destroy()
[all …]
Dcrypto.h23 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16],
26 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *plaintext,
30 int bt_mesh_ccm_decrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *enc_data,
34 int bt_mesh_aes_cmac_mesh_key(const struct bt_mesh_key *key, struct bt_mesh_sg *sg, size_t sg_len,
56 struct bt_mesh_key *enc_key, struct bt_mesh_key *priv_key);
65 struct bt_mesh_key *out);
67 static inline int bt_mesh_identity_key(const uint8_t net_key[16], struct bt_mesh_key *identity_key) in bt_mesh_identity_key()
72 static inline int bt_mesh_beacon_key(const uint8_t net_key[16], struct bt_mesh_key *beacon_key) in bt_mesh_beacon_key()
78 struct bt_mesh_key *private_beacon_key) in bt_mesh_private_beacon_key()
83 int bt_mesh_beacon_auth(const struct bt_mesh_key *beacon_key, uint8_t flags,
[all …]
Dsubnet.h33 struct bt_mesh_key enc; /* EncKey */
34 struct bt_mesh_key privacy; /* PrivacyKey */
72 struct bt_mesh_key net; /* NetKey */
76 struct bt_mesh_key identity; /* IdentityKey */
78 struct bt_mesh_key beacon; /* BeaconKey */
79 struct bt_mesh_key priv_beacon; /* PrivateBeaconKey */
158 const struct bt_mesh_key *key, const struct bt_mesh_key *new_key);
174 const struct bt_mesh_key *key);
Dapp_keys.h26 const struct bt_mesh_key *old_key, const struct bt_mesh_key *new_key);
44 const struct bt_mesh_key **app_key, uint8_t *aid);
59 const struct bt_mesh_key *key, void *cb_data),
Dcrypto.c34 static int bt_mesh_aes_cmac_one_mesh_key(const struct bt_mesh_key *key, const void *m, in bt_mesh_aes_cmac_one_mesh_key()
78 uint8_t net_id[1], struct bt_mesh_key *enc_key, struct bt_mesh_key *priv_key) in bt_mesh_k2()
142 LOG_DBG("NID 0x%02x enc_key %s", net_id[0], bt_hex(enc_key, sizeof(struct bt_mesh_key))); in bt_mesh_k2()
143 LOG_DBG("priv_key %s", bt_hex(priv_key, sizeof(struct bt_mesh_key))); in bt_mesh_k2()
222 struct bt_mesh_key *out) in bt_mesh_id128()
261 struct bt_mesh_key *session_key) in bt_mesh_session_key()
353 int bt_mesh_net_obfuscate(uint8_t *pdu, uint32_t iv_index, const struct bt_mesh_key *privacy_key) in bt_mesh_net_obfuscate()
360 bt_hex(privacy_key, sizeof(struct bt_mesh_key))); in bt_mesh_net_obfuscate()
379 int bt_mesh_net_encrypt(const struct bt_mesh_key *key, struct net_buf_simple *buf, in bt_mesh_net_encrypt()
387 bt_hex(key, sizeof(struct bt_mesh_key)), mic_len); in bt_mesh_net_encrypt()
[all …]
Dcrypto_psa.c60 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16], in bt_mesh_encrypt()
79 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], in bt_mesh_ccm_encrypt()
102 int bt_mesh_ccm_decrypt(const struct bt_mesh_key *key, uint8_t nonce[13], in bt_mesh_ccm_decrypt()
125 int bt_mesh_aes_cmac_mesh_key(const struct bt_mesh_key *key, struct bt_mesh_sg *sg, in bt_mesh_aes_cmac_mesh_key()
162 struct bt_mesh_key key_id; in bt_mesh_aes_cmac_raw_key()
386 int bt_mesh_key_import(enum bt_mesh_key_type type, const uint8_t in[16], struct bt_mesh_key *out) in bt_mesh_key_import()
466 int bt_mesh_key_export(uint8_t out[16], const struct bt_mesh_key *in) in bt_mesh_key_export()
481 void bt_mesh_key_assign(struct bt_mesh_key *dst, const struct bt_mesh_key *src) in bt_mesh_key_assign()
483 memcpy(dst, src, sizeof(struct bt_mesh_key)); in bt_mesh_key_assign()
489 int bt_mesh_key_destroy(const struct bt_mesh_key *key) in bt_mesh_key_destroy()
[all …]
Dcrypto_tc.c36 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16], in bt_mesh_encrypt()
42 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *plaintext, in bt_mesh_ccm_encrypt()
49 int bt_mesh_ccm_decrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *enc_data, in bt_mesh_ccm_decrypt()
79 int bt_mesh_aes_cmac_mesh_key(const struct bt_mesh_key *key, struct bt_mesh_sg *sg, in bt_mesh_aes_cmac_mesh_key()
Dcdb.c53 struct bt_mesh_key dev_key;
60 struct bt_mesh_key val[2];
67 struct bt_mesh_key val[2];
218 struct bt_mesh_key tmp; in cdb_node_set()
267 memcpy(&tmp, &val.dev_key, sizeof(struct bt_mesh_key)); in cdb_node_set()
280 struct bt_mesh_key tmp[2]; in cdb_subnet_set()
313 memcpy(&tmp[0], &key.val[0], sizeof(struct bt_mesh_key)); in cdb_subnet_set()
314 memcpy(&tmp[1], &key.val[1], sizeof(struct bt_mesh_key)); in cdb_subnet_set()
346 struct bt_mesh_key tmp[2]; in cdb_app_key_set()
378 memcpy(&tmp[0], &key.val[0], sizeof(struct bt_mesh_key)); in cdb_app_key_set()
[all …]
Dnet.h39 struct bt_mesh_key dev_key;
233 struct bt_mesh_key dev_key;
236 struct bt_mesh_key dev_key_cand;
287 int bt_mesh_net_create(uint16_t idx, uint8_t flags, const struct bt_mesh_key *key,
Dapp_keys.c46 struct bt_mesh_key val[2];
56 struct bt_mesh_key val;
112 memcpy(&key.val[0], &app->keys[0].val, sizeof(struct bt_mesh_key)); in store_app_key()
113 memcpy(&key.val[1], &app->keys[1].val, sizeof(struct bt_mesh_key)); in store_app_key()
379 static int app_id_set(struct app_key *app, int key_idx, const struct bt_mesh_key *key) in app_id_set()
400 const struct bt_mesh_key *old_key, const struct bt_mesh_key *new_key) in bt_mesh_app_key_set()
474 const struct bt_mesh_key **app_key, uint8_t *aid) in bt_mesh_keys_resolve()
538 const struct bt_mesh_key *key, void *cb_data), in bt_mesh_app_key_find()
665 struct bt_mesh_key val[2]; in app_key_set()
Dsubnet.c57 struct bt_mesh_key val[2];
108 memcpy(&key.val[0], &sub->keys[0].net, sizeof(struct bt_mesh_key)); in store_subnet()
109 memcpy(&key.val[1], &sub->keys[1].net, sizeof(struct bt_mesh_key)); in store_subnet()
327 bt_hex(&keys->msg.enc, sizeof(struct bt_mesh_key))); in net_keys_create()
328 LOG_DBG("PrivacyKey %s", bt_hex(&keys->msg.privacy, sizeof(struct bt_mesh_key))); in net_keys_create()
345 LOG_DBG("IdentityKey %s", bt_hex(&keys->identity, sizeof(struct bt_mesh_key))); in net_keys_create()
354 LOG_DBG("BeaconKey %s", bt_hex(&keys->beacon, sizeof(struct bt_mesh_key))); in net_keys_create()
363 LOG_DBG("PrivateBeaconKey %s", bt_hex(&keys->priv_beacon, sizeof(struct bt_mesh_key))); in net_keys_create()
485 uint16_t frnd_counter, const struct bt_mesh_key *key) in bt_mesh_friend_cred_create()
749 static int subnet_key_set(struct bt_mesh_subnet *sub, int key_idx, const struct bt_mesh_key *key) in subnet_key_set()
[all …]
Dmain.c49 struct bt_mesh_key mesh_dev_key; in bt_mesh_provision()
50 struct bt_mesh_key mesh_net_key; in bt_mesh_provision()
155 memcpy(&bt_mesh.dev_key, &mesh_dev_key, sizeof(struct bt_mesh_key)); in bt_mesh_provision()
188 bt_hex(&bt_mesh.dev_key_cand, sizeof(struct bt_mesh_key))); in bt_mesh_reprovision()
252 memcpy(&bt_mesh.dev_key, &bt_mesh.dev_key_cand, sizeof(struct bt_mesh_key)); in bt_mesh_dev_key_cand_activate()
253 memset(&bt_mesh.dev_key_cand, 0, sizeof(struct bt_mesh_key)); in bt_mesh_dev_key_cand_activate()
Dnet.c60 struct bt_mesh_key dev_key;
190 int bt_mesh_net_create(uint16_t idx, uint8_t flags, const struct bt_mesh_key *key, in bt_mesh_net_create()
197 LOG_DBG("NetKey %s", bt_hex(key, sizeof(struct bt_mesh_key))); in bt_mesh_net_create()
950 struct bt_mesh_key key; in net_set()
958 memset(&bt_mesh.dev_key, 0, sizeof(struct bt_mesh_key)); in net_set()
971 memcpy(&key, &net.dev_key, sizeof(struct bt_mesh_key)); in net_set()
977 LOG_DBG("Recovered DevKey %s", bt_hex(&bt_mesh.dev_key, sizeof(struct bt_mesh_key))); in net_set()
1064 sizeof(struct bt_mesh_key)); in dev_key_cand_set()
1083 sizeof(struct bt_mesh_key)); in bt_mesh_net_pending_dev_key_cand_store()
1157 bt_hex(&bt_mesh.dev_key, sizeof(struct bt_mesh_key))); in store_pending_net()
[all …]
Dtransport.c627 static int trans_encrypt(const struct bt_mesh_net_tx *tx, const struct bt_mesh_key *key, in trans_encrypt()
649 const struct bt_mesh_key *key; in bt_mesh_trans_send()
744 static int sdu_try_decrypt(struct bt_mesh_net_rx *rx, const struct bt_mesh_key *key, in sdu_try_decrypt()
Dprovisionee.c512 struct bt_mesh_key session_key; in prov_data()
Dprovisioner.c497 struct bt_mesh_key session_key; in send_prov_data()
Dlpn.c616 static int friend_cred_create(struct bt_mesh_net_cred *cred, const struct bt_mesh_key *key) in friend_cred_create()
Dfriend.c371 const struct bt_mesh_key *key;
/Zephyr-Core-3.7.0/include/zephyr/bluetooth/mesh/
Dkeys.h26 struct bt_mesh_key { struct
34 struct bt_mesh_key { argument
Dcdb.h40 struct bt_mesh_key dev_key;
51 struct bt_mesh_key net_key;
60 struct bt_mesh_key app_key;
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/mesh/src/
Dtest_beacon.c98 static struct bt_mesh_key priv_beacon_key;
435 struct bt_mesh_key beacon_key; in beacon_create()
1559 struct bt_mesh_key id_key;
Dtest_persistence.c487 const struct bt_mesh_key *dkey; in test_provisioning_data_load()
Dtest_provision.c1510 ASSERT_TRUE(memcmp(prev_dev_key, dev_key, sizeof(struct bt_mesh_key))); in test_device_pb_remote_client_server_same_dev()