/linux/net/tipc/ |
A D | crypto.c | 640 aead = kzalloc(sizeof(*aead), GFP_ATOMIC); in tipc_aead_clone() 821 tx_ctx->aead = aead; in tipc_aead_encrypt() 849 struct tipc_aead *aead = tx_ctx->aead; in tipc_aead_encrypt_done() local 946 rx_ctx->aead = aead; in tipc_aead_decrypt() 973 struct tipc_aead *aead = rx_ctx->aead; in tipc_aead_decrypt_done() local 1762 aead = tipc_aead_get(tx->aead[tx_key]); in tipc_crypto_xmit() 1917 aead->crypto->aead[1], aead->crypto->aead[2], in tipc_crypto_rcv_complete() 1918 aead->crypto->aead[3]); in tipc_crypto_rcv_complete() 2107 aead = rcu_dereference(c->aead[k]); in tipc_crypto_key_dump() 2210 aead = tipc_aead_get(tx->aead[key]); in tipc_crypto_key_distr() [all …]
|
/linux/crypto/ |
A D | aead.c | 86 struct crypto_alg *alg = aead->base.__crt_alg; in crypto_aead_encrypt() 94 ret = crypto_aead_alg(aead)->encrypt(req); in crypto_aead_encrypt() 113 ret = crypto_aead_alg(aead)->decrypt(req); in crypto_aead_decrypt() 122 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_exit_tfm() 124 alg->exit(aead); in crypto_aead_exit_tfm() 134 aead->authsize = alg->maxauthsize; in crypto_aead_init_tfm() 137 aead->base.exit = crypto_aead_exit_tfm; in crypto_aead_init_tfm() 140 return alg->init(aead); in crypto_aead_init_tfm() 157 raead.maxauthsize = aead->maxauthsize; in crypto_aead_report() 158 raead.ivsize = aead->ivsize; in crypto_aead_report() [all …]
|
A 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() 470 struct crypto_aead *aead; in aead_bind() local 478 if (IS_ERR(aead)) { in aead_bind() 480 return ERR_CAST(aead); in aead_bind() 485 crypto_free_aead(aead); in aead_bind() 490 tfm->aead = aead; in aead_bind() 500 crypto_free_aead(tfm->aead); in aead_release() [all …]
|
A D | gcm.c | 44 struct crypto_aead_spawn aead; member 794 struct crypto_aead *aead; in crypto_rfc4106_init_tfm() local 798 if (IS_ERR(aead)) in crypto_rfc4106_init_tfm() 799 return PTR_ERR(aead); in crypto_rfc4106_init_tfm() 801 ctx->child = aead; in crypto_rfc4106_init_tfm() 993 struct crypto_aead *aead; in crypto_rfc4543_init_tfm() local 999 if (IS_ERR(aead)) in crypto_rfc4543_init_tfm() 1000 return PTR_ERR(aead); in crypto_rfc4543_init_tfm() 1007 ctx->child = aead; in crypto_rfc4543_init_tfm() 1021 crypto_free_aead(aead); in crypto_rfc4543_init_tfm() [all …]
|
A D | ccm.c | 90 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(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() 237 crypto_aead_authsize(aead), 1); in crypto_ccm_encrypt_done() 319 crypto_aead_authsize(aead), 1); in crypto_ccm_encrypt() 673 struct crypto_aead *aead; in crypto_rfc4309_init_tfm() local 676 aead = crypto_spawn_aead(spawn); in crypto_rfc4309_init_tfm() 677 if (IS_ERR(aead)) in crypto_rfc4309_init_tfm() 678 return PTR_ERR(aead); in crypto_rfc4309_init_tfm() 680 ctx->child = aead; in crypto_rfc4309_init_tfm() [all …]
|
A D | essiv.c | 53 struct crypto_aead *aead; member 105 err = crypto_aead_setkey(tctx->u.aead, key, keylen); in essiv_aead_setkey() 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() 334 crypto_aead_reqsize(aead); in essiv_aead_init_tfm() 342 crypto_free_aead(aead); in essiv_aead_init_tfm() 346 tctx->u.aead = aead; in essiv_aead_init_tfm() [all …]
|
A 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/drivers/crypto/cavium/nitrox/ |
A D | nitrox_aead.c | 69 aead->authsize = authsize; in nitrox_aead_setauthsize() 90 return nitrox_aead_setauthsize(aead, authsize); in nitrox_aes_gcm_setauthsize() 230 rctx->dstlen = rctx->srclen + aead->authsize; in nitrox_aes_gcm_enc() 261 rctx->cryptlen = areq->cryptlen - aead->authsize; in nitrox_aes_gcm_dec() 264 rctx->dstlen = rctx->srclen - aead->authsize; in nitrox_aes_gcm_dec() 311 ret = nitrox_aead_init(aead); in nitrox_gcm_common_init() 330 ret = nitrox_gcm_common_init(aead); in nitrox_aes_gcm_init() 334 crypto_aead_set_reqsize(aead, in nitrox_aes_gcm_init() 370 ret = nitrox_aes_gcm_setkey(aead, key, keylen); in nitrox_rfc4106_setkey() 390 return nitrox_aead_setauthsize(aead, authsize); in nitrox_rfc4106_setauthsize() [all …]
|
/linux/drivers/crypto/xilinx/ |
A D | zynqmp-aes-gcm.c | 46 struct aead_alg aead; member 241 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in zynqmp_aes_aead_setkey() 273 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in zynqmp_aes_aead_setauthsize() 285 struct aead_alg *alg = crypto_aead_alg(aead); in zynqmp_aes_aead_encrypt() 298 struct aead_alg *alg = crypto_aead_alg(aead); in zynqmp_aes_aead_decrypt() 309 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in zynqmp_aes_aead_init() 313 struct aead_alg *alg = crypto_aead_alg(aead); in zynqmp_aes_aead_init() 332 crypto_aead_set_reqsize(aead, in zynqmp_aes_aead_init() 353 .alg.aead = { 416 crypto_unregister_aead(&aes_drv_ctx.alg.aead); in zynqmp_aes_aead_probe() [all …]
|
/linux/net/ipv6/ |
A D | esp6.c | 589 aead = x->data; in esp6_output_tail() 703 aead = x->data; in esp6_output() 1051 if (!aead) in esp6_destroy() 1070 if (IS_ERR(aead)) in esp_init_aead() 1073 x->data = aead; in esp_init_aead() 1075 err = crypto_aead_setkey(aead, x->aead->alg_key, in esp_init_aead() 1080 err = crypto_aead_setauthsize(aead, x->aead->alg_icv_len / 8); in esp_init_aead() 1125 if (IS_ERR(aead)) in esp_init_authenc() 1128 x->data = aead; in esp_init_authenc() 1189 if (x->aead) in esp6_init_state() [all …]
|
A D | esp6_offload.c | 230 struct crypto_aead *aead; in esp6_gso_segment() local 243 aead = x->data; in esp6_gso_segment() 249 if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) in esp6_gso_segment() 252 __skb_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead)); in esp6_gso_segment() 270 struct crypto_aead *aead = x->data; in esp6_input_tail() local 273 if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead))) in esp6_input_tail() 289 struct crypto_aead *aead; in esp6_xmit() local 310 aead = x->data; in esp6_xmit() 311 alen = crypto_aead_authsize(aead); in esp6_xmit() 316 blksize = ALIGN(crypto_aead_blocksize(aead), 4); in esp6_xmit()
|
/linux/net/ipv4/ |
A D | esp4.c | 553 aead = x->data; in esp_output_tail() 666 aead = x->data; in esp_output() 1008 if (!aead) in esp_destroy() 1027 if (IS_ERR(aead)) in esp_init_aead() 1030 x->data = aead; in esp_init_aead() 1032 err = crypto_aead_setkey(aead, x->aead->alg_key, in esp_init_aead() 1037 err = crypto_aead_setauthsize(aead, x->aead->alg_icv_len / 8); in esp_init_aead() 1082 if (IS_ERR(aead)) in esp_init_authenc() 1085 x->data = aead; in esp_init_authenc() 1146 if (x->aead) in esp_init_state() [all …]
|
A D | esp4_offload.c | 191 struct crypto_aead *aead; in esp4_gso_segment() local 204 aead = x->data; in esp4_gso_segment() 210 if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) in esp4_gso_segment() 213 __skb_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead)); in esp4_gso_segment() 233 struct crypto_aead *aead = x->data; in esp_input_tail() local 236 if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead))) in esp_input_tail() 252 struct crypto_aead *aead; in esp_xmit() local 275 aead = x->data; in esp_xmit() 276 alen = crypto_aead_authsize(aead); in esp_xmit() 281 blksize = ALIGN(crypto_aead_blocksize(aead), 4); in esp_xmit()
|
/linux/drivers/crypto/caam/ |
A D | caamalg.c | 2016 .aead = { 2035 .aead = { 2055 .aead = { 2075 .aead = { 2096 .aead = { 2117 .aead = { 2138 .aead = { 2159 .aead = { 2180 .aead = { 2201 .aead = { [all …]
|
A D | caamalg_qi.c | 1576 .aead = { 1595 .aead = { 1615 .aead = { 1635 .aead = { 1656 .aead = { 1679 .aead = { 1700 .aead = { 1723 .aead = { 1744 .aead = { 1767 .aead = { [all …]
|
A D | caamalg_qi2.c | 1796 .aead = { 1815 .aead = { 1835 .aead = { 1855 .aead = { 1876 .aead = { 1899 .aead = { 1920 .aead = { 1943 .aead = { 1964 .aead = { 1987 .aead = { [all …]
|
/linux/Documentation/crypto/ |
A 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/arch/arm64/crypto/ |
A 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/net/xfrm/ |
A D | xfrm_algo.c | 31 .aead = { 50 .aead = { 69 .aead = { 88 .aead = { 107 .aead = { 126 .aead = { 145 .aead = { 164 .aead = { 734 const struct xfrm_aead_name *aead = data; in xfrm_aead_name_match() local 735 const char *name = aead->name; in xfrm_aead_name_match() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
A D | ipsec.c | 154 struct crypto_aead *aead; in mlx5e_ipsec_build_accel_xfrm_attrs() local 161 crypto_data_len = (x->aead->alg_key_len + 7) / 8; in mlx5e_ipsec_build_accel_xfrm_attrs() 168 aead = x->data; in mlx5e_ipsec_build_accel_xfrm_attrs() 169 geniv_ctx = crypto_aead_ctx(aead); in mlx5e_ipsec_build_accel_xfrm_attrs() 170 ivsize = crypto_aead_ivsize(aead); in mlx5e_ipsec_build_accel_xfrm_attrs() 172 memcpy(&aes_gcm->salt, x->aead->alg_key + key_len, in mlx5e_ipsec_build_accel_xfrm_attrs() 176 aes_gcm->icv_len = x->aead->alg_icv_len; in mlx5e_ipsec_build_accel_xfrm_attrs() 253 if (!x->aead) { in mlx5e_xfrm_validate_state() 257 if (x->aead->alg_icv_len != 128) { in mlx5e_xfrm_validate_state() 261 if ((x->aead->alg_key_len != 128 + 32) && in mlx5e_xfrm_validate_state() [all …]
|
/linux/drivers/crypto/inside-secure/ |
A D | safexcel_cipher.c | 809 if (ctx->aead) in safexcel_send_req() 1735 .alg.aead = { 1771 .alg.aead = { 1807 .alg.aead = { 1843 .alg.aead = { 1879 .alg.aead = { 1916 .alg.aead = { 1953 .alg.aead = { 1990 .alg.aead = { 2027 .alg.aead = { [all …]
|
/linux/arch/x86/crypto/ |
A 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/include/crypto/internal/ |
A 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/net/tls/ |
A D | tls_device_fallback.c | 49 struct crypto_aead *aead, char *aad, in tls_enc_record() argument 121 struct crypto_aead *aead) in tls_init_aead_request() argument 123 aead_request_set_tfm(aead_req, aead); in tls_init_aead_request() 127 static struct aead_request *tls_alloc_aead_request(struct crypto_aead *aead, in tls_alloc_aead_request() argument 131 crypto_aead_reqsize(aead); in tls_alloc_aead_request() 136 tls_init_aead_request(aead_req, aead); in tls_alloc_aead_request() 141 struct crypto_aead *aead, struct scatterlist *sg_in, in tls_enc_records() argument 152 rc = tls_enc_record(aead_req, aead, aad, iv, in tls_enc_records()
|
/linux/drivers/net/netdevsim/ |
A 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()
|