Searched refs:cipher_desc (Results 1 – 5 of 5) sorted by relevance
/linux/net/tls/ |
H A D | tls_device_fallback.c | 59 const struct tls_cipher_desc *cipher_desc; in tls_enc_record() local 66 cipher_desc = get_cipher_desc(prot->cipher_type); in tls_enc_record() 67 DEBUG_NET_WARN_ON_ONCE(!cipher_desc || !cipher_desc->offloadable); in tls_enc_record() 69 buf_size = TLS_HEADER_SIZE + cipher_desc->iv; in tls_enc_record() 83 len -= cipher_desc->iv; in tls_enc_record() 85 tls_make_aad(aad, len - cipher_desc->tag, (char *)&rcd_sn, buf[0], prot); in tls_enc_record() 87 memcpy(iv + cipher_desc->salt, buf + TLS_HEADER_SIZE, cipher_desc->iv); in tls_enc_record() 98 *in_len += cipher_desc->tag; in tls_enc_record() 119 len -= cipher_desc->tag; in tls_enc_record() 307 const struct tls_cipher_desc *cipher_desc = in fill_sg_out() local [all …]
|
H A D | tls.h | 83 const struct tls_cipher_desc *cipher_desc) in crypto_info_iv() argument 85 return (char *)crypto_info + cipher_desc->iv_offset; in crypto_info_iv() 89 const struct tls_cipher_desc *cipher_desc) in crypto_info_key() argument 91 return (char *)crypto_info + cipher_desc->key_offset; in crypto_info_key() 95 const struct tls_cipher_desc *cipher_desc) in crypto_info_salt() argument 97 return (char *)crypto_info + cipher_desc->salt_offset; in crypto_info_salt() 101 const struct tls_cipher_desc *cipher_desc) in crypto_info_rec_seq() argument 103 return (char *)crypto_info + cipher_desc->rec_seq_offset; in crypto_info_rec_seq() 147 const struct tls_cipher_desc *cipher_desc);
|
H A D | tls_device.c | 881 const struct tls_cipher_desc *cipher_desc; in tls_device_reencrypt() local 888 cipher_desc = get_cipher_desc(tls_ctx->crypto_recv.info.cipher_type); in tls_device_reencrypt() 889 DEBUG_NET_WARN_ON_ONCE(!cipher_desc || !cipher_desc->offloadable); in tls_device_reencrypt() 892 orig_buf = kmalloc(rxm->full_len + TLS_HEADER_SIZE + cipher_desc->iv, in tls_device_reencrypt() 908 rxm->full_len + TLS_HEADER_SIZE + cipher_desc->iv); in tls_device_reencrypt() 909 err = skb_copy_bits(skb, offset, buf, TLS_HEADER_SIZE + cipher_desc->iv); in tls_device_reencrypt() 920 data_len = rxm->full_len - cipher_desc->tag; in tls_device_reencrypt() 1061 const struct tls_cipher_desc *cipher_desc; in tls_set_device_offload() local 1092 cipher_desc = get_cipher_desc(crypto_info->cipher_type); in tls_set_device_offload() 1093 if (!cipher_desc || !cipher_desc->offloadable) { in tls_set_device_offload() [all …]
|
H A D | tls_main.c | 441 const struct tls_cipher_desc *cipher_desc; in do_tls_getsockopt_conf() local 480 cipher_desc = get_cipher_desc(crypto_info->cipher_type); in do_tls_getsockopt_conf() 481 if (!cipher_desc || len != cipher_desc->crypto_info) { in do_tls_getsockopt_conf() 486 memcpy(crypto_info_iv(crypto_info, cipher_desc), in do_tls_getsockopt_conf() 487 cctx->iv + cipher_desc->salt, cipher_desc->iv); in do_tls_getsockopt_conf() 488 memcpy(crypto_info_rec_seq(crypto_info, cipher_desc), in do_tls_getsockopt_conf() 489 cctx->rec_seq, cipher_desc->rec_seq); in do_tls_getsockopt_conf() 491 if (copy_to_user(optval, crypto_info, cipher_desc->crypto_info)) in do_tls_getsockopt_conf() 618 const struct tls_cipher_desc *cipher_desc; in do_tls_setsockopt_conf() local 650 cipher_desc = get_cipher_desc(crypto_info->cipher_type); in do_tls_setsockopt_conf() [all …]
|
H A D | tls_sw.c | 2658 const struct tls_cipher_desc *cipher_desc) in init_prot_info() argument 2660 u16 nonce_size = cipher_desc->nonce; in init_prot_info() 2678 prot->tag_size = cipher_desc->tag; in init_prot_info() 2680 prot->iv_size = cipher_desc->iv; in init_prot_info() 2681 prot->salt_size = cipher_desc->salt; in init_prot_info() 2682 prot->rec_seq_size = cipher_desc->rec_seq; in init_prot_info() 2691 const struct tls_cipher_desc *cipher_desc; in tls_set_sw_offload() local 2724 cipher_desc = get_cipher_desc(crypto_info->cipher_type); in tls_set_sw_offload() 2725 if (!cipher_desc) { in tls_set_sw_offload() 2730 rc = init_prot_info(prot, crypto_info, cipher_desc); in tls_set_sw_offload() [all …]
|