/Linux-v4.19/crypto/ |
D | rsa-pkcs1pad.c | 180 struct pkcs1pad_request *req_ctx = akcipher_request_ctx(req); in pkcs1pad_encrypt_sign_complete() local 188 len = req_ctx->child_req.dst_len; in pkcs1pad_encrypt_sign_complete() 210 kfree(req_ctx->in_buf); in pkcs1pad_encrypt_sign_complete() 235 struct pkcs1pad_request *req_ctx = akcipher_request_ctx(req); in pkcs1pad_encrypt() local 250 req_ctx->in_buf = kmalloc(ctx->key_size - 1 - req->src_len, in pkcs1pad_encrypt() 252 if (!req_ctx->in_buf) in pkcs1pad_encrypt() 256 req_ctx->in_buf[0] = 0x02; in pkcs1pad_encrypt() 258 req_ctx->in_buf[i] = 1 + prandom_u32_max(255); in pkcs1pad_encrypt() 259 req_ctx->in_buf[ps_end] = 0x00; in pkcs1pad_encrypt() 261 pkcs1pad_sg_set_buf(req_ctx->in_sg, req_ctx->in_buf, in pkcs1pad_encrypt() [all …]
|
/Linux-v4.19/drivers/crypto/axis/ |
D | artpec6_crypto.c | 1093 struct artpec6_crypto_request_context *req_ctx = NULL; in artpec6_crypto_encrypt() local 1097 req_ctx = skcipher_request_ctx(req); in artpec6_crypto_encrypt() 1103 req_ctx->decrypt = 0; in artpec6_crypto_encrypt() 1118 ret = artpec6_crypto_common_init(&req_ctx->common, in artpec6_crypto_encrypt() 1127 artpec6_crypto_common_destroy(&req_ctx->common); in artpec6_crypto_encrypt() 1131 return artpec6_crypto_submit(&req_ctx->common); in artpec6_crypto_encrypt() 1139 struct artpec6_crypto_request_context *req_ctx = NULL; in artpec6_crypto_decrypt() local 1142 req_ctx = skcipher_request_ctx(req); in artpec6_crypto_decrypt() 1148 req_ctx->decrypt = 1; in artpec6_crypto_decrypt() 1164 ret = artpec6_crypto_common_init(&req_ctx->common, &req->base, in artpec6_crypto_decrypt() [all …]
|
/Linux-v4.19/drivers/crypto/ |
D | talitos.c | 1713 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in common_nonsnoop_hash_unmap() local 1724 talitos_sg_unmap(dev, edesc, req_ctx->psrc, NULL, 0, 0); in common_nonsnoop_hash_unmap() 1734 if (is_sec1 && req_ctx->nbuf) in common_nonsnoop_hash_unmap() 1754 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_done() local 1756 if (!req_ctx->last && req_ctx->to_hash_later) { in ahash_done() 1758 req_ctx->buf_idx = (req_ctx->buf_idx + 1) & 1; in ahash_done() 1759 req_ctx->nbuf = req_ctx->to_hash_later; in ahash_done() 1798 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in common_nonsnoop_hash() local 1810 if (!req_ctx->first || req_ctx->swinit) { in common_nonsnoop_hash() 1812 req_ctx->hw_context_size, in common_nonsnoop_hash() [all …]
|
D | ixp4xx_crypto.c | 347 struct aead_ctx *req_ctx = aead_request_ctx(req); in finish_scattered_hmac() local 352 if (req_ctx->encrypt) { in finish_scattered_hmac() 353 scatterwalk_map_and_copy(req_ctx->hmac_virt, in finish_scattered_hmac() 356 dma_pool_free(buffer_pool, req_ctx->hmac_virt, crypt->icv_rev_aes); in finish_scattered_hmac() 373 struct aead_ctx *req_ctx = aead_request_ctx(req); in one_packet() local 375 free_buf_chain(dev, req_ctx->src, crypt->src_buf); in one_packet() 376 free_buf_chain(dev, req_ctx->dst, crypt->dst_buf); in one_packet() 377 if (req_ctx->hmac_virt) { in one_packet() 385 struct ablk_ctx *req_ctx = ablkcipher_request_ctx(req); in one_packet() local 387 if (req_ctx->dst) { in one_packet() [all …]
|
/Linux-v4.19/drivers/crypto/ccree/ |
D | cc_cipher.c | 386 struct cipher_req_ctx *req_ctx, in cc_setup_cipher_desc() argument 395 int direction = req_ctx->gen_ctx.op_type; in cc_setup_cipher_desc() 398 dma_addr_t iv_dma_addr = req_ctx->gen_ctx.iv_dma_addr; in cc_setup_cipher_desc() 508 struct cipher_req_ctx *req_ctx, in cc_setup_cipher_data() argument 530 if (req_ctx->dma_buf_type == CC_DMA_BUF_DLLI) { in cc_setup_cipher_data() 548 &req_ctx->mlli_params.mlli_dma_addr, in cc_setup_cipher_data() 549 req_ctx->mlli_params.mlli_len, in cc_setup_cipher_data() 553 req_ctx->mlli_params.mlli_dma_addr, in cc_setup_cipher_data() 554 req_ctx->mlli_params.mlli_len, NS_BIT); in cc_setup_cipher_data() 557 req_ctx->mlli_params.mlli_len); in cc_setup_cipher_data() [all …]
|
D | cc_aead.c | 867 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_proc_digest_desc() local 871 int direct = req_ctx->gen_ctx.op_type; in cc_proc_digest_desc() 878 set_dout_dlli(&desc[idx], req_ctx->icv_dma_addr, ctx->authsize, in cc_proc_digest_desc() 894 set_dout_dlli(&desc[idx], req_ctx->mac_buf_dma_addr, in cc_proc_digest_desc() 917 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_set_cipher_desc() local 918 unsigned int hw_iv_size = req_ctx->hw_iv_size; in cc_set_cipher_desc() 920 int direct = req_ctx->gen_ctx.op_type; in cc_set_cipher_desc() 926 set_din_type(&desc[idx], DMA_DLLI, req_ctx->gen_ctx.iv_dma_addr, in cc_set_cipher_desc() 959 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_proc_cipher() local 960 int direct = req_ctx->gen_ctx.op_type; in cc_proc_cipher() [all …]
|
D | cc_buffer_mgr.c | 451 struct cipher_req_ctx *req_ctx = (struct cipher_req_ctx *)ctx; in cc_unmap_cipher_request() local 453 if (req_ctx->gen_ctx.iv_dma_addr) { in cc_unmap_cipher_request() 455 &req_ctx->gen_ctx.iv_dma_addr, ivsize); in cc_unmap_cipher_request() 456 dma_unmap_single(dev, req_ctx->gen_ctx.iv_dma_addr, in cc_unmap_cipher_request() 460 if (req_ctx->dma_buf_type == CC_DMA_BUF_MLLI && in cc_unmap_cipher_request() 461 req_ctx->mlli_params.mlli_virt_addr) { in cc_unmap_cipher_request() 462 dma_pool_free(req_ctx->mlli_params.curr_pool, in cc_unmap_cipher_request() 463 req_ctx->mlli_params.mlli_virt_addr, in cc_unmap_cipher_request() 464 req_ctx->mlli_params.mlli_dma_addr); in cc_unmap_cipher_request() 467 dma_unmap_sg(dev, src, req_ctx->in_nents, DMA_BIDIRECTIONAL); in cc_unmap_cipher_request() [all …]
|
/Linux-v4.19/drivers/crypto/ux500/hash/ |
D | hash_core.c | 553 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-v4.19/drivers/crypto/chelsio/ |
D | chcr_algo.c | 1471 struct chcr_ahash_req_ctx *req_ctx = ahash_request_ctx(req); in create_hash_wr() local 1486 req_ctx->hctx_wr.imm = (transhdr_len + param->bfr_len + in create_hash_wr() 1488 nents = sg_nents_xlen(req_ctx->hctx_wr.srcsg, param->sg_len, in create_hash_wr() 1489 CHCR_SRC_SG_SIZE, req_ctx->hctx_wr.src_ofst); in create_hash_wr() 1491 transhdr_len += req_ctx->hctx_wr.imm ? roundup(param->bfr_len + in create_hash_wr() 1515 memcpy(chcr_req->key_ctx.key, req_ctx->partial_hash, in create_hash_wr() 1533 req_ctx->hctx_wr.dma_addr = in create_hash_wr() 1534 dma_map_single(&u_ctx->lldi.pdev->dev, req_ctx->reqbfr, in create_hash_wr() 1537 req_ctx->hctx_wr. dma_addr)) { in create_hash_wr() 1541 req_ctx->hctx_wr.dma_len = param->bfr_len; in create_hash_wr() [all …]
|
/Linux-v4.19/arch/x86/crypto/sha1-mb/ |
D | sha1_mb.c | 440 struct mcryptd_hash_request_ctx *req_ctx; in sha_complete_job() local 459 req_ctx = cast_hash_to_mcryptd_ctx(sha_ctx); in sha_complete_job() 460 ret = sha_finish_walk(&req_ctx, cstate, false); in sha_complete_job() 461 if (req_ctx) { in sha_complete_job() 463 list_del(&req_ctx->waiter); in sha_complete_job() 466 req = cast_mcryptd_ctx_to_req(req_ctx); in sha_complete_job() 468 req_ctx->complete(&req->base, ret); in sha_complete_job() 471 req_ctx->complete(&req->base, ret); in sha_complete_job()
|
/Linux-v4.19/arch/x86/crypto/sha256-mb/ |
D | sha256_mb.c | 439 struct mcryptd_hash_request_ctx *req_ctx; in sha_complete_job() local 458 req_ctx = cast_hash_to_mcryptd_ctx(sha_ctx); in sha_complete_job() 459 ret = sha_finish_walk(&req_ctx, cstate, false); in sha_complete_job() 460 if (req_ctx) { in sha_complete_job() 462 list_del(&req_ctx->waiter); in sha_complete_job() 465 req = cast_mcryptd_ctx_to_req(req_ctx); in sha_complete_job() 467 req_ctx->complete(&req->base, ret); in sha_complete_job() 470 req_ctx->complete(&req->base, ret); in sha_complete_job()
|
/Linux-v4.19/arch/x86/crypto/sha512-mb/ |
D | sha512_mb.c | 468 struct mcryptd_hash_request_ctx *req_ctx; in sha_complete_job() local 488 req_ctx = cast_hash_to_mcryptd_ctx(sha_ctx); in sha_complete_job() 489 ret = sha_finish_walk(&req_ctx, cstate, false); in sha_complete_job() 490 if (req_ctx) { in sha_complete_job() 492 list_del(&req_ctx->waiter); in sha_complete_job() 495 req = cast_mcryptd_ctx_to_req(req_ctx); in sha_complete_job() 497 req_ctx->complete(&req->base, ret); in sha_complete_job() 500 req_ctx->complete(&req->base, ret); in sha_complete_job()
|
/Linux-v4.19/drivers/crypto/caam/ |
D | caampkc.c | 218 struct caam_rsa_req_ctx *req_ctx = akcipher_request_ctx(req); in rsa_edesc_alloc() local 233 req->src = scatterwalk_ffwd(req_ctx->src, req->src, lzeros); in rsa_edesc_alloc()
|