• Home
  • Raw
  • Download

Lines Matching refs:b

65 	} b;  in __chacha20poly1305_encrypt()  local
67 chacha20_crypt(chacha_state, b.block0, pad0, sizeof(b.block0)); in __chacha20poly1305_encrypt()
68 poly1305_init(&poly1305_state, b.block0); in __chacha20poly1305_encrypt()
80 b.lens[0] = cpu_to_le64(ad_len); in __chacha20poly1305_encrypt()
81 b.lens[1] = cpu_to_le64(src_len); in __chacha20poly1305_encrypt()
82 poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens)); in __chacha20poly1305_encrypt()
87 memzero_explicit(&b, sizeof(b)); in __chacha20poly1305_encrypt()
136 } b; in __chacha20poly1305_decrypt() local
141 chacha20_crypt(chacha_state, b.block0, pad0, sizeof(b.block0)); in __chacha20poly1305_decrypt()
142 poly1305_init(&poly1305_state, b.block0); in __chacha20poly1305_decrypt()
153 b.lens[0] = cpu_to_le64(ad_len); in __chacha20poly1305_decrypt()
154 b.lens[1] = cpu_to_le64(dst_len); 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()
159 ret = crypto_memneq(b.mac, src + dst_len, POLY1305_DIGEST_SIZE); in __chacha20poly1305_decrypt()
163 memzero_explicit(&b, sizeof(b)); in __chacha20poly1305_decrypt()
234 } b __aligned(16); in chacha20poly1305_crypt_sg_inplace()
239 chacha_load_key(b.k, key); in chacha20poly1305_crypt_sg_inplace()
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()
245 chacha20_crypt(chacha_state, b.block0, pad0, sizeof(b.block0)); in chacha20poly1305_crypt_sg_inplace()
246 poly1305_init(&poly1305_state, b.block0); in chacha20poly1305_crypt_sg_inplace()
268 crypto_xor(addr, b.chacha_stream + partial, l); in chacha20poly1305_crypt_sg_inplace()
286 chacha20_crypt(chacha_state, b.chacha_stream, pad0, in chacha20poly1305_crypt_sg_inplace()
288 crypto_xor(addr, b.chacha_stream, length); in chacha20poly1305_crypt_sg_inplace()
300 b.lens[0] = cpu_to_le64(ad_len); in chacha20poly1305_crypt_sg_inplace()
301 b.lens[1] = cpu_to_le64(src_len); in chacha20poly1305_crypt_sg_inplace()
302 poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens)); in chacha20poly1305_crypt_sg_inplace()
310 poly1305_final(&poly1305_state, b.mac[0]); in chacha20poly1305_crypt_sg_inplace()
311 ret = !crypto_memneq(b.mac[0], in chacha20poly1305_crypt_sg_inplace()
320 poly1305_final(&poly1305_state, b.mac[1]); in chacha20poly1305_crypt_sg_inplace()
321 scatterwalk_map_and_copy(b.mac[encrypt], src, src_len, in chacha20poly1305_crypt_sg_inplace()
322 sizeof(b.mac[1]), encrypt); in chacha20poly1305_crypt_sg_inplace()
324 !crypto_memneq(b.mac[0], b.mac[1], POLY1305_DIGEST_SIZE); in chacha20poly1305_crypt_sg_inplace()
328 memzero_explicit(&b, sizeof(b)); in chacha20poly1305_crypt_sg_inplace()