Lines Matching refs:ctr

127     unsigned char *buf, *tohash, *ctr, storage[sizeof(zero) + 32];  in chacha20_poly1305_tls_cipher()  local
132 ctr = buf + CHACHA_BLK_SIZE; in chacha20_poly1305_tls_cipher()
149 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher()
151 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher()
155 tohash_len = (size_t)(ctr - tohash); in chacha20_poly1305_tls_cipher()
174 out[i] = ctr[i] ^= in[i]; in chacha20_poly1305_tls_cipher()
179 out[i] = ctr[i] ^ c; in chacha20_poly1305_tls_cipher()
180 ctr[i] = c; in chacha20_poly1305_tls_cipher()
188 memset(ctr + i, 0, tail); in chacha20_poly1305_tls_cipher()
189 ctr += i + tail; in chacha20_poly1305_tls_cipher()
201 tohash = ctr; in chacha20_poly1305_tls_cipher()
221 memcpy(ctr, (unsigned char *)&ctx->len, POLY1305_BLOCK_SIZE); in chacha20_poly1305_tls_cipher()
223 ctr[0] = (unsigned char)(ctx->len.aad); in chacha20_poly1305_tls_cipher()
224 ctr[1] = (unsigned char)(ctx->len.aad>>8); in chacha20_poly1305_tls_cipher()
225 ctr[2] = (unsigned char)(ctx->len.aad>>16); in chacha20_poly1305_tls_cipher()
226 ctr[3] = (unsigned char)(ctx->len.aad>>24); in chacha20_poly1305_tls_cipher()
227 ctr[4] = (unsigned char)(ctx->len.aad>>32); in chacha20_poly1305_tls_cipher()
228 ctr[5] = (unsigned char)(ctx->len.aad>>40); in chacha20_poly1305_tls_cipher()
229 ctr[6] = (unsigned char)(ctx->len.aad>>48); in chacha20_poly1305_tls_cipher()
230 ctr[7] = (unsigned char)(ctx->len.aad>>56); in chacha20_poly1305_tls_cipher()
232 ctr[8] = (unsigned char)(ctx->len.text); in chacha20_poly1305_tls_cipher()
233 ctr[9] = (unsigned char)(ctx->len.text>>8); in chacha20_poly1305_tls_cipher()
234 ctr[10] = (unsigned char)(ctx->len.text>>16); in chacha20_poly1305_tls_cipher()
235 ctr[11] = (unsigned char)(ctx->len.text>>24); in chacha20_poly1305_tls_cipher()
236 ctr[12] = (unsigned char)(ctx->len.text>>32); in chacha20_poly1305_tls_cipher()
237 ctr[13] = (unsigned char)(ctx->len.text>>40); in chacha20_poly1305_tls_cipher()
238 ctr[14] = (unsigned char)(ctx->len.text>>48); in chacha20_poly1305_tls_cipher()
239 ctr[15] = (unsigned char)(ctx->len.text>>56); in chacha20_poly1305_tls_cipher()