Lines Matching refs:counter

37     ctx->chacha.counter[1] = ctx->nonce[0];  in chacha_poly1305_tls_init()
38 ctx->chacha.counter[2] = ctx->nonce[1] ^ CHACHA_U8TOU32(aad); in chacha_poly1305_tls_init()
39 ctx->chacha.counter[3] = ctx->nonce[2] ^ CHACHA_U8TOU32(aad+4); in chacha_poly1305_tls_init()
52 ctx->nonce[0] = ctx->chacha.counter[1] = CHACHA_U8TOU32(fixed); in chacha_poly1305_tls_iv_set_fixed()
53 ctx->nonce[1] = ctx->chacha.counter[2] = CHACHA_U8TOU32(fixed + 4); in chacha_poly1305_tls_iv_set_fixed()
54 ctx->nonce[2] = ctx->chacha.counter[3] = CHACHA_U8TOU32(fixed + 8); in chacha_poly1305_tls_iv_set_fixed()
98 ctx->nonce[0] = ctx->chacha.counter[1]; in chacha20_poly1305_initiv()
99 ctx->nonce[1] = ctx->chacha.counter[2]; in chacha20_poly1305_initiv()
100 ctx->nonce[2] = ctx->chacha.counter[3]; in chacha20_poly1305_initiv()
135 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher()
137 ChaCha20_ctr32(buf, zero, buf_len, ctx->chacha.key.d, ctx->chacha.counter); in chacha20_poly1305_tls_cipher()
160 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher()
162 ctx->chacha.key.d, ctx->chacha.counter); in chacha20_poly1305_tls_cipher()
192 ctx->chacha.counter[0] = 0; in chacha20_poly1305_tls_cipher()
194 ctx->chacha.key.d, ctx->chacha.counter); in chacha20_poly1305_tls_cipher()
196 ctx->chacha.counter[0] = 1; in chacha20_poly1305_tls_cipher()
205 ChaCha20_ctr32(out, in, plen, ctx->chacha.key.d, ctx->chacha.counter); in chacha20_poly1305_tls_cipher()
209 ChaCha20_ctr32(out, in, plen, ctx->chacha.key.d, ctx->chacha.counter); in chacha20_poly1305_tls_cipher()
288 ctx->chacha.counter[0] = 0; in chacha20_poly1305_aead_cipher()
290 ctx->chacha.key.d, ctx->chacha.counter); in chacha20_poly1305_aead_cipher()
292 ctx->chacha.counter[0] = 1; in chacha20_poly1305_aead_cipher()