Home
last modified time | relevance | path

Searched refs:rctx (Results 1 – 20 of 20) sorted by relevance

/drivers/crypto/ccp/
Dccp-crypto-sha.c30 struct ccp_sha_req_ctx *rctx = ahash_request_ctx(req); in ccp_sha_complete() local
36 if (rctx->hash_rem) { in ccp_sha_complete()
38 unsigned int offset = rctx->nbytes - rctx->hash_rem; in ccp_sha_complete()
40 scatterwalk_map_and_copy(rctx->buf, rctx->src, in ccp_sha_complete()
41 offset, rctx->hash_rem, 0); in ccp_sha_complete()
42 rctx->buf_count = rctx->hash_rem; in ccp_sha_complete()
44 rctx->buf_count = 0; in ccp_sha_complete()
49 memcpy(req->result, rctx->ctx, digest_size); in ccp_sha_complete()
52 sg_free_table(&rctx->data_sg); in ccp_sha_complete()
62 struct ccp_sha_req_ctx *rctx = ahash_request_ctx(req); in ccp_do_sha_update() local
[all …]
Dccp-crypto-aes-cmac.c31 struct ccp_aes_cmac_req_ctx *rctx = ahash_request_ctx(req); in ccp_aes_cmac_complete() local
37 if (rctx->hash_rem) { in ccp_aes_cmac_complete()
39 unsigned int offset = rctx->nbytes - rctx->hash_rem; in ccp_aes_cmac_complete()
41 scatterwalk_map_and_copy(rctx->buf, rctx->src, in ccp_aes_cmac_complete()
42 offset, rctx->hash_rem, 0); in ccp_aes_cmac_complete()
43 rctx->buf_count = rctx->hash_rem; in ccp_aes_cmac_complete()
45 rctx->buf_count = 0; in ccp_aes_cmac_complete()
50 memcpy(req->result, rctx->iv, digest_size); in ccp_aes_cmac_complete()
53 sg_free_table(&rctx->data_sg); in ccp_aes_cmac_complete()
63 struct ccp_aes_cmac_req_ctx *rctx = ahash_request_ctx(req); in ccp_do_cmac_update() local
[all …]
Dccp-crypto-aes.c29 struct ccp_aes_req_ctx *rctx = ablkcipher_request_ctx(req); in ccp_aes_complete() local
35 memcpy(req->info, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_complete()
73 struct ccp_aes_req_ctx *rctx = ablkcipher_request_ctx(req); in ccp_aes_crypt() local
91 memcpy(rctx->iv, req->info, AES_BLOCK_SIZE); in ccp_aes_crypt()
92 iv_sg = &rctx->iv_sg; in ccp_aes_crypt()
94 sg_init_one(iv_sg, rctx->iv, iv_len); in ccp_aes_crypt()
97 memset(&rctx->cmd, 0, sizeof(rctx->cmd)); in ccp_aes_crypt()
98 INIT_LIST_HEAD(&rctx->cmd.entry); in ccp_aes_crypt()
99 rctx->cmd.engine = CCP_ENGINE_AES; in ccp_aes_crypt()
100 rctx->cmd.u.aes.type = ctx->u.aes.type; in ccp_aes_crypt()
[all …]
Dccp-crypto-aes-xts.c87 struct ccp_aes_req_ctx *rctx = ablkcipher_request_ctx(req); in ccp_aes_xts_complete() local
92 memcpy(req->info, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_xts_complete()
123 struct ccp_aes_req_ctx *rctx = ablkcipher_request_ctx(req); in ccp_aes_xts_crypt() local
160 memcpy(rctx->iv, req->info, AES_BLOCK_SIZE); in ccp_aes_xts_crypt()
161 sg_init_one(&rctx->iv_sg, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_xts_crypt()
163 memset(&rctx->cmd, 0, sizeof(rctx->cmd)); in ccp_aes_xts_crypt()
164 INIT_LIST_HEAD(&rctx->cmd.entry); in ccp_aes_xts_crypt()
165 rctx->cmd.engine = CCP_ENGINE_XTS_AES_128; in ccp_aes_xts_crypt()
166 rctx->cmd.u.xts.action = (encrypt) ? CCP_AES_ACTION_ENCRYPT in ccp_aes_xts_crypt()
168 rctx->cmd.u.xts.unit_size = unit_size; in ccp_aes_xts_crypt()
[all …]
/drivers/crypto/qce/
Dsha.c42 struct qce_sha_reqctx *rctx = ahash_request_ctx(req); in qce_ahash_done() local
54 dma_unmap_sg(qce->dev, req->src, rctx->src_nents, DMA_TO_DEVICE); in qce_ahash_done()
55 dma_unmap_sg(qce->dev, &rctx->result_sg, 1, DMA_FROM_DEVICE); in qce_ahash_done()
57 memcpy(rctx->digest, result->auth_iv, digestsize); in qce_ahash_done()
61 rctx->byte_count[0] = cpu_to_be32(result->auth_byte_count[0]); in qce_ahash_done()
62 rctx->byte_count[1] = cpu_to_be32(result->auth_byte_count[1]); in qce_ahash_done()
68 req->src = rctx->src_orig; in qce_ahash_done()
69 req->nbytes = rctx->nbytes_orig; in qce_ahash_done()
70 rctx->last_blk = false; in qce_ahash_done()
71 rctx->first_blk = false; in qce_ahash_done()
[all …]
Dablkcipher.c29 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_ablkcipher_done() local
47 dma_unmap_sg(qce->dev, rctx->src_sg, rctx->src_nents, dir_src); in qce_ablkcipher_done()
48 dma_unmap_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_ablkcipher_done()
50 sg_free_table(&rctx->dst_tbl); in qce_ablkcipher_done()
63 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_ablkcipher_async_req_handle() local
73 rctx->iv = req->info; in qce_ablkcipher_async_req_handle()
74 rctx->ivsize = crypto_ablkcipher_ivsize(ablkcipher); in qce_ablkcipher_async_req_handle()
75 rctx->cryptlen = req->nbytes; in qce_ablkcipher_async_req_handle()
81 rctx->src_nents = sg_nents_for_len(req->src, req->nbytes); in qce_ablkcipher_async_req_handle()
83 rctx->dst_nents = sg_nents_for_len(req->dst, req->nbytes); in qce_ablkcipher_async_req_handle()
[all …]
Dcommon.c235 struct qce_sha_reqctx *rctx = ahash_request_ctx(req); in qce_setup_regs_ahash() local
246 if (!rctx->last_blk && req->nbytes % blocksize) in qce_setup_regs_ahash()
251 if (IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
259 auth_cfg = qce_auth_cfg(rctx->flags, rctx->authklen); in qce_setup_regs_ahash()
262 if (IS_SHA_HMAC(rctx->flags) || IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
263 u32 authkey_words = rctx->authklen / sizeof(u32); in qce_setup_regs_ahash()
265 qce_cpu_to_be32p_array(mackey, rctx->authkey, rctx->authklen); in qce_setup_regs_ahash()
270 if (IS_CMAC(rctx->flags)) in qce_setup_regs_ahash()
273 if (rctx->first_blk) in qce_setup_regs_ahash()
274 memcpy(auth, rctx->digest, digestsize); in qce_setup_regs_ahash()
[all …]
/drivers/crypto/
Dsahara.c555 struct sahara_aes_reqctx *rctx; in sahara_aes_process() local
569 rctx = ablkcipher_request_ctx(req); in sahara_aes_process()
571 rctx->mode &= FLAGS_MODE_MASK; in sahara_aes_process()
572 dev->flags = (dev->flags & ~FLAGS_MODE_MASK) | rctx->mode; in sahara_aes_process()
640 struct sahara_aes_reqctx *rctx = ablkcipher_request_ctx(req); in sahara_aes_crypt() local
653 rctx->mode = mode; in sahara_aes_crypt()
763 struct sahara_sha_reqctx *rctx) in sahara_sha_init_hdr() argument
767 hdr = rctx->mode; in sahara_sha_init_hdr()
769 if (rctx->first) { in sahara_sha_init_hdr()
776 if (rctx->last) in sahara_sha_init_hdr()
[all …]
Dn2_core.c305 struct n2_hash_req_ctx *rctx = ahash_request_ctx(req); in n2_hash_async_init() local
309 ahash_request_set_tfm(&rctx->fallback_req, ctx->fallback_tfm); in n2_hash_async_init()
310 rctx->fallback_req.base.flags = req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in n2_hash_async_init()
312 return crypto_ahash_init(&rctx->fallback_req); in n2_hash_async_init()
317 struct n2_hash_req_ctx *rctx = ahash_request_ctx(req); in n2_hash_async_update() local
321 ahash_request_set_tfm(&rctx->fallback_req, ctx->fallback_tfm); in n2_hash_async_update()
322 rctx->fallback_req.base.flags = req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in n2_hash_async_update()
323 rctx->fallback_req.nbytes = req->nbytes; in n2_hash_async_update()
324 rctx->fallback_req.src = req->src; in n2_hash_async_update()
326 return crypto_ahash_update(&rctx->fallback_req); in n2_hash_async_update()
[all …]
Dmxs-dcp.c223 struct dcp_aes_req_ctx *rctx = ablkcipher_request_ctx(req); in mxs_dcp_run_aes() local
258 if (rctx->enc) in mxs_dcp_run_aes()
265 if (rctx->ecb) in mxs_dcp_run_aes()
296 struct dcp_aes_req_ctx *rctx = ablkcipher_request_ctx(req); in mxs_dcp_aes_block_crypt() local
322 if (!rctx->ecb) { in mxs_dcp_aes_block_crypt()
375 if (!rctx->ecb) { in mxs_dcp_aes_block_crypt()
376 if (rctx->enc) in mxs_dcp_aes_block_crypt()
449 struct dcp_aes_req_ctx *rctx = ablkcipher_request_ctx(req); in mxs_dcp_aes_enqueue() local
455 rctx->enc = enc; in mxs_dcp_aes_enqueue()
456 rctx->ecb = ecb; in mxs_dcp_aes_enqueue()
[all …]
Dimg-hash.c484 struct img_hash_request_ctx *rctx = ahash_request_ctx(req); in img_hash_init() local
487 ahash_request_set_tfm(&rctx->fallback_req, ctx->fallback); in img_hash_init()
488 rctx->fallback_req.base.flags = req->base.flags in img_hash_init()
491 return crypto_ahash_init(&rctx->fallback_req); in img_hash_init()
547 struct img_hash_request_ctx *rctx = ahash_request_ctx(req); in img_hash_update() local
551 ahash_request_set_tfm(&rctx->fallback_req, ctx->fallback); in img_hash_update()
552 rctx->fallback_req.base.flags = req->base.flags in img_hash_update()
554 rctx->fallback_req.nbytes = req->nbytes; in img_hash_update()
555 rctx->fallback_req.src = req->src; in img_hash_update()
557 return crypto_ahash_update(&rctx->fallback_req); in img_hash_update()
[all …]
Dhifn_795x.c1164 struct hifn_context *ctx, struct hifn_request_context *rctx, in hifn_setup_cmd_desc() argument
1176 switch (rctx->op) { in hifn_setup_cmd_desc()
1193 if (rctx->op == ACRYPTO_OP_ENCRYPT || rctx->op == ACRYPTO_OP_DECRYPT) { in hifn_setup_cmd_desc()
1198 if (rctx->iv && rctx->mode != ACRYPTO_MODE_ECB) in hifn_setup_cmd_desc()
1201 switch (rctx->mode) { in hifn_setup_cmd_desc()
1218 switch (rctx->type) { in hifn_setup_cmd_desc()
1253 rctx->iv, rctx->ivsize, md); in hifn_setup_cmd_desc()
1369 struct hifn_context *ctx, struct hifn_request_context *rctx, in hifn_setup_dma() argument
1390 t = &rctx->walk.cache[0]; in hifn_setup_dma()
1393 if (t->length && rctx->walk.flags & ASYNC_FLAGS_MISALIGNED) { in hifn_setup_dma()
[all …]
Domap-des.c594 struct omap_des_reqctx *rctx; in omap_des_handle_queue() local
639 rctx = ablkcipher_request_ctx(req); in omap_des_handle_queue()
641 rctx->mode &= FLAGS_MODE_MASK; in omap_des_handle_queue()
642 dd->flags = (dd->flags & ~FLAGS_MODE_MASK) | rctx->mode; in omap_des_handle_queue()
704 struct omap_des_reqctx *rctx = ablkcipher_request_ctx(req); in omap_des_crypt() local
720 rctx->mode = mode; in omap_des_crypt()
Domap-aes.c613 struct omap_aes_reqctx *rctx; in omap_aes_handle_queue() local
659 rctx = ablkcipher_request_ctx(req); in omap_aes_handle_queue()
661 rctx->mode &= FLAGS_MODE_MASK; in omap_aes_handle_queue()
662 dd->flags = (dd->flags & ~FLAGS_MODE_MASK) | rctx->mode; in omap_aes_handle_queue()
725 struct omap_aes_reqctx *rctx = ablkcipher_request_ctx(req); in omap_aes_crypt() local
736 rctx->mode = mode; in omap_aes_crypt()
Datmel-tdes.c593 struct atmel_tdes_reqctx *rctx; in atmel_tdes_handle_queue() local
626 rctx = ablkcipher_request_ctx(req); in atmel_tdes_handle_queue()
628 rctx->mode &= TDES_FLAGS_MODE_MASK; in atmel_tdes_handle_queue()
629 dd->flags = (dd->flags & ~TDES_FLAGS_MODE_MASK) | rctx->mode; in atmel_tdes_handle_queue()
675 struct atmel_tdes_reqctx *rctx = ablkcipher_request_ctx(req); in atmel_tdes_crypt() local
703 rctx->mode = mode; in atmel_tdes_crypt()
Datmel-aes.c567 struct atmel_aes_reqctx *rctx; in atmel_aes_handle_queue() local
600 rctx = ablkcipher_request_ctx(req); in atmel_aes_handle_queue()
602 rctx->mode &= AES_FLAGS_MODE_MASK; in atmel_aes_handle_queue()
603 dd->flags = (dd->flags & ~AES_FLAGS_MODE_MASK) | rctx->mode; in atmel_aes_handle_queue()
710 struct atmel_aes_reqctx *rctx = ablkcipher_request_ctx(req); in atmel_aes_crypt() local
749 rctx->mode = mode; in atmel_aes_crypt()
/drivers/crypto/sunxi-ss/
Dsun4i-ss-cipher.c323 struct sun4i_cipher_req_ctx *rctx = ablkcipher_request_ctx(areq); in sun4i_ss_cbc_aes_encrypt() local
325 rctx->mode = SS_OP_AES | SS_CBC | SS_ENABLED | SS_ENCRYPTION | in sun4i_ss_cbc_aes_encrypt()
334 struct sun4i_cipher_req_ctx *rctx = ablkcipher_request_ctx(areq); in sun4i_ss_cbc_aes_decrypt() local
336 rctx->mode = SS_OP_AES | SS_CBC | SS_ENABLED | SS_DECRYPTION | in sun4i_ss_cbc_aes_decrypt()
346 struct sun4i_cipher_req_ctx *rctx = ablkcipher_request_ctx(areq); in sun4i_ss_ecb_aes_encrypt() local
348 rctx->mode = SS_OP_AES | SS_ECB | SS_ENABLED | SS_ENCRYPTION | in sun4i_ss_ecb_aes_encrypt()
357 struct sun4i_cipher_req_ctx *rctx = ablkcipher_request_ctx(areq); in sun4i_ss_ecb_aes_decrypt() local
359 rctx->mode = SS_OP_AES | SS_ECB | SS_ENABLED | SS_DECRYPTION | in sun4i_ss_ecb_aes_decrypt()
369 struct sun4i_cipher_req_ctx *rctx = ablkcipher_request_ctx(areq); in sun4i_ss_cbc_des_encrypt() local
371 rctx->mode = SS_OP_DES | SS_CBC | SS_ENABLED | SS_ENCRYPTION | in sun4i_ss_cbc_des_encrypt()
[all …]
/drivers/crypto/nx/
Dnx-aes-gcm.c325 struct nx_gcm_rctx *rctx = aead_request_ctx(req); in gcm_aes_nx_crypt() local
335 desc.info = rctx->iv; in gcm_aes_nx_crypt()
433 struct nx_gcm_rctx *rctx = aead_request_ctx(req); in gcm_aes_nx_encrypt() local
434 char *iv = rctx->iv; in gcm_aes_nx_encrypt()
443 struct nx_gcm_rctx *rctx = aead_request_ctx(req); in gcm_aes_nx_decrypt() local
444 char *iv = rctx->iv; in gcm_aes_nx_decrypt()
455 struct nx_gcm_rctx *rctx = aead_request_ctx(req); in gcm4106_aes_nx_encrypt() local
456 char *iv = rctx->iv; in gcm4106_aes_nx_encrypt()
472 struct nx_gcm_rctx *rctx = aead_request_ctx(req); in gcm4106_aes_nx_decrypt() local
473 char *iv = rctx->iv; in gcm4106_aes_nx_decrypt()
Dnx-aes-ccm.c495 struct nx_gcm_rctx *rctx = aead_request_ctx(req); in ccm4309_aes_nx_encrypt() local
497 u8 *iv = rctx->iv; in ccm4309_aes_nx_encrypt()
525 struct nx_gcm_rctx *rctx = aead_request_ctx(req); in ccm4309_aes_nx_decrypt() local
527 u8 *iv = rctx->iv; in ccm4309_aes_nx_decrypt()
/drivers/crypto/amcc/
Dcrypto4xx_core.h172 struct crypto4xx_ctx *rctx);
173 extern void crypto4xx_free_sa_rctx(struct crypto4xx_ctx *rctx);