Lines Matching refs:cipher_desc

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
314 sg_set_buf(&sg_out[2], dummy_buf, cipher_desc->tag); in fill_sg_out()
326 const struct tls_cipher_desc *cipher_desc; in tls_enc_skb() local
336 cipher_desc = get_cipher_desc(tls_ctx->crypto_send.info.cipher_type); in tls_enc_skb()
337 DEBUG_NET_WARN_ON_ONCE(!cipher_desc || !cipher_desc->offloadable); in tls_enc_skb()
339 buf_len = cipher_desc->salt + cipher_desc->iv + TLS_AAD_SPACE_SIZE + in tls_enc_skb()
340 sync_size + cipher_desc->tag; in tls_enc_skb()
346 salt = crypto_info_salt(&tls_ctx->crypto_send.info, cipher_desc); in tls_enc_skb()
347 memcpy(iv, salt, cipher_desc->salt); in tls_enc_skb()
348 aad = buf + cipher_desc->salt + cipher_desc->iv; in tls_enc_skb()
462 const struct tls_cipher_desc *cipher_desc; in tls_sw_fallback_init() local
465 cipher_desc = get_cipher_desc(crypto_info->cipher_type); in tls_sw_fallback_init()
466 if (!cipher_desc || !cipher_desc->offloadable) in tls_sw_fallback_init()
470 crypto_alloc_aead(cipher_desc->cipher_name, 0, CRYPTO_ALG_ASYNC); in tls_sw_fallback_init()
479 crypto_info_key(crypto_info, cipher_desc), in tls_sw_fallback_init()
480 cipher_desc->key); in tls_sw_fallback_init()
484 rc = crypto_aead_setauthsize(offload_ctx->aead_send, cipher_desc->tag); in tls_sw_fallback_init()