Lines Matching refs:poly1305_state
61 struct poly1305_desc_ctx poly1305_state; in __chacha20poly1305_encrypt() local
68 poly1305_init(&poly1305_state, b.block0); in __chacha20poly1305_encrypt()
70 poly1305_update(&poly1305_state, ad, ad_len); in __chacha20poly1305_encrypt()
72 poly1305_update(&poly1305_state, pad0, 0x10 - (ad_len & 0xf)); in __chacha20poly1305_encrypt()
76 poly1305_update(&poly1305_state, dst, src_len); in __chacha20poly1305_encrypt()
78 poly1305_update(&poly1305_state, pad0, 0x10 - (src_len & 0xf)); in __chacha20poly1305_encrypt()
82 poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens)); in __chacha20poly1305_encrypt()
84 poly1305_final(&poly1305_state, dst + src_len); in __chacha20poly1305_encrypt()
129 struct poly1305_desc_ctx poly1305_state; in __chacha20poly1305_decrypt() local
142 poly1305_init(&poly1305_state, b.block0); in __chacha20poly1305_decrypt()
144 poly1305_update(&poly1305_state, ad, ad_len); in __chacha20poly1305_decrypt()
146 poly1305_update(&poly1305_state, pad0, 0x10 - (ad_len & 0xf)); in __chacha20poly1305_decrypt()
149 poly1305_update(&poly1305_state, src, dst_len); in __chacha20poly1305_decrypt()
151 poly1305_update(&poly1305_state, pad0, 0x10 - (dst_len & 0xf)); in __chacha20poly1305_decrypt()
155 poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens)); in __chacha20poly1305_decrypt()
157 poly1305_final(&poly1305_state, b.mac); in __chacha20poly1305_decrypt()
216 struct poly1305_desc_ctx poly1305_state; in chacha20poly1305_crypt_sg_inplace() local
246 poly1305_init(&poly1305_state, b.block0); in chacha20poly1305_crypt_sg_inplace()
249 poly1305_update(&poly1305_state, ad, ad_len); in chacha20poly1305_crypt_sg_inplace()
251 poly1305_update(&poly1305_state, pad0, 0x10 - (ad_len & 0xf)); in chacha20poly1305_crypt_sg_inplace()
263 poly1305_update(&poly1305_state, addr, length); in chacha20poly1305_crypt_sg_inplace()
293 poly1305_update(&poly1305_state, miter.addr, in chacha20poly1305_crypt_sg_inplace()
298 poly1305_update(&poly1305_state, pad0, 0x10 - (src_len & 0xf)); in chacha20poly1305_crypt_sg_inplace()
302 poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens)); in chacha20poly1305_crypt_sg_inplace()
306 poly1305_final(&poly1305_state, in chacha20poly1305_crypt_sg_inplace()
310 poly1305_final(&poly1305_state, b.mac[0]); in chacha20poly1305_crypt_sg_inplace()
320 poly1305_final(&poly1305_state, b.mac[1]); in chacha20poly1305_crypt_sg_inplace()