Lines Matching refs:req
39 struct skcipher_request *__restrict req, bool atomic) in skcipher_walk_virt() argument
41 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_walk_virt()
44 might_sleep_if(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP); in skcipher_walk_virt()
48 walk->total = req->cryptlen; in skcipher_walk_virt()
50 walk->iv = req->iv; in skcipher_walk_virt()
51 walk->oiv = req->iv; in skcipher_walk_virt()
52 if (!(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP)) in skcipher_walk_virt()
58 scatterwalk_start(&walk->in, req->src); in skcipher_walk_virt()
59 scatterwalk_start(&walk->out, req->dst); in skcipher_walk_virt()
75 struct aead_request *__restrict req, in skcipher_walk_aead_common() argument
78 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in skcipher_walk_aead_common()
81 walk->iv = req->iv; in skcipher_walk_aead_common()
82 walk->oiv = req->iv; in skcipher_walk_aead_common()
83 if (!(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP)) in skcipher_walk_aead_common()
89 scatterwalk_start_at_pos(&walk->in, req->src, req->assoclen); in skcipher_walk_aead_common()
90 scatterwalk_start_at_pos(&walk->out, req->dst, req->assoclen); in skcipher_walk_aead_common()
101 struct aead_request *__restrict req, in skcipher_walk_aead_encrypt() argument
104 walk->total = req->cryptlen; in skcipher_walk_aead_encrypt()
106 return skcipher_walk_aead_common(walk, req, atomic); in skcipher_walk_aead_encrypt()
111 struct aead_request *__restrict req, in skcipher_walk_aead_decrypt() argument
114 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in skcipher_walk_aead_decrypt()
116 walk->total = req->cryptlen - crypto_aead_authsize(tfm); in skcipher_walk_aead_decrypt()
118 return skcipher_walk_aead_common(walk, req, atomic); in skcipher_walk_aead_decrypt()
186 int crypto_skcipher_encrypt(struct skcipher_request *req) in crypto_skcipher_encrypt() argument
188 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_encrypt()
194 return crypto_lskcipher_encrypt_sg(req); in crypto_skcipher_encrypt()
195 return alg->encrypt(req); in crypto_skcipher_encrypt()
199 int crypto_skcipher_decrypt(struct skcipher_request *req) in crypto_skcipher_decrypt() argument
201 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_decrypt()
207 return crypto_lskcipher_decrypt_sg(req); in crypto_skcipher_decrypt()
208 return alg->decrypt(req); in crypto_skcipher_decrypt()
212 static int crypto_lskcipher_export(struct skcipher_request *req, void *out) in crypto_lskcipher_export() argument
214 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_lskcipher_export()
215 u8 *ivs = skcipher_request_ctx(req); in crypto_lskcipher_export()
225 static int crypto_lskcipher_import(struct skcipher_request *req, const void *in) in crypto_lskcipher_import() argument
227 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_lskcipher_import()
228 u8 *ivs = skcipher_request_ctx(req); in crypto_lskcipher_import()
238 static int skcipher_noexport(struct skcipher_request *req, void *out) in skcipher_noexport() argument
243 static int skcipher_noimport(struct skcipher_request *req, const void *in) in skcipher_noimport() argument
248 int crypto_skcipher_export(struct skcipher_request *req, void *out) in crypto_skcipher_export() argument
250 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_export()
254 return crypto_lskcipher_export(req, out); in crypto_skcipher_export()
255 return alg->export(req, out); in crypto_skcipher_export()
259 int crypto_skcipher_import(struct skcipher_request *req, const void *in) in crypto_skcipher_import() argument
261 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_import()
265 return crypto_lskcipher_import(req, in); in crypto_skcipher_import()
266 return alg->import(req, in); in crypto_skcipher_import()