/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
D | ipsec_rxtx.c | 201 struct crypto_aead *aead; in mlx5e_ipsec_set_state() local 206 aead = x->data; in mlx5e_ipsec_set_state() 207 alen = crypto_aead_authsize(aead); in mlx5e_ipsec_set_state() 208 blksize = ALIGN(crypto_aead_blocksize(aead), 4); in mlx5e_ipsec_set_state()
|
/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() 823 if (ctx->aead) in safexcel_send_req() [all …]
|
/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()
|
/drivers/crypto/bcm/ |
D | cipher.c | 2508 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() 2578 struct crypto_aead *aead = crypto_aead_reqtfm(req); in aead_complete() local 2582 areq->tfm = crypto_aead_tfm(aead); in aead_complete() 2592 struct crypto_aead *aead = crypto_aead_reqtfm(req); in aead_do_fallback() local 2593 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in aead_do_fallback() 2624 aead_request_set_tfm(req, aead); in aead_do_fallback() 2638 struct crypto_aead *aead = crypto_aead_reqtfm(req); in aead_enqueue() local 2639 struct iproc_ctx_s *ctx = crypto_aead_ctx(aead); in aead_enqueue() 3064 .alg.aead = { [all …]
|
/drivers/net/ethernet/intel/ixgbe/ |
D | ixgbe_ipsec.c | 435 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() 609 rsa.decrypt = xs->ealg || xs->aead; in ixgbe_ipsec_add_sa() 719 tsa.encrypt = xs->ealg || xs->aead; in ixgbe_ipsec_add_sa() 933 aead_len = sizeof(*xs->aead) + IXGBE_IPSEC_KEY_BITS / 8; in ixgbe_ipsec_vf_add_sa() 934 xs->aead = kzalloc(aead_len, GFP_KERNEL); in ixgbe_ipsec_vf_add_sa() 935 if (unlikely(!xs->aead)) { in ixgbe_ipsec_vf_add_sa() [all …]
|
/drivers/crypto/amcc/ |
D | crypto4xx_alg.c | 327 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()
|
D | crypto4xx_core.c | 982 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 = {
|
D | crypto4xx_core.h | 126 struct crypto_aead *aead; member 139 struct aead_alg aead; member
|
/drivers/crypto/ |
D | talitos.c | 991 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 …]
|
D | omap-aes-gcm.c | 92 struct crypto_aead *aead = crypto_aead_reqtfm(req); in omap_aes_gcm_copy_buffers() local 93 unsigned int authlen = crypto_aead_authsize(aead); in omap_aes_gcm_copy_buffers() 241 struct crypto_aead *aead = crypto_aead_reqtfm(req); in omap_aes_gcm_crypt() local 242 unsigned int authlen = crypto_aead_authsize(aead); in omap_aes_gcm_crypt()
|
D | sa2ul.c | 159 struct aead_alg aead; member 1745 ctx->fallback.aead = crypto_alloc_aead(fallback, 0, in sa_cra_init_aead() 1748 if (IS_ERR(ctx->fallback.aead)) { in sa_cra_init_aead() 1751 return PTR_ERR(ctx->fallback.aead); in sa_cra_init_aead() 1755 crypto_aead_reqsize(ctx->fallback.aead)); in sa_cra_init_aead() 1792 crypto_free_aead(ctx->fallback.aead); in sa_exit_tfm_aead() 1867 crypto_aead_clear_flags(ctx->fallback.aead, CRYPTO_TFM_REQ_MASK); in sa_aead_setkey() 1868 crypto_aead_set_flags(ctx->fallback.aead, in sa_aead_setkey() 1872 return crypto_aead_setkey(ctx->fallback.aead, key, keylen); in sa_aead_setkey() 1879 return crypto_aead_setauthsize(ctx->fallback.aead, authsize); in sa_aead_setauthsize() [all …]
|
/drivers/net/ethernet/intel/ixgbevf/ |
D | ipsec.c | 37 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() 304 rsa.decrypt = xs->ealg || xs->aead; in ixgbevf_ipsec_add_sa() 358 tsa.encrypt = xs->ealg || xs->aead; in ixgbevf_ipsec_add_sa()
|
/drivers/crypto/chelsio/ |
D | chcr_algo.c | 163 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() 2896 struct crypto_aead *aead = crypto_aead_reqtfm(req); in generate_b0() local 2900 m = crypto_aead_authsize(aead); in generate_b0() 3419 static int chcr_ccm_common_setkey(struct crypto_aead *aead, in chcr_ccm_common_setkey() argument 3423 struct chcr_aead_ctx *aeadctx = AEAD_CTX(a_ctx(aead)); in chcr_ccm_common_setkey() 3449 static int chcr_aead_ccm_setkey(struct crypto_aead *aead, in chcr_aead_ccm_setkey() argument 3453 struct chcr_aead_ctx *aeadctx = AEAD_CTX(a_ctx(aead)); in chcr_aead_ccm_setkey() 3457 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/ |
D | chcr_ipsec.c | 146 int authsize = x->aead->alg_icv_len / 8; in ch_ipsec_setauthsize() 169 int keylen = (x->aead->alg_key_len + 7) / 8; in ch_ipsec_setkey() 170 unsigned char *key = x->aead->alg_key; in ch_ipsec_setkey() 260 if (!x->aead) { in ch_ipsec_xfrm_add_state() 264 if (x->aead->alg_icv_len != 128 && in ch_ipsec_xfrm_add_state() 265 x->aead->alg_icv_len != 96) { in ch_ipsec_xfrm_add_state() 269 if ((x->aead->alg_key_len != 128 + 32) && in ch_ipsec_xfrm_add_state() 270 (x->aead->alg_key_len != 256 + 32)) { in ch_ipsec_xfrm_add_state()
|
/drivers/crypto/keembay/ |
D | keembay-ocs-aes-core.c | 57 struct crypto_aead *aead; member 219 crypto_aead_clear_flags(tctx->sw_cipher.aead, CRYPTO_TFM_REQ_MASK); in kmb_ocs_aead_set_key() 220 crypto_aead_set_flags(tctx->sw_cipher.aead, in kmb_ocs_aead_set_key() 223 return crypto_aead_setkey(tctx->sw_cipher.aead, in_key, key_len); in kmb_ocs_aead_set_key() 651 aead_request_set_tfm(subreq, tctx->sw_cipher.aead); in kmb_ocs_aead_common() 657 rc = crypto_aead_setauthsize(tctx->sw_cipher.aead, in kmb_ocs_aead_common() 1229 tctx->sw_cipher.aead = blk; in ocs_aes_aead_cra_init() 1234 crypto_aead_reqsize(tctx->sw_cipher.aead)))); in ocs_aes_aead_cra_init() 1277 if (tctx->sw_cipher.aead) { in ocs_aead_cra_exit() 1278 crypto_free_aead(tctx->sw_cipher.aead); in ocs_aead_cra_exit() [all …]
|
/drivers/crypto/qce/ |
D | Makefile | 9 qcrypto-$(CONFIG_CRYPTO_DEV_QCE_AEAD) += aead.o
|
D | aead.h | 51 return container_of(alg, struct qce_alg_template, alg.aead); in to_aead_tmpl()
|
D | common.h | 92 struct aead_alg aead; member
|
/drivers/crypto/ccree/ |
D | cc_driver.h | 176 struct aead_alg aead; member
|