Lines Matching refs:nonce
99 static int ccm_auth(const uint8_t key[16], uint8_t nonce[13], in ccm_auth()
114 memcpy(b + 1, nonce, 13); in ccm_auth()
152 static int ccm_crypt(const uint8_t key[16], const uint8_t nonce[13], in ccm_crypt()
167 memcpy(&a_i[1], nonce, 13); in ccm_crypt()
191 int bt_ccm_decrypt(const uint8_t key[16], uint8_t nonce[13], in bt_ccm_decrypt()
201 ccm_crypt(key, nonce, enc_data, plaintext, len); in bt_ccm_decrypt()
203 ccm_auth(key, nonce, plaintext, len, aad, aad_len, mic, mic_size); in bt_ccm_decrypt()
212 int bt_ccm_encrypt(const uint8_t key[16], uint8_t nonce[13], in bt_ccm_encrypt()
219 LOG_DBG("nonce %s", bt_hex(nonce, 13)); in bt_ccm_encrypt()
228 ccm_auth(key, nonce, plaintext, len, aad, aad_len, mic, mic_size); in bt_ccm_encrypt()
230 ccm_crypt(key, nonce, plaintext, enc_data, len); in bt_ccm_encrypt()