Lines Matching refs:ctr

125     unsigned char *buf, *tohash, *ctr, storage[sizeof(zero) + 32];  in chacha20_poly1305_tls_cipher()  local
130 ctr = buf + CHACHA_BLK_SIZE; in chacha20_poly1305_tls_cipher()
147 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher()
149 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher()
153 tohash_len = (size_t)(ctr - tohash); in chacha20_poly1305_tls_cipher()
172 out[i] = ctr[i] ^= in[i]; in chacha20_poly1305_tls_cipher()
177 out[i] = ctr[i] ^ c; in chacha20_poly1305_tls_cipher()
178 ctr[i] = c; in chacha20_poly1305_tls_cipher()
186 memset(ctr + i, 0, tail); in chacha20_poly1305_tls_cipher()
187 ctr += i + tail; in chacha20_poly1305_tls_cipher()
199 tohash = ctr; in chacha20_poly1305_tls_cipher()
219 memcpy(ctr, (unsigned char *)&ctx->len, POLY1305_BLOCK_SIZE); in chacha20_poly1305_tls_cipher()
221 ctr[0] = (unsigned char)(ctx->len.aad); in chacha20_poly1305_tls_cipher()
222 ctr[1] = (unsigned char)(ctx->len.aad>>8); in chacha20_poly1305_tls_cipher()
223 ctr[2] = (unsigned char)(ctx->len.aad>>16); in chacha20_poly1305_tls_cipher()
224 ctr[3] = (unsigned char)(ctx->len.aad>>24); in chacha20_poly1305_tls_cipher()
225 ctr[4] = (unsigned char)(ctx->len.aad>>32); in chacha20_poly1305_tls_cipher()
226 ctr[5] = (unsigned char)(ctx->len.aad>>40); in chacha20_poly1305_tls_cipher()
227 ctr[6] = (unsigned char)(ctx->len.aad>>48); in chacha20_poly1305_tls_cipher()
228 ctr[7] = (unsigned char)(ctx->len.aad>>56); in chacha20_poly1305_tls_cipher()
230 ctr[8] = (unsigned char)(ctx->len.text); in chacha20_poly1305_tls_cipher()
231 ctr[9] = (unsigned char)(ctx->len.text>>8); in chacha20_poly1305_tls_cipher()
232 ctr[10] = (unsigned char)(ctx->len.text>>16); in chacha20_poly1305_tls_cipher()
233 ctr[11] = (unsigned char)(ctx->len.text>>24); in chacha20_poly1305_tls_cipher()
234 ctr[12] = (unsigned char)(ctx->len.text>>32); in chacha20_poly1305_tls_cipher()
235 ctr[13] = (unsigned char)(ctx->len.text>>40); in chacha20_poly1305_tls_cipher()
236 ctr[14] = (unsigned char)(ctx->len.text>>48); in chacha20_poly1305_tls_cipher()
237 ctr[15] = (unsigned char)(ctx->len.text>>56); in chacha20_poly1305_tls_cipher()