Lines Matching refs:areq

363 static int artpec6_crypto_prepare_aead(struct aead_request *areq);
364 static int artpec6_crypto_prepare_crypto(struct skcipher_request *areq);
365 static int artpec6_crypto_prepare_hash(struct ahash_request *areq);
1313 static int artpec6_crypto_prepare_hash(struct ahash_request *areq) in artpec6_crypto_prepare_hash() argument
1315 struct artpec6_hashalg_context *ctx = crypto_tfm_ctx(areq->base.tfm); in artpec6_crypto_prepare_hash()
1316 struct artpec6_hash_request_context *req_ctx = ahash_request_ctx(areq); in artpec6_crypto_prepare_hash()
1317 size_t digestsize = crypto_ahash_digestsize(crypto_ahash_reqtfm(areq)); in artpec6_crypto_prepare_hash()
1321 crypto_ahash_tfm(crypto_ahash_reqtfm(areq))); in artpec6_crypto_prepare_hash()
1407 size_t total_bytes = areq->nbytes + req_ctx->partial_bytes; in artpec6_crypto_prepare_hash()
1433 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_hash()
1443 size_t sg_rem = areq->nbytes - sg_skip; in artpec6_crypto_prepare_hash()
1445 sg_pcopy_to_buffer(areq->src, sg_nents(areq->src), in artpec6_crypto_prepare_hash()
1503 error = artpec6_crypto_setup_in_descr(common, areq->result, in artpec6_crypto_prepare_hash()
1681 static int artpec6_crypto_prepare_crypto(struct skcipher_request *areq) in artpec6_crypto_prepare_crypto() argument
1685 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(areq); in artpec6_crypto_prepare_crypto()
1697 req_ctx = skcipher_request_ctx(areq); in artpec6_crypto_prepare_crypto()
1799 ret = artpec6_crypto_setup_out_descr(common, areq->iv, iv_len, in artpec6_crypto_prepare_crypto()
1805 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_crypto()
1806 ret = artpec6_crypto_setup_sg_descrs_out(common, &walk, areq->cryptlen); in artpec6_crypto_prepare_crypto()
1811 artpec6_crypto_walk_init(&walk, areq->dst); in artpec6_crypto_prepare_crypto()
1812 ret = artpec6_crypto_setup_sg_descrs_in(common, &walk, areq->cryptlen); in artpec6_crypto_prepare_crypto()
1819 size_t pad = ALIGN(areq->cryptlen, AES_BLOCK_SIZE) - in artpec6_crypto_prepare_crypto()
1820 areq->cryptlen; in artpec6_crypto_prepare_crypto()
1848 static int artpec6_crypto_prepare_aead(struct aead_request *areq) in artpec6_crypto_prepare_aead() argument
1853 struct artpec6_cryptotfm_context *ctx = crypto_tfm_ctx(areq->base.tfm); in artpec6_crypto_prepare_aead()
1854 struct artpec6_crypto_aead_req_ctx *req_ctx = aead_request_ctx(areq); in artpec6_crypto_prepare_aead()
1855 struct crypto_aead *cipher = crypto_aead_reqtfm(areq); in artpec6_crypto_prepare_aead()
1925 input_length = areq->cryptlen; in artpec6_crypto_prepare_aead()
1931 __cpu_to_be64(8*areq->assoclen); in artpec6_crypto_prepare_aead()
1936 memcpy(req_ctx->hw_ctx.J0, areq->iv, crypto_aead_ivsize(cipher)); in artpec6_crypto_prepare_aead()
1948 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_aead()
1951 count = areq->assoclen; in artpec6_crypto_prepare_aead()
1956 if (!IS_ALIGNED(areq->assoclen, 16)) { in artpec6_crypto_prepare_aead()
1957 size_t assoc_pad = 16 - (areq->assoclen % 16); in artpec6_crypto_prepare_aead()
1989 size_t output_len = areq->cryptlen; in artpec6_crypto_prepare_aead()
1994 artpec6_crypto_walk_init(&walk, areq->dst); in artpec6_crypto_prepare_aead()
1997 count = artpec6_crypto_walk_advance(&walk, areq->assoclen); in artpec6_crypto_prepare_aead()
2172 struct aead_request *areq = container_of(req, in artpec6_crypto_complete_aead() local
2174 struct artpec6_crypto_aead_req_ctx *req_ctx = aead_request_ctx(areq); in artpec6_crypto_complete_aead()
2179 sg_pcopy_to_buffer(areq->src, in artpec6_crypto_complete_aead()
2180 sg_nents(areq->src), in artpec6_crypto_complete_aead()
2183 areq->assoclen + areq->cryptlen - in artpec6_crypto_complete_aead()