Lines Matching refs:iv
54 static int bt_ead_generate_nonce(const uint8_t iv[BT_EAD_IV_SIZE], in bt_ead_generate_nonce()
73 memcpy(&nonce[BT_EAD_RANDOMIZER_SIZE], iv, BT_EAD_IV_SIZE); in bt_ead_generate_nonce()
78 static int ead_encrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE], in ead_encrypt()
86 err = bt_ead_generate_nonce(iv, randomizer, nonce); in ead_encrypt()
105 int bt_ead_encrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE], in bt_ead_encrypt()
113 CHECKIF(iv == NULL) { in bt_ead_encrypt()
133 return ead_encrypt(session_key, iv, NULL, payload, payload_size, encrypted_payload); in bt_ead_encrypt()
139 const uint8_t iv[BT_EAD_IV_SIZE], in bt_test_ead_encrypt()
148 CHECKIF(iv == NULL) { in bt_test_ead_encrypt()
173 return ead_encrypt(session_key, iv, randomizer, payload, payload_size, encrypted_payload); in bt_test_ead_encrypt()
178 static int ead_decrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE], in ead_decrypt()
190 err = bt_ead_generate_nonce(iv, randomizer, nonce); in ead_decrypt()
208 int bt_ead_decrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE], in bt_ead_decrypt()
217 CHECKIF(iv == NULL) { in bt_ead_decrypt()
239 return ead_decrypt(session_key, iv, encrypted_payload, encrypted_payload_size, payload); in bt_ead_decrypt()