Lines Matching refs:prot

145 int init_prot_info(struct tls_prot_info *prot,
308 tls_advance_record_sn(struct sock *sk, struct tls_prot_info *prot, in tls_advance_record_sn() argument
311 if (tls_bigint_increment(ctx->rec_seq, prot->rec_seq_size)) in tls_advance_record_sn()
314 if (prot->version != TLS_1_3_VERSION && in tls_advance_record_sn()
315 prot->cipher_type != TLS_CIPHER_CHACHA20_POLY1305) in tls_advance_record_sn()
316 tls_bigint_increment(ctx->iv + prot->salt_size, in tls_advance_record_sn()
317 prot->iv_size); in tls_advance_record_sn()
321 tls_xor_iv_with_seq(struct tls_prot_info *prot, char *iv, char *seq) in tls_xor_iv_with_seq() argument
325 if (prot->version == TLS_1_3_VERSION || in tls_xor_iv_with_seq()
326 prot->cipher_type == TLS_CIPHER_CHACHA20_POLY1305) { in tls_xor_iv_with_seq()
336 struct tls_prot_info *prot = &ctx->prot_info; in tls_fill_prepend() local
337 size_t pkt_len, iv_size = prot->iv_size; in tls_fill_prepend()
339 pkt_len = plaintext_len + prot->tag_size; in tls_fill_prepend()
340 if (prot->version != TLS_1_3_VERSION && in tls_fill_prepend()
341 prot->cipher_type != TLS_CIPHER_CHACHA20_POLY1305) { in tls_fill_prepend()
345 ctx->tx.iv + prot->salt_size, iv_size); in tls_fill_prepend()
351 buf[0] = prot->version == TLS_1_3_VERSION ? in tls_fill_prepend()
363 unsigned char record_type, struct tls_prot_info *prot) in tls_make_aad() argument
365 if (prot->version != TLS_1_3_VERSION) { in tls_make_aad()
366 memcpy(buf, record_sequence, prot->rec_seq_size); in tls_make_aad()
369 size += prot->tag_size; in tls_make_aad()
372 buf[0] = prot->version == TLS_1_3_VERSION ? in tls_make_aad()