• Home
  • Raw
  • Download

Lines Matching refs:rctx

94 				     struct hctr2_request_ctx *rctx)  in hctr2_hashed_tweak()  argument
96 return (u8 *)rctx + tctx->hashed_tweak_offset; in hctr2_hashed_tweak()
174 struct hctr2_request_ctx *rctx = skcipher_request_ctx(req); in hctr2_hash_tweak() local
175 struct shash_desc *hash_desc = &rctx->u.hash_desc; in hctr2_hash_tweak()
189 return crypto_shash_export(hash_desc, hctr2_hashed_tweak(tctx, rctx)); in hctr2_hash_tweak()
197 struct hctr2_request_ctx *rctx = skcipher_request_ctx(req); in hctr2_hash_message() local
198 struct shash_desc *hash_desc = &rctx->u.hash_desc; in hctr2_hash_message()
233 struct hctr2_request_ctx *rctx = skcipher_request_ctx(req); in hctr2_finish() local
235 struct shash_desc *hash_desc = &rctx->u.hash_desc; in hctr2_finish()
241 err = crypto_shash_import(hash_desc, hctr2_hashed_tweak(tctx, rctx)); in hctr2_finish()
244 err = hctr2_hash_message(req, rctx->bulk_part_dst, digest); in hctr2_finish()
247 crypto_xor(rctx->first_block, digest, BLOCKCIPHER_BLOCK_SIZE); in hctr2_finish()
250 scatterwalk_map_and_copy(rctx->first_block, req->dst, in hctr2_finish()
270 struct hctr2_request_ctx *rctx = skcipher_request_ctx(req); in hctr2_crypt() local
280 scatterwalk_map_and_copy(rctx->first_block, req->src, in hctr2_crypt()
284 rctx->bulk_part_src = scatterwalk_ffwd(rctx->sg_src, req->src, in hctr2_crypt()
286 rctx->bulk_part_dst = scatterwalk_ffwd(rctx->sg_dst, req->dst, in hctr2_crypt()
294 err = hctr2_hash_message(req, rctx->bulk_part_src, digest); in hctr2_crypt()
297 crypto_xor(digest, rctx->first_block, BLOCKCIPHER_BLOCK_SIZE); in hctr2_crypt()
302 crypto_cipher_encrypt_one(tctx->blockcipher, rctx->first_block, in hctr2_crypt()
305 crypto_cipher_decrypt_one(tctx->blockcipher, rctx->first_block, in hctr2_crypt()
309 crypto_xor(digest, rctx->first_block, BLOCKCIPHER_BLOCK_SIZE); in hctr2_crypt()
310 crypto_xor_cpy(rctx->xctr_iv, digest, tctx->L, BLOCKCIPHER_BLOCK_SIZE); in hctr2_crypt()
314 skcipher_request_set_tfm(&rctx->u.xctr_req, tctx->xctr); in hctr2_crypt()
315 skcipher_request_set_crypt(&rctx->u.xctr_req, rctx->bulk_part_src, in hctr2_crypt()
316 rctx->bulk_part_dst, bulk_len, in hctr2_crypt()
317 rctx->xctr_iv); in hctr2_crypt()
318 skcipher_request_set_callback(&rctx->u.xctr_req, in hctr2_crypt()
321 return crypto_skcipher_encrypt(&rctx->u.xctr_req) ?: in hctr2_crypt()