Home
last modified time | relevance | path

Searched refs:req_ctx (Results 1 – 12 of 12) sorted by relevance

/Linux-v5.4/crypto/
Drsa-pkcs1pad.c177 struct pkcs1pad_request *req_ctx = akcipher_request_ctx(req); in pkcs1pad_encrypt_sign_complete() local
185 len = req_ctx->child_req.dst_len; in pkcs1pad_encrypt_sign_complete()
207 kfree(req_ctx->in_buf); in pkcs1pad_encrypt_sign_complete()
232 struct pkcs1pad_request *req_ctx = akcipher_request_ctx(req); in pkcs1pad_encrypt() local
247 req_ctx->in_buf = kmalloc(ctx->key_size - 1 - req->src_len, in pkcs1pad_encrypt()
249 if (!req_ctx->in_buf) in pkcs1pad_encrypt()
253 req_ctx->in_buf[0] = 0x02; in pkcs1pad_encrypt()
255 req_ctx->in_buf[i] = 1 + prandom_u32_max(255); in pkcs1pad_encrypt()
256 req_ctx->in_buf[ps_end] = 0x00; in pkcs1pad_encrypt()
258 pkcs1pad_sg_set_buf(req_ctx->in_sg, req_ctx->in_buf, in pkcs1pad_encrypt()
[all …]
/Linux-v5.4/drivers/crypto/axis/
Dartpec6_crypto.c1089 struct artpec6_crypto_request_context *req_ctx = NULL; in artpec6_crypto_encrypt() local
1093 req_ctx = skcipher_request_ctx(req); in artpec6_crypto_encrypt()
1099 req_ctx->decrypt = 0; in artpec6_crypto_encrypt()
1114 ret = artpec6_crypto_common_init(&req_ctx->common, in artpec6_crypto_encrypt()
1123 artpec6_crypto_common_destroy(&req_ctx->common); in artpec6_crypto_encrypt()
1127 return artpec6_crypto_submit(&req_ctx->common); in artpec6_crypto_encrypt()
1135 struct artpec6_crypto_request_context *req_ctx = NULL; in artpec6_crypto_decrypt() local
1138 req_ctx = skcipher_request_ctx(req); in artpec6_crypto_decrypt()
1144 req_ctx->decrypt = 1; in artpec6_crypto_decrypt()
1160 ret = artpec6_crypto_common_init(&req_ctx->common, &req->base, in artpec6_crypto_decrypt()
[all …]
/Linux-v5.4/drivers/crypto/
Dtalitos.c1706 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in common_nonsnoop_hash_unmap() local
1718 if (req_ctx->psrc) in common_nonsnoop_hash_unmap()
1719 talitos_sg_unmap(dev, edesc, req_ctx->psrc, NULL, 0, 0); in common_nonsnoop_hash_unmap()
1729 if (is_sec1 && req_ctx->nbuf) in common_nonsnoop_hash_unmap()
1749 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_done() local
1751 if (!req_ctx->last && req_ctx->to_hash_later) { in ahash_done()
1753 req_ctx->buf_idx = (req_ctx->buf_idx + 1) & 1; in ahash_done()
1754 req_ctx->nbuf = req_ctx->to_hash_later; in ahash_done()
1792 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in common_nonsnoop_hash() local
1804 if (!req_ctx->first || req_ctx->swinit) { in common_nonsnoop_hash()
[all …]
Dixp4xx_crypto.c344 struct aead_ctx *req_ctx = aead_request_ctx(req); in finish_scattered_hmac() local
349 if (req_ctx->encrypt) { in finish_scattered_hmac()
350 scatterwalk_map_and_copy(req_ctx->hmac_virt, in finish_scattered_hmac()
353 dma_pool_free(buffer_pool, req_ctx->hmac_virt, crypt->icv_rev_aes); in finish_scattered_hmac()
370 struct aead_ctx *req_ctx = aead_request_ctx(req); in one_packet() local
372 free_buf_chain(dev, req_ctx->src, crypt->src_buf); in one_packet()
373 free_buf_chain(dev, req_ctx->dst, crypt->dst_buf); in one_packet()
374 if (req_ctx->hmac_virt) { in one_packet()
382 struct ablk_ctx *req_ctx = ablkcipher_request_ctx(req); in one_packet() local
384 if (req_ctx->dst) { in one_packet()
[all …]
Dmxs-dcp.c115 struct dcp_sha_req_ctx req_ctx; member
826 memcpy(rctx, &export->req_ctx, sizeof(struct dcp_sha_req_ctx)); in dcp_sha_import()
839 memcpy(&export->req_ctx, rctx_state, sizeof(struct dcp_sha_req_ctx)); in dcp_sha_export()
/Linux-v5.4/drivers/crypto/ccree/
Dcc_cipher.c471 struct cipher_req_ctx *req_ctx, in cc_setup_readiv_desc() argument
479 int direction = req_ctx->gen_ctx.op_type; in cc_setup_readiv_desc()
480 dma_addr_t iv_dma_addr = req_ctx->gen_ctx.iv_dma_addr; in cc_setup_readiv_desc()
527 struct cipher_req_ctx *req_ctx, in cc_setup_state_desc() argument
536 int direction = req_ctx->gen_ctx.op_type; in cc_setup_state_desc()
539 dma_addr_t iv_dma_addr = req_ctx->gen_ctx.iv_dma_addr; in cc_setup_state_desc()
623 struct cipher_req_ctx *req_ctx, in cc_setup_key_desc() argument
631 int direction = req_ctx->gen_ctx.op_type; in cc_setup_key_desc()
706 struct cipher_req_ctx *req_ctx, in cc_setup_mlli_desc() argument
714 if (req_ctx->dma_buf_type == CC_DMA_BUF_MLLI) { in cc_setup_mlli_desc()
[all …]
Dcc_aead.c886 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_proc_digest_desc() local
890 int direct = req_ctx->gen_ctx.op_type; in cc_proc_digest_desc()
897 set_dout_dlli(&desc[idx], req_ctx->icv_dma_addr, ctx->authsize, in cc_proc_digest_desc()
913 set_dout_dlli(&desc[idx], req_ctx->mac_buf_dma_addr, in cc_proc_digest_desc()
936 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_set_cipher_desc() local
937 unsigned int hw_iv_size = req_ctx->hw_iv_size; in cc_set_cipher_desc()
939 int direct = req_ctx->gen_ctx.op_type; in cc_set_cipher_desc()
945 set_din_type(&desc[idx], DMA_DLLI, req_ctx->gen_ctx.iv_dma_addr, in cc_set_cipher_desc()
978 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_proc_cipher() local
979 int direct = req_ctx->gen_ctx.op_type; in cc_proc_cipher()
[all …]
Dcc_buffer_mgr.c382 struct cipher_req_ctx *req_ctx = (struct cipher_req_ctx *)ctx; in cc_unmap_cipher_request() local
384 if (req_ctx->gen_ctx.iv_dma_addr) { in cc_unmap_cipher_request()
386 &req_ctx->gen_ctx.iv_dma_addr, ivsize); in cc_unmap_cipher_request()
387 dma_unmap_single(dev, req_ctx->gen_ctx.iv_dma_addr, in cc_unmap_cipher_request()
391 if (req_ctx->dma_buf_type == CC_DMA_BUF_MLLI && in cc_unmap_cipher_request()
392 req_ctx->mlli_params.mlli_virt_addr) { in cc_unmap_cipher_request()
393 dma_pool_free(req_ctx->mlli_params.curr_pool, in cc_unmap_cipher_request()
394 req_ctx->mlli_params.mlli_virt_addr, in cc_unmap_cipher_request()
395 req_ctx->mlli_params.mlli_dma_addr); in cc_unmap_cipher_request()
398 dma_unmap_sg(dev, src, req_ctx->in_nents, DMA_BIDIRECTIONAL); in cc_unmap_cipher_request()
[all …]
/Linux-v5.4/drivers/crypto/ux500/hash/
Dhash_core.c553 struct hash_req_ctx *req_ctx = ahash_request_ctx(req); in hash_init() local
558 memset(&req_ctx->state, 0, sizeof(struct hash_state)); in hash_init()
559 req_ctx->updated = 0; in hash_init()
562 req_ctx->dma_mode = false; /* Don't use DMA */ in hash_init()
569 req_ctx->dma_mode = true; in hash_init()
571 req_ctx->dma_mode = false; in hash_init()
764 struct hash_ctx *ctx, struct hash_req_ctx *req_ctx, in hash_process_data() argument
780 if (req_ctx->updated) { in hash_process_data()
783 memmove(req_ctx->state.buffer, in hash_process_data()
800 req_ctx->updated = 1; in hash_process_data()
[all …]
/Linux-v5.4/drivers/crypto/caam/
Dcaamalg_qi2.c351 struct caam_request *req_ctx = aead_request_ctx(req); in aead_edesc_alloc() local
352 struct dpaa2_fl_entry *in_fle = &req_ctx->fd_flt[1]; in aead_edesc_alloc()
353 struct dpaa2_fl_entry *out_fle = &req_ctx->fd_flt[0]; in aead_edesc_alloc()
548 memset(&req_ctx->fd_flt, 0, sizeof(req_ctx->fd_flt)); in aead_edesc_alloc()
1119 struct caam_request *req_ctx = skcipher_request_ctx(req); in skcipher_edesc_alloc() local
1120 struct dpaa2_fl_entry *in_fle = &req_ctx->fd_flt[1]; in skcipher_edesc_alloc()
1121 struct dpaa2_fl_entry *out_fle = &req_ctx->fd_flt[0]; in skcipher_edesc_alloc()
1245 memset(&req_ctx->fd_flt, 0, sizeof(req_ctx->fd_flt)); in skcipher_edesc_alloc()
1293 struct caam_request *req_ctx = to_caam_req(areq); in aead_encrypt_done() local
1294 struct aead_edesc *edesc = req_ctx->edesc; in aead_encrypt_done()
[all …]
Dcaampkc.c46 struct caam_rsa_req_ctx *req_ctx = akcipher_request_ctx(req); in rsa_io_unmap() local
49 dma_unmap_sg(dev, req_ctx->fixup_src, edesc->src_nents, DMA_TO_DEVICE); in rsa_io_unmap()
249 struct caam_rsa_req_ctx *req_ctx = akcipher_request_ctx(req); in rsa_edesc_alloc() local
271 req_ctx->fixup_src = scatterwalk_ffwd(req_ctx->src, req->src, in rsa_edesc_alloc()
273 req_ctx->fixup_src_len = req->src_len - lzeros; in rsa_edesc_alloc()
280 req_ctx->fixup_src = req->src; in rsa_edesc_alloc()
281 req_ctx->fixup_src_len = req->src_len; in rsa_edesc_alloc()
284 src_nents = sg_nents_for_len(req_ctx->fixup_src, in rsa_edesc_alloc()
285 req_ctx->fixup_src_len); in rsa_edesc_alloc()
306 sgc = dma_map_sg(dev, req_ctx->fixup_src, src_nents, DMA_TO_DEVICE); in rsa_edesc_alloc()
[all …]
/Linux-v5.4/drivers/crypto/chelsio/
Dchcr_algo.c1494 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(req); in create_hash_wr() local
1509 req_ctx->hctx_wr.imm = (transhdr_len + param->bfr_len + in create_hash_wr()
1511 nents = sg_nents_xlen(req_ctx->hctx_wr.srcsg, param->sg_len, in create_hash_wr()
1512 CHCR_SRC_SG_SIZE, req_ctx->hctx_wr.src_ofst); in create_hash_wr()
1514 transhdr_len += req_ctx->hctx_wr.imm ? roundup(param->bfr_len + in create_hash_wr()
1538 memcpy(chcr_req->key_ctx.key, req_ctx->partial_hash, in create_hash_wr()
1556 req_ctx->hctx_wr.dma_addr = in create_hash_wr()
1557 dma_map_single(&u_ctx->lldi.pdev->dev, req_ctx->reqbfr, in create_hash_wr()
1560 req_ctx->hctx_wr. dma_addr)) { in create_hash_wr()
1564 req_ctx->hctx_wr.dma_len = param->bfr_len; in create_hash_wr()
[all …]