Lines Matching refs:req_ctx
79 struct pkcs1pad_request *req_ctx = akcipher_request_ctx(req); in pkcs1pad_encrypt_complete() local
87 len = req_ctx->child_req.dst_len; in pkcs1pad_encrypt_complete()
109 kfree(req_ctx->in_buf); in pkcs1pad_encrypt_complete()
131 struct pkcs1pad_request *req_ctx = akcipher_request_ctx(req); in pkcs1pad_encrypt() local
146 req_ctx->in_buf = kmalloc(ctx->key_size - 1 - req->src_len, in pkcs1pad_encrypt()
148 if (!req_ctx->in_buf) in pkcs1pad_encrypt()
152 req_ctx->in_buf[0] = 0x02; in pkcs1pad_encrypt()
154 req_ctx->in_buf[i] = get_random_u32_inclusive(1, 255); in pkcs1pad_encrypt()
155 req_ctx->in_buf[ps_end] = 0x00; in pkcs1pad_encrypt()
157 pkcs1pad_sg_set_buf(req_ctx->in_sg, req_ctx->in_buf, in pkcs1pad_encrypt()
160 akcipher_request_set_tfm(&req_ctx->child_req, ctx->child); in pkcs1pad_encrypt()
161 akcipher_request_set_callback(&req_ctx->child_req, req->base.flags, in pkcs1pad_encrypt()
165 akcipher_request_set_crypt(&req_ctx->child_req, req_ctx->in_sg, in pkcs1pad_encrypt()
168 err = crypto_akcipher_encrypt(&req_ctx->child_req); in pkcs1pad_encrypt()
179 struct pkcs1pad_request *req_ctx = akcipher_request_ctx(req); in pkcs1pad_decrypt_complete() local
188 dst_len = req_ctx->child_req.dst_len; in pkcs1pad_decrypt_complete()
192 out_buf = req_ctx->out_buf; in pkcs1pad_decrypt_complete()
224 kfree_sensitive(req_ctx->out_buf); in pkcs1pad_decrypt_complete()
246 struct pkcs1pad_request *req_ctx = akcipher_request_ctx(req); in pkcs1pad_decrypt() local
252 req_ctx->out_buf = kmalloc(ctx->key_size, GFP_KERNEL); in pkcs1pad_decrypt()
253 if (!req_ctx->out_buf) in pkcs1pad_decrypt()
256 pkcs1pad_sg_set_buf(req_ctx->out_sg, req_ctx->out_buf, in pkcs1pad_decrypt()
259 akcipher_request_set_tfm(&req_ctx->child_req, ctx->child); in pkcs1pad_decrypt()
260 akcipher_request_set_callback(&req_ctx->child_req, req->base.flags, in pkcs1pad_decrypt()
264 akcipher_request_set_crypt(&req_ctx->child_req, req->src, in pkcs1pad_decrypt()
265 req_ctx->out_sg, req->src_len, in pkcs1pad_decrypt()
268 err = crypto_akcipher_decrypt(&req_ctx->child_req); in pkcs1pad_decrypt()