Lines Matching refs:rctx
65 struct ccp_aes_req_ctx *rctx = skcipher_request_ctx_dma(req); in ccp_aes_xts_complete() local
70 memcpy(req->iv, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_xts_complete()
109 struct ccp_aes_req_ctx *rctx = skcipher_request_ctx_dma(req); in ccp_aes_xts_crypt() local
151 skcipher_request_set_tfm(&rctx->fallback_req, in ccp_aes_xts_crypt()
153 skcipher_request_set_callback(&rctx->fallback_req, in ccp_aes_xts_crypt()
157 skcipher_request_set_crypt(&rctx->fallback_req, req->src, in ccp_aes_xts_crypt()
159 ret = encrypt ? crypto_skcipher_encrypt(&rctx->fallback_req) : in ccp_aes_xts_crypt()
160 crypto_skcipher_decrypt(&rctx->fallback_req); in ccp_aes_xts_crypt()
164 memcpy(rctx->iv, req->iv, AES_BLOCK_SIZE); in ccp_aes_xts_crypt()
165 sg_init_one(&rctx->iv_sg, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_xts_crypt()
167 memset(&rctx->cmd, 0, sizeof(rctx->cmd)); in ccp_aes_xts_crypt()
168 INIT_LIST_HEAD(&rctx->cmd.entry); in ccp_aes_xts_crypt()
169 rctx->cmd.engine = CCP_ENGINE_XTS_AES_128; in ccp_aes_xts_crypt()
170 rctx->cmd.u.xts.type = CCP_AES_TYPE_128; in ccp_aes_xts_crypt()
171 rctx->cmd.u.xts.action = (encrypt) ? CCP_AES_ACTION_ENCRYPT in ccp_aes_xts_crypt()
173 rctx->cmd.u.xts.unit_size = unit_size; in ccp_aes_xts_crypt()
174 rctx->cmd.u.xts.key = &ctx->u.aes.key_sg; in ccp_aes_xts_crypt()
175 rctx->cmd.u.xts.key_len = ctx->u.aes.key_len; in ccp_aes_xts_crypt()
176 rctx->cmd.u.xts.iv = &rctx->iv_sg; in ccp_aes_xts_crypt()
177 rctx->cmd.u.xts.iv_len = AES_BLOCK_SIZE; in ccp_aes_xts_crypt()
178 rctx->cmd.u.xts.src = req->src; in ccp_aes_xts_crypt()
179 rctx->cmd.u.xts.src_len = req->cryptlen; in ccp_aes_xts_crypt()
180 rctx->cmd.u.xts.dst = req->dst; in ccp_aes_xts_crypt()
182 ret = ccp_crypto_enqueue_request(&req->base, &rctx->cmd); in ccp_aes_xts_crypt()