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