Lines Matching refs:chacha_state
36 static void xchacha_init(u32 *chacha_state, const u8 *key, const u8 *nonce) in xchacha_init() argument
47 chacha_init(chacha_state, k, nonce); in xchacha_init()
48 hchacha_block(chacha_state, k, 20); in xchacha_init()
50 chacha_init(chacha_state, k, iv); in xchacha_init()
58 const u8 *ad, const size_t ad_len, u32 *chacha_state) in __chacha20poly1305_encrypt() argument
67 chacha20_crypt(chacha_state, b.block0, pad0, sizeof(b.block0)); in __chacha20poly1305_encrypt()
74 chacha20_crypt(chacha_state, dst, src, src_len); in __chacha20poly1305_encrypt()
86 memzero_explicit(chacha_state, CHACHA_STATE_WORDS * sizeof(u32)); in __chacha20poly1305_encrypt()
95 u32 chacha_state[CHACHA_STATE_WORDS]; in chacha20poly1305_encrypt() local
104 chacha_init(chacha_state, k, (u8 *)iv); in chacha20poly1305_encrypt()
105 __chacha20poly1305_encrypt(dst, src, src_len, ad, ad_len, chacha_state); in chacha20poly1305_encrypt()
117 u32 chacha_state[CHACHA_STATE_WORDS]; in xchacha20poly1305_encrypt() local
119 xchacha_init(chacha_state, key, nonce); in xchacha20poly1305_encrypt()
120 __chacha20poly1305_encrypt(dst, src, src_len, ad, ad_len, chacha_state); in xchacha20poly1305_encrypt()
126 const u8 *ad, const size_t ad_len, u32 *chacha_state) in __chacha20poly1305_decrypt() argument
141 chacha20_crypt(chacha_state, b.block0, pad0, sizeof(b.block0)); in __chacha20poly1305_decrypt()
161 chacha20_crypt(chacha_state, dst, src, dst_len); in __chacha20poly1305_decrypt()
173 u32 chacha_state[CHACHA_STATE_WORDS]; in chacha20poly1305_decrypt() local
183 chacha_init(chacha_state, k, (u8 *)iv); in chacha20poly1305_decrypt()
185 chacha_state); in chacha20poly1305_decrypt()
187 memzero_explicit(chacha_state, sizeof(chacha_state)); in chacha20poly1305_decrypt()
199 u32 chacha_state[CHACHA_STATE_WORDS]; in xchacha20poly1305_decrypt() local
201 xchacha_init(chacha_state, key, nonce); in xchacha20poly1305_decrypt()
203 chacha_state); in xchacha20poly1305_decrypt()
217 u32 chacha_state[CHACHA_STATE_WORDS]; in chacha20poly1305_crypt_sg_inplace() local
244 chacha_init(chacha_state, b.k, (u8 *)b.iv); in chacha20poly1305_crypt_sg_inplace()
245 chacha20_crypt(chacha_state, b.block0, pad0, sizeof(b.block0)); in chacha20poly1305_crypt_sg_inplace()
280 chacha20_crypt(chacha_state, addr, addr, l); in chacha20poly1305_crypt_sg_inplace()
286 chacha20_crypt(chacha_state, b.chacha_stream, pad0, in chacha20poly1305_crypt_sg_inplace()
327 memzero_explicit(chacha_state, sizeof(chacha_state)); in chacha20poly1305_crypt_sg_inplace()