Lines Matching refs:prot
249 tls_advance_record_sn(struct sock *sk, struct tls_prot_info *prot, in tls_advance_record_sn() argument
252 if (tls_bigint_increment(ctx->rec_seq, prot->rec_seq_size)) in tls_advance_record_sn()
255 if (prot->version != TLS_1_3_VERSION && in tls_advance_record_sn()
256 prot->cipher_type != TLS_CIPHER_CHACHA20_POLY1305) in tls_advance_record_sn()
257 tls_bigint_increment(ctx->iv + prot->salt_size, in tls_advance_record_sn()
258 prot->iv_size); in tls_advance_record_sn()
262 tls_xor_iv_with_seq(struct tls_prot_info *prot, char *iv, char *seq) in tls_xor_iv_with_seq() argument
266 if (prot->version == TLS_1_3_VERSION || in tls_xor_iv_with_seq()
267 prot->cipher_type == TLS_CIPHER_CHACHA20_POLY1305) { in tls_xor_iv_with_seq()
277 struct tls_prot_info *prot = &ctx->prot_info; in tls_fill_prepend() local
278 size_t pkt_len, iv_size = prot->iv_size; in tls_fill_prepend()
280 pkt_len = plaintext_len + prot->tag_size; in tls_fill_prepend()
281 if (prot->version != TLS_1_3_VERSION && in tls_fill_prepend()
282 prot->cipher_type != TLS_CIPHER_CHACHA20_POLY1305) { in tls_fill_prepend()
286 ctx->tx.iv + prot->salt_size, iv_size); in tls_fill_prepend()
292 buf[0] = prot->version == TLS_1_3_VERSION ? in tls_fill_prepend()
304 unsigned char record_type, struct tls_prot_info *prot) in tls_make_aad() argument
306 if (prot->version != TLS_1_3_VERSION) { in tls_make_aad()
307 memcpy(buf, record_sequence, prot->rec_seq_size); in tls_make_aad()
310 size += prot->tag_size; in tls_make_aad()
313 buf[0] = prot->version == TLS_1_3_VERSION ? in tls_make_aad()