/linux-6.1.9/net/tipc/ |
D | crypto.c | 206 struct tipc_aead __rcu *aead[KEY_MAX + 1]; member 240 struct tipc_aead *aead; member 247 struct tipc_aead *aead; member 251 static struct tipc_aead *tipc_aead_get(struct tipc_aead __rcu *aead); 252 static inline void tipc_aead_put(struct tipc_aead *aead); 254 static int tipc_aead_users(struct tipc_aead __rcu *aead); 255 static void tipc_aead_users_inc(struct tipc_aead __rcu *aead, int lim); 256 static void tipc_aead_users_dec(struct tipc_aead __rcu *aead, int lim); 257 static void tipc_aead_users_set(struct tipc_aead __rcu *aead, int val); 258 static struct crypto_aead *tipc_aead_tfm_next(struct tipc_aead *aead); [all …]
|
/linux-6.1.9/crypto/ |
D | aead.c | 85 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_aead_encrypt() local 86 struct crypto_alg *alg = aead->base.__crt_alg; in crypto_aead_encrypt() 91 if (crypto_aead_get_flags(aead) & CRYPTO_TFM_NEED_KEY) in crypto_aead_encrypt() 94 ret = crypto_aead_alg(aead)->encrypt(req); in crypto_aead_encrypt() 102 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_aead_decrypt() local 103 struct crypto_alg *alg = aead->base.__crt_alg; in crypto_aead_decrypt() 108 if (crypto_aead_get_flags(aead) & CRYPTO_TFM_NEED_KEY) in crypto_aead_decrypt() 110 else if (req->cryptlen < crypto_aead_authsize(aead)) in crypto_aead_decrypt() 113 ret = crypto_aead_alg(aead)->decrypt(req); in crypto_aead_decrypt() 121 struct crypto_aead *aead = __crypto_aead_cast(tfm); in crypto_aead_exit_tfm() local [all …]
|
D | algif_aead.c | 40 struct crypto_aead *aead; member 51 struct crypto_aead *tfm = aeadc->aead; in aead_sufficient_data() 68 struct crypto_aead *tfm = aeadc->aead; in aead_sendmsg() 97 struct crypto_aead *tfm = aeadc->aead; in _aead_recvmsg() 395 if (crypto_aead_get_flags(tfm->aead) & CRYPTO_TFM_NEED_KEY) in aead_check_key() 470 struct crypto_aead *aead; in aead_bind() local 477 aead = crypto_alloc_aead(name, type, mask); in aead_bind() 478 if (IS_ERR(aead)) { in aead_bind() 480 return ERR_CAST(aead); in aead_bind() 485 crypto_free_aead(aead); in aead_bind() [all …]
|
D | gcm.c | 44 struct crypto_aead_spawn aead; member 92 static int crypto_gcm_setkey(struct crypto_aead *aead, const u8 *key, in crypto_gcm_setkey() argument 95 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); in crypto_gcm_setkey() 110 crypto_skcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_gcm_setkey() 138 crypto_ahash_set_flags(ghash, crypto_aead_get_flags(aead) & in crypto_gcm_setkey() 180 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_gcm_init_crypt() local 181 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); in crypto_gcm_init_crypt() 414 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_enc_copy_hash() local 420 crypto_aead_authsize(aead), 1); in gcm_enc_copy_hash() 468 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_gcm_verify() local [all …]
|
D | ccm.c | 87 static int crypto_ccm_setkey(struct crypto_aead *aead, const u8 *key, in crypto_ccm_setkey() argument 90 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_setkey() 96 crypto_skcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_ccm_setkey() 103 crypto_ahash_set_flags(mac, crypto_aead_get_flags(aead) & in crypto_ccm_setkey() 130 struct crypto_aead *aead = crypto_aead_reqtfm(req); in format_input() local 135 m = crypto_aead_authsize(aead); in format_input() 172 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_ccm_auth() local 173 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_auth() 230 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_ccm_encrypt_done() local 237 crypto_aead_authsize(aead), 1); in crypto_ccm_encrypt_done() [all …]
|
D | essiv.c | 53 struct crypto_aead *aead; member 102 crypto_aead_clear_flags(tctx->u.aead, CRYPTO_TFM_REQ_MASK); in essiv_aead_setkey() 103 crypto_aead_set_flags(tctx->u.aead, crypto_aead_get_flags(tfm) & in essiv_aead_setkey() 105 err = crypto_aead_setkey(tctx->u.aead, key, keylen); in essiv_aead_setkey() 131 return crypto_aead_setauthsize(tctx->u.aead, authsize); in essiv_aead_setauthsize() 241 aead_request_set_tfm(subreq, tctx->u.aead); in essiv_aead_crypt() 322 struct crypto_aead *aead; in essiv_aead_init_tfm() local 329 aead = crypto_spawn_aead(&ictx->u.aead_spawn); in essiv_aead_init_tfm() 330 if (IS_ERR(aead)) in essiv_aead_init_tfm() 331 return PTR_ERR(aead); in essiv_aead_init_tfm() [all …]
|
D | geniv.c | 109 int aead_init_geniv(struct crypto_aead *aead) in aead_init_geniv() argument 111 struct aead_geniv_ctx *ctx = crypto_aead_ctx(aead); in aead_init_geniv() 112 struct aead_instance *inst = aead_alg_instance(aead); in aead_init_geniv() 123 crypto_aead_ivsize(aead)); in aead_init_geniv() 139 crypto_aead_set_reqsize(aead, crypto_aead_reqsize(child) + in aead_init_geniv()
|
/linux-6.1.9/drivers/crypto/cavium/nitrox/ |
D | nitrox_aead.c | 33 static int nitrox_aes_gcm_setkey(struct crypto_aead *aead, const u8 *key, in nitrox_aes_gcm_setkey() argument 37 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aes_gcm_setkey() 58 static int nitrox_aead_setauthsize(struct crypto_aead *aead, in nitrox_aead_setauthsize() argument 61 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aead_setauthsize() 69 aead->authsize = authsize; in nitrox_aead_setauthsize() 74 static int nitrox_aes_gcm_setauthsize(struct crypto_aead *aead, in nitrox_aes_gcm_setauthsize() argument 90 return nitrox_aead_setauthsize(aead, authsize); in nitrox_aes_gcm_setauthsize() 215 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in nitrox_aes_gcm_enc() local 216 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aes_gcm_enc() 230 rctx->dstlen = rctx->srclen + aead->authsize; in nitrox_aes_gcm_enc() [all …]
|
/linux-6.1.9/drivers/crypto/xilinx/ |
D | zynqmp-aes-gcm.c | 46 struct aead_alg aead; member 79 struct crypto_aead *aead = crypto_aead_reqtfm(req); in zynqmp_aes_aead_cipher() local 80 struct zynqmp_aead_tfm_ctx *tfm_ctx = crypto_aead_ctx(aead); in zynqmp_aes_aead_cipher() 209 struct crypto_aead *aead = crypto_aead_reqtfm(req); in zynqmp_handle_aes_req() local 210 struct zynqmp_aead_tfm_ctx *tfm_ctx = crypto_aead_ctx(aead); in zynqmp_handle_aes_req() 238 static int zynqmp_aes_aead_setkey(struct crypto_aead *aead, const u8 *key, in zynqmp_aes_aead_setkey() argument 241 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in zynqmp_aes_aead_setkey() 264 tfm_ctx->fbk_cipher->base.crt_flags |= (aead->base.crt_flags & in zynqmp_aes_aead_setkey() 270 static int zynqmp_aes_aead_setauthsize(struct crypto_aead *aead, in zynqmp_aes_aead_setauthsize() argument 273 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in zynqmp_aes_aead_setauthsize() [all …]
|
/linux-6.1.9/net/ipv4/ |
D | esp4.c | 46 static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int extralen) in esp_alloc_tmp() argument 52 len += crypto_aead_ivsize(aead); in esp_alloc_tmp() 55 len += crypto_aead_alignmask(aead) & in esp_alloc_tmp() 60 len += sizeof(struct aead_request) + crypto_aead_reqsize(aead); in esp_alloc_tmp() 73 static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int extralen) in esp_tmp_iv() argument 75 return crypto_aead_ivsize(aead) ? in esp_tmp_iv() 77 crypto_aead_alignmask(aead) + 1) : tmp + extralen; in esp_tmp_iv() 80 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument 84 req = (void *)PTR_ALIGN(iv + crypto_aead_ivsize(aead), in esp_tmp_req() 86 aead_request_set_tfm(req, aead); in esp_tmp_req() [all …]
|
D | esp4_offload.c | 197 struct crypto_aead *aead; in esp4_gso_segment() local 210 aead = x->data; in esp4_gso_segment() 216 if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) in esp4_gso_segment() 219 __skb_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead)); in esp4_gso_segment() 239 struct crypto_aead *aead = x->data; in esp_input_tail() local 242 if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead))) in esp_input_tail() 258 struct crypto_aead *aead; in esp_xmit() local 281 aead = x->data; in esp_xmit() 282 alen = crypto_aead_authsize(aead); in esp_xmit() 287 blksize = ALIGN(crypto_aead_blocksize(aead), 4); in esp_xmit()
|
/linux-6.1.9/net/ipv6/ |
D | esp6.c | 63 static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int seqihlen) in esp_alloc_tmp() argument 69 len += crypto_aead_ivsize(aead); in esp_alloc_tmp() 72 len += crypto_aead_alignmask(aead) & in esp_alloc_tmp() 77 len += sizeof(struct aead_request) + crypto_aead_reqsize(aead); in esp_alloc_tmp() 90 static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int seqhilen) in esp_tmp_iv() argument 92 return crypto_aead_ivsize(aead) ? in esp_tmp_iv() 94 crypto_aead_alignmask(aead) + 1) : tmp + seqhilen; in esp_tmp_iv() 97 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument 101 req = (void *)PTR_ALIGN(iv + crypto_aead_ivsize(aead), in esp_tmp_req() 103 aead_request_set_tfm(req, aead); in esp_tmp_req() [all …]
|
D | esp6_offload.c | 236 struct crypto_aead *aead; in esp6_gso_segment() local 249 aead = x->data; in esp6_gso_segment() 255 if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) in esp6_gso_segment() 258 __skb_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead)); in esp6_gso_segment() 276 struct crypto_aead *aead = x->data; in esp6_input_tail() local 279 if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead))) in esp6_input_tail() 295 struct crypto_aead *aead; in esp6_xmit() local 316 aead = x->data; in esp6_xmit() 317 alen = crypto_aead_authsize(aead); in esp6_xmit() 322 blksize = ALIGN(crypto_aead_blocksize(aead), 4); in esp6_xmit()
|
/linux-6.1.9/drivers/crypto/caam/ |
D | caamalg.c | 92 struct aead_alg aead; member 132 static int aead_null_set_sh_desc(struct crypto_aead *aead) in aead_null_set_sh_desc() argument 134 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_null_set_sh_desc() 182 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument 184 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc() 185 struct caam_aead_alg, aead); in aead_set_sh_desc() 186 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc() 187 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_set_sh_desc() 203 return aead_null_set_sh_desc(aead); in aead_set_sh_desc() 323 static int gcm_set_sh_desc(struct crypto_aead *aead) in gcm_set_sh_desc() argument [all …]
|
D | caamalg_qi.c | 45 struct aead_alg aead; member 80 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument 82 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc() 83 typeof(*alg), aead); in aead_set_sh_desc() 84 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_set_sh_desc() 85 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc() 195 static int aead_setkey(struct crypto_aead *aead, const u8 *key, in aead_setkey() argument 198 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_setkey() 253 ret = aead_set_sh_desc(aead); in aead_setkey() 283 static int des3_aead_setkey(struct crypto_aead *aead, const u8 *key, in des3_aead_setkey() argument [all …]
|
D | caamalg_qi2.c | 52 struct aead_alg aead; member 170 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument 172 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc() 173 typeof(*alg), aead); in aead_set_sh_desc() 174 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_set_sh_desc() 175 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc() 287 static int aead_setkey(struct crypto_aead *aead, const u8 *key, in aead_setkey() argument 290 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_setkey() 321 return aead_set_sh_desc(aead); in aead_setkey() 327 static int des3_aead_setkey(struct crypto_aead *aead, const u8 *key, in des3_aead_setkey() argument [all …]
|
/linux-6.1.9/Documentation/crypto/ |
D | api-aead.rst | 4 .. kernel-doc:: include/crypto/aead.h 7 .. kernel-doc:: include/crypto/aead.h 13 .. kernel-doc:: include/crypto/aead.h 19 .. kernel-doc:: include/crypto/aead.h 22 .. kernel-doc:: include/crypto/aead.h
|
/linux-6.1.9/arch/arm64/crypto/ |
D | aes-ce-ccm-glue.c | 61 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_init_mac() local 89 maciv[0] |= (crypto_aead_authsize(aead) - 2) << 2; in ccm_init_mac() 99 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_calculate_auth_mac() local 100 struct crypto_aes_ctx *ctx = crypto_aead_ctx(aead); in ccm_calculate_auth_mac() 148 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_encrypt() local 149 struct crypto_aes_ctx *ctx = crypto_aead_ctx(aead); in ccm_encrypt() 198 crypto_aead_authsize(aead), 1); in ccm_encrypt() 205 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_decrypt() local 206 struct crypto_aes_ctx *ctx = crypto_aead_ctx(aead); in ccm_decrypt() 207 unsigned int authsize = crypto_aead_authsize(aead); in ccm_decrypt()
|
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
D | ipsec.c | 139 struct crypto_aead *aead; in mlx5e_ipsec_build_accel_xfrm_attrs() local 146 crypto_data_len = (x->aead->alg_key_len + 7) / 8; in mlx5e_ipsec_build_accel_xfrm_attrs() 149 memcpy(aes_gcm->aes_key, x->aead->alg_key, key_len); in mlx5e_ipsec_build_accel_xfrm_attrs() 153 aead = x->data; in mlx5e_ipsec_build_accel_xfrm_attrs() 154 geniv_ctx = crypto_aead_ctx(aead); in mlx5e_ipsec_build_accel_xfrm_attrs() 155 ivsize = crypto_aead_ivsize(aead); in mlx5e_ipsec_build_accel_xfrm_attrs() 157 memcpy(&aes_gcm->salt, x->aead->alg_key + key_len, in mlx5e_ipsec_build_accel_xfrm_attrs() 161 aes_gcm->icv_len = x->aead->alg_icv_len; in mlx5e_ipsec_build_accel_xfrm_attrs() 231 if (!x->aead) { in mlx5e_xfrm_validate_state() 235 if (x->aead->alg_icv_len != 128) { in mlx5e_xfrm_validate_state() [all …]
|
/linux-6.1.9/net/xfrm/ |
D | xfrm_algo.c | 31 .aead = { 50 .aead = { 69 .aead = { 88 .aead = { 107 .aead = { 126 .aead = { 145 .aead = { 164 .aead = { 775 const struct xfrm_aead_name *aead = data; in xfrm_aead_name_match() local 776 const char *name = aead->name; in xfrm_aead_name_match() [all …]
|
/linux-6.1.9/include/crypto/internal/ |
D | aead.h | 53 static inline struct aead_instance *aead_alg_instance(struct crypto_aead *aead) in aead_alg_instance() argument 55 return aead_instance(crypto_tfm_alg_instance(&aead->base)); in aead_alg_instance() 105 static inline void crypto_aead_set_reqsize(struct crypto_aead *aead, in crypto_aead_set_reqsize() argument 108 aead->reqsize = reqsize; in crypto_aead_set_reqsize()
|
/linux-6.1.9/drivers/crypto/inside-secure/ |
D | safexcel_cipher.c | 51 u8 aead; /* !=0=AEAD, 2=IPSec ESP AEAD, 3=IPsec ESP GMAC */ member 138 ctx->aead & EIP197_AEAD_TYPE_IPSEC_ESP) { /* _ESP and _ESP_GMAC */ in safexcel_aead_iv() 182 if (ctx->aead == EIP197_AEAD_TYPE_IPSEC_ESP) { in safexcel_aead_token() 264 if (ctx->aead == EIP197_AEAD_TYPE_IPSEC_ESP) { in safexcel_aead_token() 308 if (unlikely(ctx->aead == EIP197_AEAD_TYPE_IPSEC_ESP_GMAC)) { in safexcel_aead_token() 515 if (ctx->aead) { in safexcel_context_control() 546 ctx->aead == EIP197_AEAD_TYPE_IPSEC_ESP_GMAC)) in safexcel_context_control() 659 if ((!ctx->aead) && (ctx->mode == CONTEXT_CONTROL_CRYPTO_MODE_CBC) && in safexcel_handle_req_result() 698 if (ctx->aead) { in safexcel_send_req() 820 if (ctx->aead) in safexcel_send_req() [all …]
|
/linux-6.1.9/arch/x86/crypto/ |
D | aegis128-aesni-glue.c | 135 static struct aegis_ctx *crypto_aegis128_aesni_ctx(struct crypto_aead *aead) in crypto_aegis128_aesni_ctx() argument 137 u8 *ctx = crypto_aead_ctx(aead); in crypto_aegis128_aesni_ctx() 142 static int crypto_aegis128_aesni_setkey(struct crypto_aead *aead, const u8 *key, in crypto_aegis128_aesni_setkey() argument 145 struct aegis_ctx *ctx = crypto_aegis128_aesni_ctx(aead); in crypto_aegis128_aesni_setkey() 230 static int crypto_aegis128_aesni_init_tfm(struct crypto_aead *aead) in crypto_aegis128_aesni_init_tfm() argument 235 static void crypto_aegis128_aesni_exit_tfm(struct crypto_aead *aead) in crypto_aegis128_aesni_exit_tfm() argument
|
/linux-6.1.9/drivers/net/netdevsim/ |
D | ipsec.c | 93 if (!xs->aead) { in nsim_ipsec_parse_proto_keys() 98 if (xs->aead->alg_icv_len != NSIM_IPSEC_AUTH_BITS) { in nsim_ipsec_parse_proto_keys() 104 key_data = &xs->aead->alg_key[0]; in nsim_ipsec_parse_proto_keys() 105 key_len = xs->aead->alg_key_len; in nsim_ipsec_parse_proto_keys() 106 alg_name = xs->aead->alg_name; in nsim_ipsec_parse_proto_keys() 165 sa.crypt = xs->ealg || xs->aead; in nsim_ipsec_add_sa()
|
/linux-6.1.9/tools/testing/selftests/net/ |
D | l2tp.sh | 252 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \ 257 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \ 262 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \ 267 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \ 291 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \ 296 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \ 301 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \ 306 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \
|