Lines Matching refs:ad_len
58 const u8 *ad, const size_t ad_len, u32 *chacha_state) in __chacha20poly1305_encrypt() argument
70 poly1305_update(&poly1305_state, ad, ad_len); in __chacha20poly1305_encrypt()
71 if (ad_len & 0xf) in __chacha20poly1305_encrypt()
72 poly1305_update(&poly1305_state, pad0, 0x10 - (ad_len & 0xf)); in __chacha20poly1305_encrypt()
80 b.lens[0] = cpu_to_le64(ad_len); in __chacha20poly1305_encrypt()
91 const u8 *ad, const size_t ad_len, in chacha20poly1305_encrypt() argument
105 __chacha20poly1305_encrypt(dst, src, src_len, ad, ad_len, chacha_state); in chacha20poly1305_encrypt()
113 const u8 *ad, const size_t ad_len, in xchacha20poly1305_encrypt() argument
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
144 poly1305_update(&poly1305_state, ad, ad_len); in __chacha20poly1305_decrypt()
145 if (ad_len & 0xf) in __chacha20poly1305_decrypt()
146 poly1305_update(&poly1305_state, pad0, 0x10 - (ad_len & 0xf)); in __chacha20poly1305_decrypt()
153 b.lens[0] = cpu_to_le64(ad_len); in __chacha20poly1305_decrypt()
169 const u8 *ad, const size_t ad_len, in chacha20poly1305_decrypt() argument
184 ret = __chacha20poly1305_decrypt(dst, src, src_len, ad, ad_len, in chacha20poly1305_decrypt()
195 const u8 *ad, const size_t ad_len, in xchacha20poly1305_decrypt() argument
202 return __chacha20poly1305_decrypt(dst, src, src_len, ad, ad_len, in xchacha20poly1305_decrypt()
210 const u8 *ad, const size_t ad_len, in chacha20poly1305_crypt_sg_inplace() argument
248 if (unlikely(ad_len)) { in chacha20poly1305_crypt_sg_inplace()
249 poly1305_update(&poly1305_state, ad, ad_len); in chacha20poly1305_crypt_sg_inplace()
250 if (ad_len & 0xf) in chacha20poly1305_crypt_sg_inplace()
251 poly1305_update(&poly1305_state, pad0, 0x10 - (ad_len & 0xf)); in chacha20poly1305_crypt_sg_inplace()
300 b.lens[0] = cpu_to_le64(ad_len); in chacha20poly1305_crypt_sg_inplace()
334 const u8 *ad, const size_t ad_len, in chacha20poly1305_encrypt_sg_inplace() argument
338 return chacha20poly1305_crypt_sg_inplace(src, src_len, ad, ad_len, in chacha20poly1305_encrypt_sg_inplace()
344 const u8 *ad, const size_t ad_len, in chacha20poly1305_decrypt_sg_inplace() argument
353 ad, ad_len, nonce, key, 0); in chacha20poly1305_decrypt_sg_inplace()