Lines Matching refs:req

24 	struct skcipher_request *req = skcipher_request_cast(async_req);
25 struct ccp_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
26 struct ccp_aes_req_ctx *rctx = skcipher_request_ctx(req);
32 memcpy(req->iv, rctx->iv, AES_BLOCK_SIZE);
65 static int ccp_aes_crypt(struct skcipher_request *req, bool encrypt)
67 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
69 struct ccp_aes_req_ctx *rctx = skcipher_request_ctx(req);
79 (req->cryptlen & (AES_BLOCK_SIZE - 1)))
83 if (!req->iv)
86 memcpy(rctx->iv, req->iv, AES_BLOCK_SIZE);
103 rctx->cmd.u.aes.src = req->src;
104 rctx->cmd.u.aes.src_len = req->cryptlen;
105 rctx->cmd.u.aes.dst = req->dst;
107 ret = ccp_crypto_enqueue_request(&req->base, &rctx->cmd);
112 static int ccp_aes_encrypt(struct skcipher_request *req)
114 return ccp_aes_crypt(req, true);
117 static int ccp_aes_decrypt(struct skcipher_request *req)
119 return ccp_aes_crypt(req, false);
137 struct skcipher_request *req = skcipher_request_cast(async_req);
138 struct ccp_aes_req_ctx *rctx = skcipher_request_ctx(req);
141 req->iv = rctx->rfc3686_info;
160 static int ccp_aes_rfc3686_crypt(struct skcipher_request *req, bool encrypt)
162 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
164 struct ccp_aes_req_ctx *rctx = skcipher_request_ctx(req);
172 memcpy(iv, req->iv, CTR_RFC3686_IV_SIZE);
178 rctx->rfc3686_info = req->iv;
179 req->iv = rctx->rfc3686_iv;
181 return ccp_aes_crypt(req, encrypt);
184 static int ccp_aes_rfc3686_encrypt(struct skcipher_request *req)
186 return ccp_aes_rfc3686_crypt(req, true);
189 static int ccp_aes_rfc3686_decrypt(struct skcipher_request *req)
191 return ccp_aes_rfc3686_crypt(req, false);