Lines Matching full:bytes
49 unsigned int bytes, int nrounds) in chacha_dosimd() argument
53 while (bytes >= CHACHA_BLOCK_SIZE * 8) { in chacha_dosimd()
54 chacha_8block_xor_avx512vl(state, dst, src, bytes, in chacha_dosimd()
56 bytes -= CHACHA_BLOCK_SIZE * 8; in chacha_dosimd()
61 if (bytes > CHACHA_BLOCK_SIZE * 4) { in chacha_dosimd()
62 chacha_8block_xor_avx512vl(state, dst, src, bytes, in chacha_dosimd()
64 state[12] += chacha_advance(bytes, 8); in chacha_dosimd()
67 if (bytes > CHACHA_BLOCK_SIZE * 2) { in chacha_dosimd()
68 chacha_4block_xor_avx512vl(state, dst, src, bytes, in chacha_dosimd()
70 state[12] += chacha_advance(bytes, 4); in chacha_dosimd()
73 if (bytes) { in chacha_dosimd()
74 chacha_2block_xor_avx512vl(state, dst, src, bytes, in chacha_dosimd()
76 state[12] += chacha_advance(bytes, 2); in chacha_dosimd()
82 while (bytes >= CHACHA_BLOCK_SIZE * 8) { in chacha_dosimd()
83 chacha_8block_xor_avx2(state, dst, src, bytes, nrounds); in chacha_dosimd()
84 bytes -= CHACHA_BLOCK_SIZE * 8; in chacha_dosimd()
89 if (bytes > CHACHA_BLOCK_SIZE * 4) { in chacha_dosimd()
90 chacha_8block_xor_avx2(state, dst, src, bytes, nrounds); in chacha_dosimd()
91 state[12] += chacha_advance(bytes, 8); in chacha_dosimd()
94 if (bytes > CHACHA_BLOCK_SIZE * 2) { in chacha_dosimd()
95 chacha_4block_xor_avx2(state, dst, src, bytes, nrounds); in chacha_dosimd()
96 state[12] += chacha_advance(bytes, 4); in chacha_dosimd()
99 if (bytes > CHACHA_BLOCK_SIZE) { in chacha_dosimd()
100 chacha_2block_xor_avx2(state, dst, src, bytes, nrounds); in chacha_dosimd()
101 state[12] += chacha_advance(bytes, 2); in chacha_dosimd()
106 while (bytes >= CHACHA_BLOCK_SIZE * 4) { in chacha_dosimd()
107 chacha_4block_xor_ssse3(state, dst, src, bytes, nrounds); in chacha_dosimd()
108 bytes -= CHACHA_BLOCK_SIZE * 4; in chacha_dosimd()
113 if (bytes > CHACHA_BLOCK_SIZE) { in chacha_dosimd()
114 chacha_4block_xor_ssse3(state, dst, src, bytes, nrounds); in chacha_dosimd()
115 state[12] += chacha_advance(bytes, 4); in chacha_dosimd()
118 if (bytes) { in chacha_dosimd()
119 chacha_block_xor_ssse3(state, dst, src, bytes, nrounds); in chacha_dosimd()
142 void chacha_crypt_arch(u32 *state, u8 *dst, const u8 *src, unsigned int bytes, in chacha_crypt_arch() argument
146 bytes <= CHACHA_BLOCK_SIZE) in chacha_crypt_arch()
147 return chacha_crypt_generic(state, dst, src, bytes, nrounds); in chacha_crypt_arch()
150 unsigned int todo = min_t(unsigned int, bytes, SZ_4K); in chacha_crypt_arch()
156 bytes -= todo; in chacha_crypt_arch()
159 } while (bytes); in chacha_crypt_arch()