Home
last modified time | relevance | path

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

12

/linux/drivers/crypto/allwinner/sun4i-ss/
H A Dsun4i-ss-cipher.c15 static int noinline_for_stack sun4i_ss_opti_poll(struct skcipher_request *areq) in sun4i_ss_opti_poll() argument
17 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_opti_poll()
21 struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq); in sun4i_ss_opti_poll()
30 unsigned int ileft = areq->cryptlen; in sun4i_ss_opti_poll()
31 unsigned int oleft = areq->cryptlen; in sun4i_ss_opti_poll()
41 if (!areq->cryptlen) in sun4i_ss_opti_poll()
44 if (!areq->src || !areq->dst) { in sun4i_ss_opti_poll()
49 if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { in sun4i_ss_opti_poll()
50 scatterwalk_map_and_copy(ctx->backup_iv, areq->src, in sun4i_ss_opti_poll()
51 areq->cryptlen - ivsize, ivsize, 0); in sun4i_ss_opti_poll()
[all …]
H A Dsun4i-ss-hash.c47 int sun4i_hash_init(struct ahash_request *areq) in sun4i_hash_init() argument
49 struct sun4i_req_ctx *op = ahash_request_ctx(areq); in sun4i_hash_init()
50 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun4i_hash_init()
62 int sun4i_hash_export_md5(struct ahash_request *areq, void *out) in sun4i_hash_export_md5() argument
64 struct sun4i_req_ctx *op = ahash_request_ctx(areq); in sun4i_hash_export_md5()
85 int sun4i_hash_import_md5(struct ahash_request *areq, const void *in) in sun4i_hash_import_md5() argument
87 struct sun4i_req_ctx *op = ahash_request_ctx(areq); in sun4i_hash_import_md5()
91 sun4i_hash_init(areq); in sun4i_hash_import_md5()
104 int sun4i_hash_export_sha1(struct ahash_request *areq, void *out) in sun4i_hash_export_sha1() argument
106 struct sun4i_req_ctx *op = ahash_request_ctx(areq); in sun4i_hash_export_sha1()
[all …]
H A Dsun4i-ss.h201 int sun4i_hash_init(struct ahash_request *areq);
202 int sun4i_hash_update(struct ahash_request *areq);
203 int sun4i_hash_final(struct ahash_request *areq);
204 int sun4i_hash_finup(struct ahash_request *areq);
205 int sun4i_hash_digest(struct ahash_request *areq);
206 int sun4i_hash_export_md5(struct ahash_request *areq, void *out);
207 int sun4i_hash_import_md5(struct ahash_request *areq, const void *in);
208 int sun4i_hash_export_sha1(struct ahash_request *areq, void *out);
209 int sun4i_hash_import_sha1(struct ahash_request *areq, const void *in);
211 int sun4i_ss_cbc_aes_encrypt(struct skcipher_request *areq);
[all …]
/linux/drivers/crypto/amlogic/
H A Damlogic-gxl-cipher.c25 static bool meson_cipher_need_fallback(struct skcipher_request *areq) in meson_cipher_need_fallback() argument
27 struct scatterlist *src_sg = areq->src; in meson_cipher_need_fallback()
28 struct scatterlist *dst_sg = areq->dst; in meson_cipher_need_fallback()
30 if (areq->cryptlen == 0) in meson_cipher_need_fallback()
58 static int meson_cipher_do_fallback(struct skcipher_request *areq) in meson_cipher_do_fallback() argument
60 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in meson_cipher_do_fallback()
62 struct meson_cipher_req_ctx *rctx = skcipher_request_ctx(areq); in meson_cipher_do_fallback()
72 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags, in meson_cipher_do_fallback()
73 areq->base.complete, areq->base.data); in meson_cipher_do_fallback()
74 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst, in meson_cipher_do_fallback()
[all …]
H A Damlogic-gxl.h157 int meson_skdecrypt(struct skcipher_request *areq);
158 int meson_skencrypt(struct skcipher_request *areq);
159 int meson_handle_cipher_request(struct crypto_engine *engine, void *areq);
/linux/drivers/crypto/gemini/
H A Dsl3516-ce-cipher.c25 static bool sl3516_ce_need_fallback(struct skcipher_request *areq) in sl3516_ce_need_fallback() argument
27 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_need_fallback()
34 if (areq->cryptlen == 0 || areq->cryptlen % 16) { in sl3516_ce_need_fallback()
43 if (sg_nents(areq->src) > MAXDESC / 2) { in sl3516_ce_need_fallback()
48 if (sg_nents(areq->dst) > MAXDESC) { in sl3516_ce_need_fallback()
53 sg = areq->src; in sl3516_ce_need_fallback()
69 sg = areq->dst; in sl3516_ce_need_fallback()
87 in_sg = areq->src; in sl3516_ce_need_fallback()
88 out_sg = areq->dst; in sl3516_ce_need_fallback()
103 static int sl3516_ce_cipher_fallback(struct skcipher_request *areq) in sl3516_ce_cipher_fallback() argument
[all …]
H A Dsl3516-ce.h333 int sl3516_ce_skdecrypt(struct skcipher_request *areq);
334 int sl3516_ce_skencrypt(struct skcipher_request *areq);
341 int sl3516_ce_handle_cipher_request(struct crypto_engine *engine, void *areq);
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_aead.c192 struct aead_request *areq = arg; in nitrox_aead_callback() local
193 struct nitrox_aead_rctx *rctx = aead_request_ctx(areq); in nitrox_aead_callback()
202 aead_request_complete(areq, err); in nitrox_aead_callback()
213 static int nitrox_aes_gcm_enc(struct aead_request *areq) in nitrox_aes_gcm_enc() argument
215 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in nitrox_aes_gcm_enc()
217 struct nitrox_aead_rctx *rctx = aead_request_ctx(areq); in nitrox_aes_gcm_enc()
222 if (!nitrox_aes_gcm_assoclen_supported(areq->assoclen)) in nitrox_aes_gcm_enc()
225 memcpy(fctx->crypto.iv, areq->iv, GCM_AES_SALT_SIZE); in nitrox_aes_gcm_enc()
227 rctx->cryptlen = areq->cryptlen; in nitrox_aes_gcm_enc()
228 rctx->assoclen = areq->assoclen; in nitrox_aes_gcm_enc()
[all …]
/linux/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-hash.c144 int sun8i_ss_hash_init(struct ahash_request *areq) in sun8i_ss_hash_init() argument
146 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ss_hash_init()
147 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ss_hash_init()
154 areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP, in sun8i_ss_hash_init()
155 areq->base.complete, areq->base.data); in sun8i_ss_hash_init()
160 int sun8i_ss_hash_export(struct ahash_request *areq, void *out) in sun8i_ss_hash_export() argument
162 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ss_hash_export()
163 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ss_hash_export()
168 areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP, in sun8i_ss_hash_export()
169 areq->base.complete, areq->base.data); in sun8i_ss_hash_export()
[all …]
/linux/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c224 static int safexcel_ahash_enqueue(struct ahash_request *areq);
232 struct ahash_request *areq = ahash_request_cast(async); in safexcel_handle_req_result() local
233 struct crypto_ahash *ahash = crypto_ahash_reqtfm(areq); in safexcel_handle_req_result()
234 struct safexcel_ahash_req *sreq = ahash_request_ctx_dma(areq); in safexcel_handle_req_result()
252 dma_unmap_sg(priv->dev, areq->src, in safexcel_handle_req_result()
253 sg_nents_for_len(areq->src, areq->nbytes), in safexcel_handle_req_result()
287 areq->nbytes = 0; in safexcel_handle_req_result()
288 safexcel_ahash_enqueue(areq); in safexcel_handle_req_result()
294 memcpy(areq->result, sreq->state, in safexcel_handle_req_result()
310 struct ahash_request *areq = ahash_request_cast(async); in safexcel_ahash_send_req() local
[all …]
/linux/crypto/
H A Dalgif_skcipher.c84 struct af_alg_async_req *areq = data; in algif_skcipher_done() local
85 struct sock *sk = areq->sk; in algif_skcipher_done()
90 err = algif_skcipher_export(sk, &areq->cra_u.skcipher_req); in algif_skcipher_done()
106 struct af_alg_async_req *areq; in _skcipher_recvmsg() local
118 areq = af_alg_alloc_areq(sk, sizeof(struct af_alg_async_req) + in _skcipher_recvmsg()
120 if (IS_ERR(areq)) in _skcipher_recvmsg()
121 return PTR_ERR(areq); in _skcipher_recvmsg()
124 err = af_alg_get_rsgl(sk, msg, flags, areq, ctx->used, &len); in _skcipher_recvmsg()
141 areq->tsgl_entries = af_alg_count_tsgl(sk, len, 0); in _skcipher_recvmsg()
142 if (!areq->tsgl_entries) in _skcipher_recvmsg()
[all …]
H A Daf_alg.c770 static void af_alg_free_areq_sgls(struct af_alg_async_req *areq) in af_alg_free_areq_sgls() argument
772 struct sock *sk = areq->sk; in af_alg_free_areq_sgls()
780 list_for_each_entry_safe(rsgl, tmp, &areq->rsgl_list, list) { in af_alg_free_areq_sgls()
784 if (rsgl != &areq->first_rsgl) in af_alg_free_areq_sgls()
788 tsgl = areq->tsgl; in af_alg_free_areq_sgls()
790 for_each_sg(tsgl, sg, areq->tsgl_entries, i) { in af_alg_free_areq_sgls()
796 sock_kfree_s(sk, tsgl, areq->tsgl_entries * sizeof(*tsgl)); in af_alg_free_areq_sgls()
1125 void af_alg_free_resources(struct af_alg_async_req *areq) in af_alg_free_resources() argument
1127 struct sock *sk = areq->sk; in af_alg_free_resources()
1130 af_alg_free_areq_sgls(areq); in af_alg_free_resources()
[all …]
H A Dauthenc.c177 struct aead_request *areq = data; in crypto_authenc_encrypt_done() local
180 aead_request_complete(areq, err); in crypto_authenc_encrypt_done()
183 err = crypto_authenc_genicv(areq, CRYPTO_TFM_REQ_MAY_SLEEP); in crypto_authenc_encrypt_done()
184 authenc_request_complete(areq, err); in crypto_authenc_encrypt_done()
/linux/drivers/crypto/rockchip/
H A Drk3288_crypto_skcipher.c68 static int rk_cipher_fallback(struct skcipher_request *areq) in rk_cipher_fallback() argument
70 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in rk_cipher_fallback()
72 struct rk_cipher_rctx *rctx = skcipher_request_ctx(areq); in rk_cipher_fallback()
80 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags, in rk_cipher_fallback()
81 areq->base.complete, areq->base.data); in rk_cipher_fallback()
82 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst, in rk_cipher_fallback()
83 areq->cryptlen, areq->iv); in rk_cipher_fallback()
301 struct skcipher_request *areq = container_of(async_req, struct skcipher_request, base); in rk_cipher_run() local
302 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in rk_cipher_run()
303 struct rk_cipher_rctx *rctx = skcipher_request_ctx(areq); in rk_cipher_run()
[all …]
/linux/drivers/net/ethernet/fungible/funcore/
H A Dfun_dev.c225 const struct fun_dev_params *areq) in fun_enable_admin_queue() argument
228 .cqe_size_log2 = areq->cqe_size_log2, in fun_enable_admin_queue()
229 .sqe_size_log2 = areq->sqe_size_log2, in fun_enable_admin_queue()
230 .cq_depth = areq->cq_depth, in fun_enable_admin_queue()
231 .sq_depth = areq->sq_depth, in fun_enable_admin_queue()
232 .rq_depth = areq->rq_depth, in fun_enable_admin_queue()
234 unsigned int ntags = areq->sq_depth - 1; in fun_enable_admin_queue()
241 if (areq->sq_depth < AQA_MIN_QUEUE_SIZE || in fun_enable_admin_queue()
242 areq->sq_depth > AQA_MAX_QUEUE_SIZE || in fun_enable_admin_queue()
243 areq->cq_depth < AQA_MIN_QUEUE_SIZE || in fun_enable_admin_queue()
[all …]
/linux/drivers/crypto/axis/
H A Dartpec6_crypto.c360 static int artpec6_crypto_prepare_aead(struct aead_request *areq);
361 static int artpec6_crypto_prepare_crypto(struct skcipher_request *areq);
362 static int artpec6_crypto_prepare_hash(struct ahash_request *areq);
1308 static int artpec6_crypto_prepare_hash(struct ahash_request *areq) in artpec6_crypto_prepare_hash() argument
1310 struct artpec6_hashalg_context *ctx = crypto_tfm_ctx(areq->base.tfm); in artpec6_crypto_prepare_hash()
1311 struct artpec6_hash_request_context *req_ctx = ahash_request_ctx(areq); in artpec6_crypto_prepare_hash()
1312 size_t digestsize = crypto_ahash_digestsize(crypto_ahash_reqtfm(areq)); in artpec6_crypto_prepare_hash()
1315 crypto_ahash_tfm(crypto_ahash_reqtfm(areq))); in artpec6_crypto_prepare_hash()
1401 size_t total_bytes = areq->nbytes + req_ctx->partial_bytes; in artpec6_crypto_prepare_hash()
1427 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_hash()
[all …]
/linux/drivers/crypto/
H A Datmel-i2c.h168 void (*cbk)(struct atmel_i2c_work_data *work_data, void *areq,
170 void *areq; member
179 void *areq, int status),
180 void *areq);
H A Datmel-i2c.c287 work_data->cbk(work_data, work_data->areq, status); in atmel_i2c_work_handler()
294 void *areq, int status), in atmel_i2c_enqueue() argument
295 void *areq) in atmel_i2c_enqueue()
298 work_data->areq = areq; in atmel_i2c_enqueue()
H A Datmel-sha204a.c22 void *areq, int status) in atmel_sha204a_rng_done() argument
25 struct hwrng *rng = areq; in atmel_sha204a_rng_done()
/linux/drivers/crypto/stm32/
H A Dstm32-cryp.c204 struct aead_request *areq; member
573 return is_encrypt(cryp) ? cryp->areq->cryptlen : in stm32_cryp_get_input_text_len()
574 cryp->areq->cryptlen - cryp->authsize; in stm32_cryp_get_input_text_len()
583 memcpy(iv, cryp->areq->iv, 12); in stm32_cryp_gcm_init()
598 if (cryp->areq->assoclen) { in stm32_cryp_gcm_init()
648 u32 alen = cryp->areq->assoclen; in stm32_cryp_write_ccm_first_header()
689 memcpy(iv, cryp->areq->iv, AES_BLOCK_SIZE); in stm32_cryp_ccm_init()
699 if (cryp->areq->assoclen) in stm32_cryp_ccm_init()
730 if (cryp->areq->assoclen) { in stm32_cryp_ccm_init()
858 crypto_finalize_aead_request(cryp->engine, cryp->areq, err); in stm32_cryp_finish_req()
[all …]
/linux/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_reqmgr.c91 pentry->areq = NULL; in free_pentry()
312 gfp = (req->areq->flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? GFP_KERNEL : in process_request()
356 pentry->areq = req->areq; in process_request()
513 struct crypto_async_request *areq; in process_pending_queue() local
574 areq = resume_pentry->areq; in process_pending_queue()
583 callback(-EINPROGRESS, areq, cpt_info); in process_pending_queue()
589 areq = pentry->areq; in process_pending_queue()
602 callback(res_code, areq, cpt_info); in process_pending_queue()
H A Dotx_cptvf_algs.c105 req = container_of(cpt_req->areq, struct aead_request, base); in validate_hmac_cipher_null()
119 struct crypto_async_request *areq = arg1; in otx_cpt_aead_callback() local
141 if (areq) in otx_cpt_aead_callback()
142 crypto_request_complete(areq, status); in otx_cpt_aead_callback()
145 static void output_iv_copyback(struct crypto_async_request *areq) in output_iv_copyback() argument
154 sreq = container_of(areq, struct skcipher_request, base); in output_iv_copyback()
182 struct crypto_async_request *areq = arg1; in otx_cpt_skcipher_callback() local
185 if (areq) { in otx_cpt_skcipher_callback()
187 output_iv_copyback(areq); in otx_cpt_skcipher_callback()
192 crypto_request_complete(areq, status); in otx_cpt_skcipher_callback()
[all …]
H A Dotx_cptvf_reqmgr.h143 struct crypto_async_request *areq; /* Async request callback arg */ member
160 struct crypto_async_request *areq; /* Async request callback arg */ member
/linux/drivers/crypto/caam/
H A Djr.h16 void *areq),
17 void *areq);
/linux/include/crypto/
H A Dif_alg.h240 void af_alg_free_resources(struct af_alg_async_req *areq);
247 struct af_alg_async_req *areq, size_t maxsize,

12