Lines Matching refs:areq
359 static int artpec6_crypto_prepare_aead(struct aead_request *areq);
360 static int artpec6_crypto_prepare_crypto(struct skcipher_request *areq);
361 static int artpec6_crypto_prepare_hash(struct ahash_request *areq);
1307 static int artpec6_crypto_prepare_hash(struct ahash_request *areq) in artpec6_crypto_prepare_hash() argument
1309 struct artpec6_hashalg_context *ctx = crypto_tfm_ctx(areq->base.tfm); in artpec6_crypto_prepare_hash()
1310 struct artpec6_hash_request_context *req_ctx = ahash_request_ctx(areq); in artpec6_crypto_prepare_hash()
1311 size_t digestsize = crypto_ahash_digestsize(crypto_ahash_reqtfm(areq)); in artpec6_crypto_prepare_hash()
1314 crypto_ahash_tfm(crypto_ahash_reqtfm(areq))); in artpec6_crypto_prepare_hash()
1400 size_t total_bytes = areq->nbytes + req_ctx->partial_bytes; in artpec6_crypto_prepare_hash()
1426 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_hash()
1436 size_t sg_rem = areq->nbytes - sg_skip; in artpec6_crypto_prepare_hash()
1438 sg_pcopy_to_buffer(areq->src, sg_nents(areq->src), in artpec6_crypto_prepare_hash()
1495 error = artpec6_crypto_setup_in_descr(common, areq->result, in artpec6_crypto_prepare_hash()
1659 static int artpec6_crypto_prepare_crypto(struct skcipher_request *areq) in artpec6_crypto_prepare_crypto() argument
1663 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(areq); in artpec6_crypto_prepare_crypto()
1675 req_ctx = skcipher_request_ctx(areq); in artpec6_crypto_prepare_crypto()
1777 ret = artpec6_crypto_setup_out_descr(common, areq->iv, iv_len, in artpec6_crypto_prepare_crypto()
1783 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_crypto()
1784 ret = artpec6_crypto_setup_sg_descrs_out(common, &walk, areq->cryptlen); in artpec6_crypto_prepare_crypto()
1789 artpec6_crypto_walk_init(&walk, areq->dst); in artpec6_crypto_prepare_crypto()
1790 ret = artpec6_crypto_setup_sg_descrs_in(common, &walk, areq->cryptlen); in artpec6_crypto_prepare_crypto()
1797 size_t pad = ALIGN(areq->cryptlen, AES_BLOCK_SIZE) - in artpec6_crypto_prepare_crypto()
1798 areq->cryptlen; in artpec6_crypto_prepare_crypto()
1826 static int artpec6_crypto_prepare_aead(struct aead_request *areq) in artpec6_crypto_prepare_aead() argument
1831 struct artpec6_cryptotfm_context *ctx = crypto_tfm_ctx(areq->base.tfm); in artpec6_crypto_prepare_aead()
1832 struct artpec6_crypto_aead_req_ctx *req_ctx = aead_request_ctx(areq); in artpec6_crypto_prepare_aead()
1833 struct crypto_aead *cipher = crypto_aead_reqtfm(areq); in artpec6_crypto_prepare_aead()
1903 input_length = areq->cryptlen; in artpec6_crypto_prepare_aead()
1909 __cpu_to_be64(8*areq->assoclen); in artpec6_crypto_prepare_aead()
1914 memcpy(req_ctx->hw_ctx.J0, areq->iv, crypto_aead_ivsize(cipher)); in artpec6_crypto_prepare_aead()
1926 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_aead()
1929 count = areq->assoclen; in artpec6_crypto_prepare_aead()
1934 if (!IS_ALIGNED(areq->assoclen, 16)) { in artpec6_crypto_prepare_aead()
1935 size_t assoc_pad = 16 - (areq->assoclen % 16); in artpec6_crypto_prepare_aead()
1967 size_t output_len = areq->cryptlen; in artpec6_crypto_prepare_aead()
1972 artpec6_crypto_walk_init(&walk, areq->dst); in artpec6_crypto_prepare_aead()
1975 count = artpec6_crypto_walk_advance(&walk, areq->assoclen); in artpec6_crypto_prepare_aead()
2183 struct aead_request *areq = container_of(req, in artpec6_crypto_complete_aead() local
2185 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in artpec6_crypto_complete_aead()
2186 struct artpec6_crypto_aead_req_ctx *req_ctx = aead_request_ctx(areq); in artpec6_crypto_complete_aead()
2192 sg_pcopy_to_buffer(areq->src, in artpec6_crypto_complete_aead()
2193 sg_nents(areq->src), in artpec6_crypto_complete_aead()
2196 areq->assoclen + areq->cryptlen - in artpec6_crypto_complete_aead()