Lines Matching full:key

28 int bt_mesh_aes_cmac(const u8_t key[16], struct bt_mesh_sg *sg,  in bt_mesh_aes_cmac()
34 if (tc_cmac_setup(&state, key, &sched) == TC_CRYPTO_FAIL) { in bt_mesh_aes_cmac()
198 static int bt_mesh_ccm_decrypt(const u8_t key[16], u8_t nonce[13], in bt_mesh_ccm_decrypt()
217 err = bt_encrypt_be(key, pmsg, cmic); in bt_mesh_ccm_decrypt()
232 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_decrypt()
256 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_decrypt()
270 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_decrypt()
289 err = bt_encrypt_be(key, pmsg, cmsg); in bt_mesh_ccm_decrypt()
310 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_decrypt()
325 err = bt_encrypt_be(key, pmsg, cmsg); in bt_mesh_ccm_decrypt()
342 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_decrypt()
356 static int bt_mesh_ccm_encrypt(const u8_t key[16], u8_t nonce[13], in bt_mesh_ccm_encrypt()
366 BT_DBG("key %s", bt_hex(key, 16)); in bt_mesh_ccm_encrypt()
381 err = bt_encrypt_be(key, pmsg, cmic); in bt_mesh_ccm_encrypt()
396 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_encrypt()
420 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_encrypt()
434 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_encrypt()
456 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_encrypt()
471 err = bt_encrypt_be(key, pmsg, cmsg); in bt_mesh_ccm_encrypt()
487 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_encrypt()
497 err = bt_encrypt_be(key, pmsg, cmsg); in bt_mesh_ccm_encrypt()
596 int bt_mesh_net_encrypt(const u8_t key[16], struct os_mbuf *buf, in bt_mesh_net_encrypt()
603 BT_DBG("IVIndex %u EncKey %s mic_len %u", iv_index, bt_hex(key, 16), in bt_mesh_net_encrypt()
619 err = bt_mesh_ccm_encrypt(key, nonce, &buf->om_data[7], buf->om_len - 7, in bt_mesh_net_encrypt()
628 int bt_mesh_net_decrypt(const u8_t key[16], struct os_mbuf *buf, in bt_mesh_net_decrypt()
635 BT_DBG("iv_index %u, key %s mic_len %u", iv_index, bt_hex(key, 16), in bt_mesh_net_decrypt()
652 return bt_mesh_ccm_decrypt(key, nonce, &buf->om_data[7], buf->om_len - 7, in bt_mesh_net_decrypt()
674 int bt_mesh_app_encrypt(const u8_t key[16], bool dev_key, u8_t aszmic, in bt_mesh_app_encrypt()
681 BT_DBG("AppKey %s", bt_hex(key, 16)); in bt_mesh_app_encrypt()
690 err = bt_mesh_ccm_encrypt(key, nonce, buf->om_data, buf->om_len, ad, in bt_mesh_app_encrypt()
700 int bt_mesh_app_decrypt(const u8_t key[16], bool dev_key, u8_t aszmic, in bt_mesh_app_decrypt()
712 BT_DBG("AppKey %s", bt_hex(key, 16)); in bt_mesh_app_decrypt()
715 err = bt_mesh_ccm_decrypt(key, nonce, buf->om_data, buf->om_len, ad, in bt_mesh_app_decrypt()
839 int bt_mesh_prov_decrypt(const u8_t key[16], u8_t nonce[13], in bt_mesh_prov_decrypt()
842 return bt_mesh_ccm_decrypt(key, nonce, data, 25, NULL, 0, out, 8); in bt_mesh_prov_decrypt()