Lines Matching refs:req
51 static int skcipher_crypt_blkcipher(struct skcipher_request *req, in skcipher_crypt_blkcipher() argument
57 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_crypt_blkcipher()
61 .info = req->iv, in skcipher_crypt_blkcipher()
62 .flags = req->base.flags, in skcipher_crypt_blkcipher()
66 return crypt(&desc, req->dst, req->src, req->cryptlen); in skcipher_crypt_blkcipher()
69 static int skcipher_encrypt_blkcipher(struct skcipher_request *req) in skcipher_encrypt_blkcipher() argument
71 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in skcipher_encrypt_blkcipher()
75 return skcipher_crypt_blkcipher(req, alg->encrypt); in skcipher_encrypt_blkcipher()
78 static int skcipher_decrypt_blkcipher(struct skcipher_request *req) in skcipher_decrypt_blkcipher() argument
80 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in skcipher_decrypt_blkcipher()
84 return skcipher_crypt_blkcipher(req, alg->decrypt); in skcipher_decrypt_blkcipher()
145 static int skcipher_crypt_ablkcipher(struct skcipher_request *req, in skcipher_crypt_ablkcipher() argument
148 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_crypt_ablkcipher()
150 struct ablkcipher_request *subreq = skcipher_request_ctx(req); in skcipher_crypt_ablkcipher()
153 ablkcipher_request_set_callback(subreq, skcipher_request_flags(req), in skcipher_crypt_ablkcipher()
154 req->base.complete, req->base.data); in skcipher_crypt_ablkcipher()
155 ablkcipher_request_set_crypt(subreq, req->src, req->dst, req->cryptlen, in skcipher_crypt_ablkcipher()
156 req->iv); in skcipher_crypt_ablkcipher()
161 static int skcipher_encrypt_ablkcipher(struct skcipher_request *req) in skcipher_encrypt_ablkcipher() argument
163 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in skcipher_encrypt_ablkcipher()
167 return skcipher_crypt_ablkcipher(req, alg->encrypt); in skcipher_encrypt_ablkcipher()
170 static int skcipher_decrypt_ablkcipher(struct skcipher_request *req) in skcipher_decrypt_ablkcipher() argument
172 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in skcipher_decrypt_ablkcipher()
176 return skcipher_crypt_ablkcipher(req, alg->decrypt); in skcipher_decrypt_ablkcipher()