Lines Matching +full:key +full:- +full:int
5 * SPDX-License-Identifier: Apache-2.0
21 int bt_mesh_crypto_init(void);
23 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,
37 int bt_mesh_aes_cmac_raw_key(const uint8_t key[16], struct bt_mesh_sg *sg, size_t sg_len,
40 int bt_mesh_sha256_hmac_raw_key(const uint8_t key[32], struct bt_mesh_sg *sg, size_t sg_len,
43 int bt_mesh_s1(const char *m, size_t m_len, uint8_t salt[16]);
45 static inline int bt_mesh_s1_str(const char *m, uint8_t salt[16]) in bt_mesh_s1_str()
50 int bt_mesh_s2(const char *m, size_t m_len, uint8_t salt[32]);
52 int bt_mesh_k1(const uint8_t *ikm, size_t ikm_len, const uint8_t salt[16], const char *info,
55 int bt_mesh_k2(const uint8_t n[16], const uint8_t *p, size_t p_len, uint8_t net_id[1],
58 int bt_mesh_k3(const uint8_t n[16], uint8_t out[8]);
60 int bt_mesh_k4(const uint8_t n[16], uint8_t out[1]);
62 int bt_mesh_k5(const uint8_t *n, size_t n_len, const uint8_t salt[32], uint8_t *p, uint8_t out[32]);
64 int bt_mesh_id128(const uint8_t n[16], const char *s, enum bt_mesh_key_type type,
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()
77 static inline int bt_mesh_private_beacon_key(const uint8_t net_key[16], in bt_mesh_private_beacon_key()
83 int bt_mesh_beacon_auth(const struct bt_mesh_key *beacon_key, uint8_t flags,
86 static inline int bt_mesh_app_id(const uint8_t app_key[16], uint8_t app_id[1]) in bt_mesh_app_id()
91 int bt_mesh_session_key(const uint8_t dhkey[32], const uint8_t prov_salt[16],
94 int bt_mesh_prov_nonce(const uint8_t dhkey[32], const uint8_t prov_salt[16], uint8_t nonce[13]);
96 int bt_mesh_dev_key(const uint8_t dhkey[32], const uint8_t prov_salt[16], uint8_t dev_key[16]);
98 int bt_mesh_prov_salt(uint8_t algorithm, const uint8_t *conf_salt, const uint8_t *prov_rand,
101 int bt_mesh_net_obfuscate(uint8_t *pdu, uint32_t iv_index, const struct bt_mesh_key *privacy_key);
103 int bt_mesh_net_encrypt(const struct bt_mesh_key *key, struct net_buf_simple *buf,
106 int bt_mesh_net_decrypt(const struct bt_mesh_key *key, struct net_buf_simple *buf,
119 int bt_mesh_app_encrypt(const struct bt_mesh_key *key, const struct bt_mesh_app_crypto_ctx *ctx,
122 int bt_mesh_app_decrypt(const struct bt_mesh_key *key, const struct bt_mesh_app_crypto_ctx *ctx,
129 int bt_mesh_virtual_addr(const uint8_t virtual_label[16], uint16_t *addr);
131 int bt_mesh_prov_conf_salt(uint8_t algorithm, const uint8_t conf_inputs[145], uint8_t *salt);
133 int bt_mesh_prov_conf_key(uint8_t algorithm, const uint8_t *k_input, const uint8_t *conf_salt,
136 int bt_mesh_prov_conf(uint8_t algorithm, const uint8_t *conf_key, const uint8_t *prov_rand,
139 int bt_mesh_prov_decrypt(struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t data[25 + 8],
142 int bt_mesh_prov_encrypt(struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t data[25],
145 int bt_mesh_pub_key_gen(void);
149 int bt_mesh_dhkey_gen(const uint8_t *pub_key, const uint8_t *priv_key, uint8_t *dhkey);
151 int bt_mesh_beacon_decrypt(const struct bt_mesh_key *pbk, const uint8_t random[13],
154 int bt_mesh_beacon_encrypt(const struct bt_mesh_key *pbk, uint8_t flags, uint32_t iv_index,