Lines Matching full:todo

65 	size_t resid, todo, inlen, outlen;  in ossl_chacha20()  local
103 todo = rounddown(MIN(resid, MIN(inlen, outlen)), in ossl_chacha20()
108 todo = (uint32_t)todo; in ossl_chacha20()
112 next_counter = counter[0] + todo / CHACHA_BLK_SIZE; in ossl_chacha20()
114 todo -= next_counter * CHACHA_BLK_SIZE; in ossl_chacha20()
118 ChaCha20_ctr32(out, in, todo, key, counter); in ossl_chacha20()
128 crypto_cursor_advance(&cc_out, todo); in ossl_chacha20()
129 outseg += todo; in ossl_chacha20()
130 outlen -= todo; in ossl_chacha20()
135 crypto_cursor_advance(&cc_in, todo); in ossl_chacha20()
136 inseg += todo; in ossl_chacha20()
137 inlen -= todo; in ossl_chacha20()
139 resid -= todo; in ossl_chacha20()
167 size_t resid, todo, inlen, outlen; in ossl_chacha20_poly1305_encrypt() local
231 todo = rounddown(MIN(resid, MIN(inlen, outlen)), in ossl_chacha20_poly1305_encrypt()
236 todo = (uint32_t)todo; in ossl_chacha20_poly1305_encrypt()
240 next_counter = counter[0] + todo / CHACHA_BLK_SIZE; in ossl_chacha20_poly1305_encrypt()
242 todo -= next_counter * CHACHA_BLK_SIZE; in ossl_chacha20_poly1305_encrypt()
246 ChaCha20_ctr32(out, in, todo, key, counter); in ossl_chacha20_poly1305_encrypt()
247 Poly1305_Update(&auth_ctx, out, todo); in ossl_chacha20_poly1305_encrypt()
257 crypto_cursor_advance(&cc_out, todo); in ossl_chacha20_poly1305_encrypt()
258 outseg += todo; in ossl_chacha20_poly1305_encrypt()
259 outlen -= todo; in ossl_chacha20_poly1305_encrypt()
264 crypto_cursor_advance(&cc_in, todo); in ossl_chacha20_poly1305_encrypt()
265 inseg += todo; in ossl_chacha20_poly1305_encrypt()
266 inlen -= todo; in ossl_chacha20_poly1305_encrypt()
268 resid -= todo; in ossl_chacha20_poly1305_encrypt()
278 todo = roundup2(resid, 16); in ossl_chacha20_poly1305_encrypt()
279 memset(block + resid, 0, todo - resid); in ossl_chacha20_poly1305_encrypt()
280 Poly1305_Update(&auth_ctx, block, todo); in ossl_chacha20_poly1305_encrypt()
313 size_t resid, todo, inlen, outlen; in ossl_chacha20_poly1305_decrypt() local
400 todo = rounddown(MIN(resid, MIN(inlen, outlen)), in ossl_chacha20_poly1305_decrypt()
405 todo = (uint32_t)todo; in ossl_chacha20_poly1305_decrypt()
409 next_counter = counter[0] + todo / CHACHA_BLK_SIZE; in ossl_chacha20_poly1305_decrypt()
411 todo -= next_counter * CHACHA_BLK_SIZE; in ossl_chacha20_poly1305_decrypt()
415 ChaCha20_ctr32(out, in, todo, key, counter); in ossl_chacha20_poly1305_decrypt()
425 crypto_cursor_advance(&cc_out, todo); in ossl_chacha20_poly1305_decrypt()
426 outseg += todo; in ossl_chacha20_poly1305_decrypt()
427 outlen -= todo; in ossl_chacha20_poly1305_decrypt()
432 crypto_cursor_advance(&cc_in, todo); in ossl_chacha20_poly1305_decrypt()
433 inseg += todo; in ossl_chacha20_poly1305_decrypt()
434 inlen -= todo; in ossl_chacha20_poly1305_decrypt()
436 resid -= todo; in ossl_chacha20_poly1305_decrypt()