Lines Matching refs:randomizer
36 static int bt_ead_generate_randomizer(uint8_t randomizer[BT_EAD_RANDOMIZER_SIZE]) in bt_ead_generate_randomizer()
40 err = bt_rand(randomizer, BT_EAD_RANDOMIZER_SIZE); in bt_ead_generate_randomizer()
49 randomizer[4] |= 1 << BT_EAD_RANDOMIZER_DIRECTION_BIT; in bt_ead_generate_randomizer()
55 const uint8_t randomizer[BT_EAD_RANDOMIZER_SIZE], uint8_t *nonce) in bt_ead_generate_nonce()
59 if (randomizer == NULL) { in bt_ead_generate_nonce()
69 randomizer = new_randomizer; in bt_ead_generate_nonce()
72 memcpy(&nonce[0], randomizer, BT_EAD_RANDOMIZER_SIZE); in bt_ead_generate_nonce()
79 const uint8_t randomizer[BT_EAD_RANDOMIZER_SIZE], const uint8_t *payload, in ead_encrypt()
86 err = bt_ead_generate_nonce(iv, randomizer, nonce); in ead_encrypt()
140 const uint8_t randomizer[BT_EAD_RANDOMIZER_SIZE], const uint8_t *payload, in bt_test_ead_encrypt()
153 CHECKIF(randomizer == NULL) { in bt_test_ead_encrypt()
173 return ead_encrypt(session_key, iv, randomizer, payload, payload_size, encrypted_payload); in bt_test_ead_encrypt()
188 const uint8_t *randomizer = encrypted_payload; in ead_decrypt() local
190 err = bt_ead_generate_nonce(iv, randomizer, nonce); in ead_decrypt()