Lines Matching refs:prot
251 tls_advance_record_sn(struct sock *sk, struct tls_prot_info *prot, in tls_advance_record_sn() argument
254 if (tls_bigint_increment(ctx->rec_seq, prot->rec_seq_size)) in tls_advance_record_sn()
257 if (prot->version != TLS_1_3_VERSION && in tls_advance_record_sn()
258 prot->cipher_type != TLS_CIPHER_CHACHA20_POLY1305) in tls_advance_record_sn()
259 tls_bigint_increment(ctx->iv + prot->salt_size, in tls_advance_record_sn()
260 prot->iv_size); in tls_advance_record_sn()
264 tls_xor_iv_with_seq(struct tls_prot_info *prot, char *iv, char *seq) in tls_xor_iv_with_seq() argument
268 if (prot->version == TLS_1_3_VERSION || in tls_xor_iv_with_seq()
269 prot->cipher_type == TLS_CIPHER_CHACHA20_POLY1305) { in tls_xor_iv_with_seq()
279 struct tls_prot_info *prot = &ctx->prot_info; in tls_fill_prepend() local
280 size_t pkt_len, iv_size = prot->iv_size; in tls_fill_prepend()
282 pkt_len = plaintext_len + prot->tag_size; in tls_fill_prepend()
283 if (prot->version != TLS_1_3_VERSION && in tls_fill_prepend()
284 prot->cipher_type != TLS_CIPHER_CHACHA20_POLY1305) { in tls_fill_prepend()
288 ctx->tx.iv + prot->salt_size, iv_size); in tls_fill_prepend()
294 buf[0] = prot->version == TLS_1_3_VERSION ? in tls_fill_prepend()
306 unsigned char record_type, struct tls_prot_info *prot) in tls_make_aad() argument
308 if (prot->version != TLS_1_3_VERSION) { in tls_make_aad()
309 memcpy(buf, record_sequence, prot->rec_seq_size); in tls_make_aad()
312 size += prot->tag_size; in tls_make_aad()
315 buf[0] = prot->version == TLS_1_3_VERSION ? in tls_make_aad()