Lines Matching refs:prot
304 tls_advance_record_sn(struct sock *sk, struct tls_prot_info *prot, in tls_advance_record_sn() argument
307 if (tls_bigint_increment(ctx->rec_seq, prot->rec_seq_size)) in tls_advance_record_sn()
310 if (prot->version != TLS_1_3_VERSION && in tls_advance_record_sn()
311 prot->cipher_type != TLS_CIPHER_CHACHA20_POLY1305) in tls_advance_record_sn()
312 tls_bigint_increment(ctx->iv + prot->salt_size, in tls_advance_record_sn()
313 prot->iv_size); in tls_advance_record_sn()
317 tls_xor_iv_with_seq(struct tls_prot_info *prot, char *iv, char *seq) in tls_xor_iv_with_seq() argument
321 if (prot->version == TLS_1_3_VERSION || in tls_xor_iv_with_seq()
322 prot->cipher_type == TLS_CIPHER_CHACHA20_POLY1305) { in tls_xor_iv_with_seq()
332 struct tls_prot_info *prot = &ctx->prot_info; in tls_fill_prepend() local
333 size_t pkt_len, iv_size = prot->iv_size; in tls_fill_prepend()
335 pkt_len = plaintext_len + prot->tag_size; in tls_fill_prepend()
336 if (prot->version != TLS_1_3_VERSION && in tls_fill_prepend()
337 prot->cipher_type != TLS_CIPHER_CHACHA20_POLY1305) { in tls_fill_prepend()
341 ctx->tx.iv + prot->salt_size, iv_size); in tls_fill_prepend()
347 buf[0] = prot->version == TLS_1_3_VERSION ? in tls_fill_prepend()
359 unsigned char record_type, struct tls_prot_info *prot) in tls_make_aad() argument
361 if (prot->version != TLS_1_3_VERSION) { in tls_make_aad()
362 memcpy(buf, record_sequence, prot->rec_seq_size); in tls_make_aad()
365 size += prot->tag_size; in tls_make_aad()
368 buf[0] = prot->version == TLS_1_3_VERSION ? in tls_make_aad()