Lines Matching refs:counter

27     unsigned int  counter[CHACHA_CTR_SIZE / 4];  member
50 key->counter[i/4] = CHACHA_U8TOU32(iv+i); in chacha_init_key()
76 key->counter[0]++; in chacha_cipher()
77 if (key->counter[0] == 0) in chacha_cipher()
78 key->counter[1]++; in chacha_cipher()
84 ctr32 = key->counter[0]; in chacha_cipher()
107 ChaCha20_ctr32(out, inp, blocks, key->key.d, key->counter); in chacha_cipher()
112 key->counter[0] = ctr32; in chacha_cipher()
113 if (ctr32 == 0) key->counter[1]++; in chacha_cipher()
119 key->key.d, key->counter); in chacha_cipher()
192 actx->nonce[0] = actx->key.counter[1]; in chacha20_poly1305_init_key()
193 actx->nonce[1] = actx->key.counter[2]; in chacha20_poly1305_init_key()
194 actx->nonce[2] = actx->key.counter[3]; in chacha20_poly1305_init_key()
230 actx->key.counter[0] = 0; in chacha20_poly1305_tls_cipher()
233 actx->key.counter); in chacha20_poly1305_tls_cipher()
256 actx->key.counter[0] = 0; in chacha20_poly1305_tls_cipher()
258 actx->key.key.d, actx->key.counter); in chacha20_poly1305_tls_cipher()
288 actx->key.counter[0] = 0; in chacha20_poly1305_tls_cipher()
290 actx->key.key.d, actx->key.counter); in chacha20_poly1305_tls_cipher()
292 actx->key.counter[0] = 1; in chacha20_poly1305_tls_cipher()
301 ChaCha20_ctr32(out, in, plen, actx->key.key.d, actx->key.counter); in chacha20_poly1305_tls_cipher()
305 ChaCha20_ctr32(out, in, plen, actx->key.key.d, actx->key.counter); in chacha20_poly1305_tls_cipher()
375 actx->key.counter[0] = 0; in chacha20_poly1305_cipher()
377 actx->key.key.d, actx->key.counter); in chacha20_poly1305_cipher()
379 actx->key.counter[0] = 1; in chacha20_poly1305_cipher()
546 actx->nonce[0] = actx->key.counter[1] in chacha20_poly1305_ctrl()
548 actx->nonce[1] = actx->key.counter[2] in chacha20_poly1305_ctrl()
550 actx->nonce[2] = actx->key.counter[3] in chacha20_poly1305_ctrl()
593 actx->key.counter[1] = actx->nonce[0]; in chacha20_poly1305_ctrl()
594 actx->key.counter[2] = actx->nonce[1] ^ CHACHA_U8TOU32(aad); in chacha20_poly1305_ctrl()
595 actx->key.counter[3] = actx->nonce[2] ^ CHACHA_U8TOU32(aad+4); in chacha20_poly1305_ctrl()