Lines Matching refs:areq

360 static int artpec6_crypto_prepare_aead(struct aead_request *areq);
361 static int artpec6_crypto_prepare_crypto(struct skcipher_request *areq);
362 static int artpec6_crypto_prepare_hash(struct ahash_request *areq);
1308 static int artpec6_crypto_prepare_hash(struct ahash_request *areq) in artpec6_crypto_prepare_hash() argument
1310 struct artpec6_hashalg_context *ctx = crypto_tfm_ctx(areq->base.tfm); in artpec6_crypto_prepare_hash()
1311 struct artpec6_hash_request_context *req_ctx = ahash_request_ctx(areq); in artpec6_crypto_prepare_hash()
1312 size_t digestsize = crypto_ahash_digestsize(crypto_ahash_reqtfm(areq)); in artpec6_crypto_prepare_hash()
1315 crypto_ahash_tfm(crypto_ahash_reqtfm(areq))); in artpec6_crypto_prepare_hash()
1401 size_t total_bytes = areq->nbytes + req_ctx->partial_bytes; in artpec6_crypto_prepare_hash()
1427 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_hash()
1437 size_t sg_rem = areq->nbytes - sg_skip; in artpec6_crypto_prepare_hash()
1439 sg_pcopy_to_buffer(areq->src, sg_nents(areq->src), in artpec6_crypto_prepare_hash()
1496 error = artpec6_crypto_setup_in_descr(common, areq->result, in artpec6_crypto_prepare_hash()
1664 static int artpec6_crypto_prepare_crypto(struct skcipher_request *areq) in artpec6_crypto_prepare_crypto() argument
1668 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(areq); in artpec6_crypto_prepare_crypto()
1680 req_ctx = skcipher_request_ctx(areq); in artpec6_crypto_prepare_crypto()
1782 ret = artpec6_crypto_setup_out_descr(common, areq->iv, iv_len, in artpec6_crypto_prepare_crypto()
1788 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_crypto()
1789 ret = artpec6_crypto_setup_sg_descrs_out(common, &walk, areq->cryptlen); in artpec6_crypto_prepare_crypto()
1794 artpec6_crypto_walk_init(&walk, areq->dst); in artpec6_crypto_prepare_crypto()
1795 ret = artpec6_crypto_setup_sg_descrs_in(common, &walk, areq->cryptlen); in artpec6_crypto_prepare_crypto()
1802 size_t pad = ALIGN(areq->cryptlen, AES_BLOCK_SIZE) - in artpec6_crypto_prepare_crypto()
1803 areq->cryptlen; in artpec6_crypto_prepare_crypto()
1831 static int artpec6_crypto_prepare_aead(struct aead_request *areq) in artpec6_crypto_prepare_aead() argument
1836 struct artpec6_cryptotfm_context *ctx = crypto_tfm_ctx(areq->base.tfm); in artpec6_crypto_prepare_aead()
1837 struct artpec6_crypto_aead_req_ctx *req_ctx = aead_request_ctx(areq); in artpec6_crypto_prepare_aead()
1838 struct crypto_aead *cipher = crypto_aead_reqtfm(areq); in artpec6_crypto_prepare_aead()
1908 input_length = areq->cryptlen; in artpec6_crypto_prepare_aead()
1914 __cpu_to_be64(8*areq->assoclen); in artpec6_crypto_prepare_aead()
1919 memcpy(req_ctx->hw_ctx.J0, areq->iv, crypto_aead_ivsize(cipher)); in artpec6_crypto_prepare_aead()
1931 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_aead()
1934 count = areq->assoclen; in artpec6_crypto_prepare_aead()
1939 if (!IS_ALIGNED(areq->assoclen, 16)) { in artpec6_crypto_prepare_aead()
1940 size_t assoc_pad = 16 - (areq->assoclen % 16); in artpec6_crypto_prepare_aead()
1972 size_t output_len = areq->cryptlen; in artpec6_crypto_prepare_aead()
1977 artpec6_crypto_walk_init(&walk, areq->dst); in artpec6_crypto_prepare_aead()
1980 count = artpec6_crypto_walk_advance(&walk, areq->assoclen); in artpec6_crypto_prepare_aead()
2188 struct aead_request *areq = container_of(req, in artpec6_crypto_complete_aead() local
2190 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in artpec6_crypto_complete_aead()
2191 struct artpec6_crypto_aead_req_ctx *req_ctx = aead_request_ctx(areq); in artpec6_crypto_complete_aead()
2197 sg_pcopy_to_buffer(areq->src, in artpec6_crypto_complete_aead()
2198 sg_nents(areq->src), in artpec6_crypto_complete_aead()
2201 areq->assoclen + areq->cryptlen - in artpec6_crypto_complete_aead()
2218 aead_request_complete(areq, result); in artpec6_crypto_complete_aead()