Home
last modified time | relevance | path

Searched refs:aes (Results 1 – 25 of 37) sorted by relevance

12

/drivers/crypto/mediatek/
Dmtk-aes.c224 static inline void mtk_aes_set_mode(struct mtk_aes_rec *aes, in mtk_aes_set_mode() argument
228 aes->flags = (aes->flags & AES_FLAGS_BUSY) | rctx->mode; in mtk_aes_set_mode()
265 struct mtk_aes_rec *aes, in mtk_aes_complete() argument
268 aes->flags &= ~AES_FLAGS_BUSY; in mtk_aes_complete()
269 aes->areq->complete(aes->areq, err); in mtk_aes_complete()
271 tasklet_schedule(&aes->queue_task); in mtk_aes_complete()
279 static int mtk_aes_xmit(struct mtk_cryp *cryp, struct mtk_aes_rec *aes) in mtk_aes_xmit() argument
281 struct mtk_ring *ring = cryp->ring[aes->id]; in mtk_aes_xmit()
283 struct scatterlist *ssg = aes->src.sg, *dsg = aes->dst.sg; in mtk_aes_xmit()
284 u32 slen = aes->src.sg_len, dlen = aes->dst.sg_len; in mtk_aes_xmit()
[all …]
Dmtk-platform.h126 typedef int (*mtk_aes_fn)(struct mtk_cryp *cryp, struct mtk_aes_rec *aes);
221 struct mtk_aes_rec *aes[MTK_REC_NUM]; member
DMakefile2 mtk-crypto-objs:= mtk-platform.o mtk-aes.o mtk-sha.o
/drivers/crypto/ccp/
Dccp-crypto-aes-cmac.c72 if (!ctx->u.aes.key_len) in ccp_do_cmac_update()
156 cmac_key_sg = (need_pad) ? &ctx->u.aes.k2_sg in ccp_do_cmac_update()
157 : &ctx->u.aes.k1_sg; in ccp_do_cmac_update()
162 rctx->cmd.u.aes.type = ctx->u.aes.type; in ccp_do_cmac_update()
163 rctx->cmd.u.aes.mode = ctx->u.aes.mode; in ccp_do_cmac_update()
164 rctx->cmd.u.aes.action = CCP_AES_ACTION_ENCRYPT; in ccp_do_cmac_update()
165 rctx->cmd.u.aes.key = &ctx->u.aes.key_sg; in ccp_do_cmac_update()
166 rctx->cmd.u.aes.key_len = ctx->u.aes.key_len; in ccp_do_cmac_update()
167 rctx->cmd.u.aes.iv = &rctx->iv_sg; in ccp_do_cmac_update()
168 rctx->cmd.u.aes.iv_len = AES_BLOCK_SIZE; in ccp_do_cmac_update()
[all …]
Dccp-crypto-aes-galois.c41 ctx->u.aes.type = CCP_AES_TYPE_128; in ccp_aes_gcm_setkey()
44 ctx->u.aes.type = CCP_AES_TYPE_192; in ccp_aes_gcm_setkey()
47 ctx->u.aes.type = CCP_AES_TYPE_256; in ccp_aes_gcm_setkey()
54 ctx->u.aes.mode = CCP_AES_MODE_GCM; in ccp_aes_gcm_setkey()
55 ctx->u.aes.key_len = key_len; in ccp_aes_gcm_setkey()
57 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_gcm_setkey()
58 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_gcm_setkey()
92 if (!ctx->u.aes.key_len) in ccp_aes_gcm_crypt()
95 if (ctx->u.aes.mode != CCP_AES_MODE_GCM) in ccp_aes_gcm_crypt()
125 rctx->cmd.u.aes.authsize = crypto_aead_authsize(tfm); in ccp_aes_gcm_crypt()
[all …]
Dccp-crypto-aes.c35 if (ctx->u.aes.mode != CCP_AES_MODE_ECB) in ccp_aes_complete()
50 ctx->u.aes.type = CCP_AES_TYPE_128; in ccp_aes_setkey()
53 ctx->u.aes.type = CCP_AES_TYPE_192; in ccp_aes_setkey()
56 ctx->u.aes.type = CCP_AES_TYPE_256; in ccp_aes_setkey()
62 ctx->u.aes.mode = alg->mode; in ccp_aes_setkey()
63 ctx->u.aes.key_len = key_len; in ccp_aes_setkey()
65 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_setkey()
66 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_setkey()
79 if (!ctx->u.aes.key_len) in ccp_aes_crypt()
82 if (((ctx->u.aes.mode == CCP_AES_MODE_ECB) || in ccp_aes_crypt()
[all …]
Dccp-ops.c464 struct ccp_aes_engine *aes = &cmd->u.aes; in ccp_run_aes_cmac_cmd() local
471 if (!((aes->key_len == AES_KEYSIZE_128) || in ccp_run_aes_cmac_cmd()
472 (aes->key_len == AES_KEYSIZE_192) || in ccp_run_aes_cmac_cmd()
473 (aes->key_len == AES_KEYSIZE_256))) in ccp_run_aes_cmac_cmd()
476 if (aes->src_len & (AES_BLOCK_SIZE - 1)) in ccp_run_aes_cmac_cmd()
479 if (aes->iv_len != AES_BLOCK_SIZE) in ccp_run_aes_cmac_cmd()
482 if (!aes->key || !aes->iv || !aes->src) in ccp_run_aes_cmac_cmd()
485 if (aes->cmac_final) { in ccp_run_aes_cmac_cmd()
486 if (aes->cmac_key_len != AES_BLOCK_SIZE) in ccp_run_aes_cmac_cmd()
489 if (!aes->cmac_key) in ccp_run_aes_cmac_cmd()
[all …]
Dccp-crypto-aes-xts.c95 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_xts_setkey()
99 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_xts_setkey()
102 ctx->u.aes.key_len = key_len / 2; in ccp_aes_xts_setkey()
103 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_xts_setkey()
105 return crypto_skcipher_setkey(ctx->u.aes.tfm_skcipher, key, key_len); in ccp_aes_xts_setkey()
119 if (!ctx->u.aes.key_len) in ccp_aes_xts_crypt()
148 (ctx->u.aes.key_len != AES_KEYSIZE_128)) in ccp_aes_xts_crypt()
150 if ((ctx->u.aes.key_len != AES_KEYSIZE_128) && in ccp_aes_xts_crypt()
151 (ctx->u.aes.key_len != AES_KEYSIZE_256)) in ccp_aes_xts_crypt()
154 SKCIPHER_REQUEST_ON_STACK(subreq, ctx->u.aes.tfm_skcipher); in ccp_aes_xts_crypt()
[all …]
DMakefile14 ccp-crypto-aes.o \
15 ccp-crypto-aes-cmac.o \
16 ccp-crypto-aes-xts.o \
17 ccp-crypto-aes-galois.o \
Dccp-dev-v5.c104 } aes; member
143 #define CCP_AES_SIZE(p) ((p)->aes.size)
144 #define CCP_AES_ENCRYPT(p) ((p)->aes.encrypt)
145 #define CCP_AES_MODE(p) ((p)->aes.mode)
146 #define CCP_AES_TYPE(p) ((p)->aes.type)
303 CCP_AES_ENCRYPT(&function) = op->u.aes.action; in ccp5_perform_aes()
304 CCP_AES_MODE(&function) = op->u.aes.mode; in ccp5_perform_aes()
305 CCP_AES_TYPE(&function) = op->u.aes.type; in ccp5_perform_aes()
306 CCP_AES_SIZE(&function) = op->u.aes.size; in ccp5_perform_aes()
1098 .aes = ccp5_perform_aes,
Dccp-dev-v3.c158 | (op->u.aes.type << REQ1_AES_TYPE_SHIFT) in ccp_perform_aes()
159 | (op->u.aes.mode << REQ1_AES_MODE_SHIFT) in ccp_perform_aes()
160 | (op->u.aes.action << REQ1_AES_ACTION_SHIFT) in ccp_perform_aes()
171 if (op->u.aes.mode == CCP_AES_MODE_CFB) in ccp_perform_aes()
573 .aes = ccp_perform_aes,
Dccp-dev.h548 struct ccp_aes_op aes; member
654 int (*aes)(struct ccp_op *); member
/drivers/crypto/nx/
DMakefile5 nx-aes-cbc.o \
6 nx-aes-ecb.o \
7 nx-aes-gcm.o \
8 nx-aes-ccm.o \
9 nx-aes-ctr.o \
10 nx-aes-xcbc.o \
/drivers/net/wireless/ti/wl12xx/
Ddebugfs.c94 WL12XX_DEBUGFS_FWSTATS_FILE(aes, encrypt_fail, "%u");
95 WL12XX_DEBUGFS_FWSTATS_FILE(aes, decrypt_fail, "%u");
96 WL12XX_DEBUGFS_FWSTATS_FILE(aes, encrypt_packets, "%u");
97 WL12XX_DEBUGFS_FWSTATS_FILE(aes, decrypt_packets, "%u");
98 WL12XX_DEBUGFS_FWSTATS_FILE(aes, encrypt_interrupt, "%u");
99 WL12XX_DEBUGFS_FWSTATS_FILE(aes, decrypt_interrupt, "%u");
204 DEBUGFS_FWSTATS_ADD(aes, encrypt_fail); in wl12xx_debugfs_add_files()
205 DEBUGFS_FWSTATS_ADD(aes, decrypt_fail); in wl12xx_debugfs_add_files()
206 DEBUGFS_FWSTATS_ADD(aes, encrypt_packets); in wl12xx_debugfs_add_files()
207 DEBUGFS_FWSTATS_ADD(aes, decrypt_packets); in wl12xx_debugfs_add_files()
[all …]
Dacx.h264 struct wl12xx_acx_aes_statistics aes; member
/drivers/crypto/
DMakefile2 obj-$(CONFIG_CRYPTO_DEV_ATMEL_AES) += atmel-aes.o
14 obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
27 obj-$(CONFIG_CRYPTO_DEV_OMAP_AES) += omap-aes-driver.o
28 omap-aes-driver-objs := omap-aes.o omap-aes-gcm.o
31 obj-$(CONFIG_CRYPTO_DEV_PADLOCK_AES) += padlock-aes.o
/drivers/net/wireless/ti/wl1251/
Ddebugfs.c181 DEBUGFS_FWSTATS_FILE(aes, encrypt_fail, 20, "%u");
182 DEBUGFS_FWSTATS_FILE(aes, decrypt_fail, 20, "%u");
183 DEBUGFS_FWSTATS_FILE(aes, encrypt_packets, 20, "%u");
184 DEBUGFS_FWSTATS_FILE(aes, decrypt_packets, 20, "%u");
185 DEBUGFS_FWSTATS_FILE(aes, encrypt_interrupt, 20, "%u");
186 DEBUGFS_FWSTATS_FILE(aes, decrypt_interrupt, 20, "%u");
321 DEBUGFS_FWSTATS_DEL(aes, encrypt_fail); in wl1251_debugfs_delete_files()
322 DEBUGFS_FWSTATS_DEL(aes, decrypt_fail); in wl1251_debugfs_delete_files()
323 DEBUGFS_FWSTATS_DEL(aes, encrypt_packets); in wl1251_debugfs_delete_files()
324 DEBUGFS_FWSTATS_DEL(aes, decrypt_packets); in wl1251_debugfs_delete_files()
[all …]
/drivers/crypto/marvell/
Dcipher.c32 struct crypto_aes_ctx aes; member
252 ret = crypto_aes_expand_key(&ctx->aes, key, len); in mv_cesa_aes_setkey()
258 remaining = (ctx->aes.key_length - 16) / 4; in mv_cesa_aes_setkey()
259 offset = ctx->aes.key_length + 24 - remaining; in mv_cesa_aes_setkey()
261 ctx->aes.key_dec[4 + i] = in mv_cesa_aes_setkey()
262 cpu_to_le32(ctx->aes.key_enc[offset + i]); in mv_cesa_aes_setkey()
711 key = ctx->aes.key_dec; in mv_cesa_aes_op()
713 key = ctx->aes.key_enc; in mv_cesa_aes_op()
715 for (i = 0; i < ctx->aes.key_length / sizeof(u32); i++) in mv_cesa_aes_op()
718 if (ctx->aes.key_length == 24) in mv_cesa_aes_op()
[all …]
/drivers/crypto/qat/qat_c62x/
Dadf_c62x_hw_data.c125 int aes = get_num_aes(self); in get_sku() local
127 if (aes == 8) in get_sku()
129 else if (aes == 10) in get_sku()
/drivers/crypto/inside-secure/
Dsafexcel_cipher.c72 struct crypto_aes_ctx aes; in safexcel_aes_setkey() local
75 ret = crypto_aes_expand_key(&aes, key, len); in safexcel_aes_setkey()
82 if (ctx->key[i] != cpu_to_le32(aes.key_enc[i])) { in safexcel_aes_setkey()
89 ctx->key[i] = cpu_to_le32(aes.key_enc[i]); in safexcel_aes_setkey()
93 memzero_explicit(&aes, sizeof(aes)); in safexcel_aes_setkey()
/drivers/crypto/qat/qat_c3xxx/
Dadf_c3xxx_hw_data.c120 int aes = get_num_aes(self); in get_sku() local
122 if (aes == 6) in get_sku()
/drivers/crypto/qat/qat_common/
Dicp_qat_fw_loader_handle.h60 struct icp_qat_fw_loader_ae_data aes[ICP_QAT_UCLO_MAX_AE]; member
Dqat_algs.c293 cipher->aes.cipher_config.val = QAT_AES_HW_CONFIG_ENC(alg, mode); in qat_alg_aead_init_enc_session()
294 memcpy(cipher->aes.key, keys->enckey, keys->enckeylen); in qat_alg_aead_init_enc_session()
379 cipher->aes.cipher_config.val = QAT_AES_HW_CONFIG_DEC(alg, mode); in qat_alg_aead_init_dec_session()
380 memcpy(cipher->aes.key, keys->enckey, keys->enckeylen); in qat_alg_aead_init_dec_session()
455 memcpy(cd->aes.key, key, keylen); in qat_alg_ablkcipher_init_com()
478 enc_cd->aes.cipher_config.val = QAT_AES_HW_CONFIG_ENC(alg, mode); in qat_alg_ablkcipher_init_enc()
493 dec_cd->aes.cipher_config.val = in qat_alg_ablkcipher_init_dec()
496 dec_cd->aes.cipher_config.val = in qat_alg_ablkcipher_init_dec()
/drivers/crypto/vmx/
DMakefile3 vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
/drivers/net/wireless/marvell/mwifiex/
Dsta_cmdresp.c633 memset(priv->aes_key_v2.key_param_set.key_params.aes.key, 0, in mwifiex_ret_802_11_key_material_v2()
635 priv->aes_key_v2.key_param_set.key_params.aes.key_len = in mwifiex_ret_802_11_key_material_v2()
636 key_v2->key_param_set.key_params.aes.key_len; in mwifiex_ret_802_11_key_material_v2()
637 len = priv->aes_key_v2.key_param_set.key_params.aes.key_len; in mwifiex_ret_802_11_key_material_v2()
638 memcpy(priv->aes_key_v2.key_param_set.key_params.aes.key, in mwifiex_ret_802_11_key_material_v2()
639 key_v2->key_param_set.key_params.aes.key, le16_to_cpu(len)); in mwifiex_ret_802_11_key_material_v2()

12