Home
last modified time | relevance | path

Searched refs:aead (Results 1 – 25 of 38) sorted by relevance

12

/drivers/crypto/caam/
Dcaamalg.c101 struct aead_engine_alg aead; member
140 static int aead_null_set_sh_desc(struct crypto_aead *aead) in aead_null_set_sh_desc() argument
142 struct caam_ctx *ctx = crypto_aead_ctx_dma(aead); in aead_null_set_sh_desc()
190 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument
192 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc()
194 aead.base); in aead_set_sh_desc()
195 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc()
196 struct caam_ctx *ctx = crypto_aead_ctx_dma(aead); in aead_set_sh_desc()
212 return aead_null_set_sh_desc(aead); in aead_set_sh_desc()
332 static int gcm_set_sh_desc(struct crypto_aead *aead) in gcm_set_sh_desc() argument
[all …]
Dcaamalg_qi.c50 struct aead_alg aead; member
85 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument
87 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc()
88 typeof(*alg), aead); in aead_set_sh_desc()
89 struct caam_ctx *ctx = crypto_aead_ctx_dma(aead); in aead_set_sh_desc()
90 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc()
200 static int aead_setkey(struct crypto_aead *aead, const u8 *key, in aead_setkey() argument
203 struct caam_ctx *ctx = crypto_aead_ctx_dma(aead); in aead_setkey()
258 ret = aead_set_sh_desc(aead); in aead_setkey()
288 static int des3_aead_setkey(struct crypto_aead *aead, const u8 *key, in des3_aead_setkey() argument
[all …]
Dcaamalg_qi2.c54 struct aead_alg aead; member
172 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument
174 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc()
175 typeof(*alg), aead); in aead_set_sh_desc()
176 struct caam_ctx *ctx = crypto_aead_ctx_dma(aead); in aead_set_sh_desc()
177 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc()
289 static int aead_setkey(struct crypto_aead *aead, const u8 *key, in aead_setkey() argument
292 struct caam_ctx *ctx = crypto_aead_ctx_dma(aead); in aead_setkey()
323 return aead_set_sh_desc(aead); in aead_setkey()
329 static int des3_aead_setkey(struct crypto_aead *aead, const u8 *key, in des3_aead_setkey() argument
[all …]
/drivers/crypto/xilinx/
Dzynqmp-aes-gcm.c47 struct aead_engine_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()
241 static int zynqmp_aes_aead_setkey(struct crypto_aead *aead, const u8 *key, in zynqmp_aes_aead_setkey() argument
244 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in zynqmp_aes_aead_setkey()
267 tfm_ctx->fbk_cipher->base.crt_flags |= (aead->base.crt_flags & in zynqmp_aes_aead_setkey()
273 static int zynqmp_aes_aead_setauthsize(struct crypto_aead *aead, in zynqmp_aes_aead_setauthsize() argument
276 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in zynqmp_aes_aead_setauthsize()
[all …]
/drivers/crypto/cavium/nitrox/
Dnitrox_aead.c33 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 …]
/drivers/crypto/inside-secure/
Dsafexcel_cipher.c51 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()
823 if (ctx->aead) in safexcel_send_req()
[all …]
/drivers/net/netdevsim/
Dipsec.c93 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()
170 sa.crypt = xs->ealg || xs->aead; in nsim_ipsec_add_sa()
/drivers/net/ethernet/netronome/nfp/crypto/
Dipsec.c327 if (x->aead) { in nfp_net_xfrm_add_state()
395 if (!x->aead) { in nfp_net_xfrm_add_state()
400 if (x->aead->alg_icv_len != 128) { in nfp_net_xfrm_add_state()
408 if (set_aes_keylen(cfg, x->props.ealgo, x->aead->alg_key_len - 32)) { in nfp_net_xfrm_add_state()
429 if (x->aead) { in nfp_net_xfrm_add_state()
432 key_len = DIV_ROUND_UP(x->aead->alg_key_len, BITS_PER_BYTE); in nfp_net_xfrm_add_state()
441 cfg->ciph_key[i] = get_unaligned_be32(x->aead->alg_key + in nfp_net_xfrm_add_state()
445 cfg->aesgcm_fields.salt = get_unaligned_be32(x->aead->alg_key + key_len); in nfp_net_xfrm_add_state()
/drivers/net/ethernet/intel/ixgbe/
Dixgbe_ipsec.c435 if (!xs->aead) { in ixgbe_ipsec_parse_proto_keys()
440 if (xs->aead->alg_icv_len != IXGBE_IPSEC_AUTH_BITS) { in ixgbe_ipsec_parse_proto_keys()
446 key_data = &xs->aead->alg_key[0]; in ixgbe_ipsec_parse_proto_keys()
447 key_len = xs->aead->alg_key_len; in ixgbe_ipsec_parse_proto_keys()
448 alg_name = xs->aead->alg_name; in ixgbe_ipsec_parse_proto_keys()
615 rsa.decrypt = xs->ealg || xs->aead; in ixgbe_ipsec_add_sa()
725 tsa.encrypt = xs->ealg || xs->aead; in ixgbe_ipsec_add_sa()
939 aead_len = sizeof(*xs->aead) + IXGBE_IPSEC_KEY_BITS / 8; in ixgbe_ipsec_vf_add_sa()
940 xs->aead = kzalloc(aead_len, GFP_ATOMIC); in ixgbe_ipsec_vf_add_sa()
941 if (unlikely(!xs->aead)) { in ixgbe_ipsec_vf_add_sa()
[all …]
/drivers/crypto/bcm/
Dcipher.c2508 struct crypto_aead *aead = crypto_aead_reqtfm(req); in aead_need_fallback() local
2509 struct iproc_ctx_s *ctx = crypto_aead_ctx(aead); in aead_need_fallback()
2575 struct crypto_aead *aead = crypto_aead_reqtfm(req); in aead_do_fallback() local
2576 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in aead_do_fallback()
2601 struct crypto_aead *aead = crypto_aead_reqtfm(req); in aead_enqueue() local
2602 struct iproc_ctx_s *ctx = crypto_aead_ctx(aead); in aead_enqueue()
3027 .alg.aead = {
3050 .alg.aead = {
3073 .alg.aead = {
3096 .alg.aead = {
[all …]
/drivers/crypto/amcc/
Dcrypto4xx_alg.c327 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto4xx_aead_need_fallback() local
330 if (aead->authsize & 3) in crypto4xx_aead_need_fallback()
356 aead_request_set_tfm(subreq, ctx->sw_cipher.aead); in crypto4xx_aead_fallback()
371 crypto_aead_clear_flags(ctx->sw_cipher.aead, CRYPTO_TFM_REQ_MASK); in crypto4xx_aead_setup_fallback()
372 crypto_aead_set_flags(ctx->sw_cipher.aead, in crypto4xx_aead_setup_fallback()
374 return crypto_aead_setkey(ctx->sw_cipher.aead, key, keylen); in crypto4xx_aead_setup_fallback()
445 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto4xx_crypt_aes_ccm() local
452 len -= crypto_aead_authsize(aead); in crypto4xx_crypt_aes_ccm()
458 sa->sa_command_0.bf.digest_len = crypto_aead_authsize(aead) >> 2; in crypto4xx_crypt_aes_ccm()
489 return crypto_aead_setauthsize(ctx->sw_cipher.aead, authsize); in crypto4xx_setauthsize_aead()
Dcrypto4xx_core.c982 ctx->sw_cipher.aead = crypto_alloc_aead(alg->base.cra_name, 0, in crypto4xx_aead_init()
985 if (IS_ERR(ctx->sw_cipher.aead)) in crypto4xx_aead_init()
986 return PTR_ERR(ctx->sw_cipher.aead); in crypto4xx_aead_init()
988 amcc_alg = container_of(alg, struct crypto4xx_alg, alg.u.aead); in crypto4xx_aead_init()
991 crypto_aead_reqsize(ctx->sw_cipher.aead), in crypto4xx_aead_init()
1001 crypto_free_aead(ctx->sw_cipher.aead); in crypto4xx_aead_exit()
1022 rc = crypto_register_aead(&alg->alg.u.aead); in crypto4xx_register_alg()
1059 crypto_unregister_aead(&alg->alg.u.aead); in crypto4xx_unregister_alg()
1314 { .type = CRYPTO_ALG_TYPE_AEAD, .u.aead = {
1335 { .type = CRYPTO_ALG_TYPE_AEAD, .u.aead = {
Dcrypto4xx_core.h126 struct crypto_aead *aead; member
139 struct aead_alg aead; member
/drivers/crypto/
Dtalitos.c991 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in ipsec_esp_unmap() local
992 struct talitos_ctx *ctx = crypto_aead_ctx(aead); in ipsec_esp_unmap()
993 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp_unmap()
994 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp_unmap()
1199 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in ipsec_esp() local
1200 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp()
1201 struct talitos_ctx *ctx = crypto_aead_ctx(aead); in ipsec_esp()
1205 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp()
2258 struct aead_alg aead; member
2266 .alg.aead = {
[all …]
Domap-aes-gcm.c95 struct crypto_aead *aead = crypto_aead_reqtfm(req); in omap_aes_gcm_copy_buffers() local
96 unsigned int authlen = crypto_aead_authsize(aead); in omap_aes_gcm_copy_buffers()
242 struct crypto_aead *aead = crypto_aead_reqtfm(req); in omap_aes_gcm_crypt() local
243 unsigned int authlen = crypto_aead_authsize(aead); in omap_aes_gcm_crypt()
Dsa2ul.c160 struct aead_alg aead; member
1746 ctx->fallback.aead = crypto_alloc_aead(fallback, 0, in sa_cra_init_aead()
1749 if (IS_ERR(ctx->fallback.aead)) { in sa_cra_init_aead()
1752 return PTR_ERR(ctx->fallback.aead); in sa_cra_init_aead()
1756 crypto_aead_reqsize(ctx->fallback.aead)); in sa_cra_init_aead()
1793 crypto_free_aead(ctx->fallback.aead); in sa_exit_tfm_aead()
1868 crypto_aead_clear_flags(ctx->fallback.aead, CRYPTO_TFM_REQ_MASK); in sa_aead_setkey()
1869 crypto_aead_set_flags(ctx->fallback.aead, in sa_aead_setkey()
1873 return crypto_aead_setkey(ctx->fallback.aead, key, keylen); in sa_aead_setkey()
1880 return crypto_aead_setauthsize(ctx->fallback.aead, authsize); in sa_aead_setauthsize()
[all …]
/drivers/net/ethernet/intel/ixgbevf/
Dipsec.c37 memcpy(sam->key, xs->aead->alg_key, sizeof(sam->key)); in ixgbevf_ipsec_set_pf_sa()
219 if (!xs->aead) { in ixgbevf_ipsec_parse_proto_keys()
224 if (xs->aead->alg_icv_len != IXGBE_IPSEC_AUTH_BITS) { in ixgbevf_ipsec_parse_proto_keys()
230 key_data = &xs->aead->alg_key[0]; in ixgbevf_ipsec_parse_proto_keys()
231 key_len = xs->aead->alg_key_len; in ixgbevf_ipsec_parse_proto_keys()
232 alg_name = xs->aead->alg_name; in ixgbevf_ipsec_parse_proto_keys()
310 rsa.decrypt = xs->ealg || xs->aead; in ixgbevf_ipsec_add_sa()
364 tsa.encrypt = xs->ealg || xs->aead; in ixgbevf_ipsec_add_sa()
/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
Dipsec.c313 struct crypto_aead *aead; in mlx5e_ipsec_build_accel_xfrm_attrs() local
320 crypto_data_len = (x->aead->alg_key_len + 7) / 8; in mlx5e_ipsec_build_accel_xfrm_attrs()
323 memcpy(aes_gcm->aes_key, x->aead->alg_key, key_len); in mlx5e_ipsec_build_accel_xfrm_attrs()
327 aead = x->data; in mlx5e_ipsec_build_accel_xfrm_attrs()
328 geniv_ctx = crypto_aead_ctx(aead); in mlx5e_ipsec_build_accel_xfrm_attrs()
329 ivsize = crypto_aead_ivsize(aead); in mlx5e_ipsec_build_accel_xfrm_attrs()
331 memcpy(&aes_gcm->salt, x->aead->alg_key + key_len, in mlx5e_ipsec_build_accel_xfrm_attrs()
334 attrs->authsize = crypto_aead_authsize(aead) / 4; /* in dwords */ in mlx5e_ipsec_build_accel_xfrm_attrs()
337 aes_gcm->icv_len = x->aead->alg_icv_len; in mlx5e_ipsec_build_accel_xfrm_attrs()
451 if (!x->aead) { in mlx5e_xfrm_validate_state()
[all …]
Dipsec_rxtx.c202 struct crypto_aead *aead; in mlx5e_ipsec_set_state() local
207 aead = x->data; in mlx5e_ipsec_set_state()
208 alen = crypto_aead_authsize(aead); in mlx5e_ipsec_set_state()
209 blksize = ALIGN(crypto_aead_blocksize(aead), 4); in mlx5e_ipsec_set_state()
/drivers/crypto/chelsio/
Dchcr_algo.c163 static inline int get_aead_subtype(struct crypto_aead *aead) in get_aead_subtype() argument
165 struct aead_alg *alg = crypto_aead_alg(aead); in get_aead_subtype()
167 container_of(alg, struct chcr_alg_template, alg.aead); in get_aead_subtype()
2897 struct crypto_aead *aead = crypto_aead_reqtfm(req); in generate_b0() local
2901 m = crypto_aead_authsize(aead); in generate_b0()
3421 static int chcr_ccm_common_setkey(struct crypto_aead *aead, in chcr_ccm_common_setkey() argument
3425 struct chcr_aead_ctx *aeadctx = AEAD_CTX(a_ctx(aead)); in chcr_ccm_common_setkey()
3451 static int chcr_aead_ccm_setkey(struct crypto_aead *aead, in chcr_aead_ccm_setkey() argument
3455 struct chcr_aead_ctx *aeadctx = AEAD_CTX(a_ctx(aead)); in chcr_aead_ccm_setkey()
3459 crypto_aead_set_flags(aeadctx->sw_cipher, crypto_aead_get_flags(aead) & in chcr_aead_ccm_setkey()
[all …]
/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/
Dchcr_ipsec.c147 int authsize = x->aead->alg_icv_len / 8; in ch_ipsec_setauthsize()
170 int keylen = (x->aead->alg_key_len + 7) / 8; in ch_ipsec_setkey()
171 unsigned char *key = x->aead->alg_key; in ch_ipsec_setkey()
262 if (!x->aead) { in ch_ipsec_xfrm_add_state()
266 if (x->aead->alg_icv_len != 128 && in ch_ipsec_xfrm_add_state()
267 x->aead->alg_icv_len != 96) { in ch_ipsec_xfrm_add_state()
271 if ((x->aead->alg_key_len != 128 + 32) && in ch_ipsec_xfrm_add_state()
272 (x->aead->alg_key_len != 256 + 32)) { in ch_ipsec_xfrm_add_state()
/drivers/crypto/intel/keembay/
Dkeembay-ocs-aes-core.c54 struct crypto_aead *aead; member
216 crypto_aead_clear_flags(tctx->sw_cipher.aead, CRYPTO_TFM_REQ_MASK); in kmb_ocs_aead_set_key()
217 crypto_aead_set_flags(tctx->sw_cipher.aead, in kmb_ocs_aead_set_key()
220 return crypto_aead_setkey(tctx->sw_cipher.aead, in_key, key_len); in kmb_ocs_aead_set_key()
648 aead_request_set_tfm(subreq, tctx->sw_cipher.aead); in kmb_ocs_aead_common()
654 rc = crypto_aead_setauthsize(tctx->sw_cipher.aead, in kmb_ocs_aead_common()
1206 tctx->sw_cipher.aead = blk; in ocs_aes_aead_cra_init()
1211 crypto_aead_reqsize(tctx->sw_cipher.aead)))); in ocs_aes_aead_cra_init()
1252 if (tctx->sw_cipher.aead) { in ocs_aead_cra_exit()
1253 crypto_free_aead(tctx->sw_cipher.aead); in ocs_aead_cra_exit()
[all …]
/drivers/crypto/qce/
DMakefile9 qcrypto-$(CONFIG_CRYPTO_DEV_QCE_AEAD) += aead.o
Daead.h51 return container_of(alg, struct qce_alg_template, alg.aead); in to_aead_tmpl()
Dcommon.h92 struct aead_alg aead; member

12