Lines Matching refs:iv
39 u8 iv[CHACHA_IV_SIZE]; in xchacha_init() local
41 memset(iv, 0, 8); in xchacha_init()
42 memcpy(iv + 8, nonce + 16, 8); in xchacha_init()
50 chacha_init(chacha_state, k, iv); in xchacha_init()
53 memzero_explicit(iv, sizeof(iv)); in xchacha_init()
97 __le64 iv[2]; in chacha20poly1305_encrypt() local
101 iv[0] = 0; in chacha20poly1305_encrypt()
102 iv[1] = cpu_to_le64(nonce); in chacha20poly1305_encrypt()
104 chacha_init(chacha_state, k, (u8 *)iv); in chacha20poly1305_encrypt()
107 memzero_explicit(iv, sizeof(iv)); in chacha20poly1305_encrypt()
175 __le64 iv[2]; in chacha20poly1305_decrypt() local
180 iv[0] = 0; in chacha20poly1305_decrypt()
181 iv[1] = cpu_to_le64(nonce); in chacha20poly1305_decrypt()
183 chacha_init(chacha_state, k, (u8 *)iv); in chacha20poly1305_decrypt()
188 memzero_explicit(iv, sizeof(iv)); in chacha20poly1305_decrypt()
226 __le64 iv[2]; in chacha20poly1305_crypt_sg_inplace() member
241 b.iv[0] = 0; in chacha20poly1305_crypt_sg_inplace()
242 b.iv[1] = cpu_to_le64(nonce); in chacha20poly1305_crypt_sg_inplace()
244 chacha_init(chacha_state, b.k, (u8 *)b.iv); in chacha20poly1305_crypt_sg_inplace()