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()
1660 static int artpec6_crypto_prepare_crypto(struct skcipher_request *areq) in artpec6_crypto_prepare_crypto() argument
1664 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(areq); in artpec6_crypto_prepare_crypto()
1676 req_ctx = skcipher_request_ctx(areq); in artpec6_crypto_prepare_crypto()
1778 ret = artpec6_crypto_setup_out_descr(common, areq->iv, iv_len, in artpec6_crypto_prepare_crypto()
1784 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_crypto()
1785 ret = artpec6_crypto_setup_sg_descrs_out(common, &walk, areq->cryptlen); in artpec6_crypto_prepare_crypto()
1790 artpec6_crypto_walk_init(&walk, areq->dst); in artpec6_crypto_prepare_crypto()
1791 ret = artpec6_crypto_setup_sg_descrs_in(common, &walk, areq->cryptlen); in artpec6_crypto_prepare_crypto()
1798 size_t pad = ALIGN(areq->cryptlen, AES_BLOCK_SIZE) - in artpec6_crypto_prepare_crypto()
1799 areq->cryptlen; in artpec6_crypto_prepare_crypto()
1827 static int artpec6_crypto_prepare_aead(struct aead_request *areq) in artpec6_crypto_prepare_aead() argument
1832 struct artpec6_cryptotfm_context *ctx = crypto_tfm_ctx(areq->base.tfm); in artpec6_crypto_prepare_aead()
1833 struct artpec6_crypto_aead_req_ctx *req_ctx = aead_request_ctx(areq); in artpec6_crypto_prepare_aead()
1834 struct crypto_aead *cipher = crypto_aead_reqtfm(areq); in artpec6_crypto_prepare_aead()
1904 input_length = areq->cryptlen; in artpec6_crypto_prepare_aead()
1910 __cpu_to_be64(8*areq->assoclen); in artpec6_crypto_prepare_aead()
1915 memcpy(req_ctx->hw_ctx.J0, areq->iv, crypto_aead_ivsize(cipher)); in artpec6_crypto_prepare_aead()
1927 artpec6_crypto_walk_init(&walk, areq->src); in artpec6_crypto_prepare_aead()
1930 count = areq->assoclen; in artpec6_crypto_prepare_aead()
1935 if (!IS_ALIGNED(areq->assoclen, 16)) { in artpec6_crypto_prepare_aead()
1936 size_t assoc_pad = 16 - (areq->assoclen % 16); in artpec6_crypto_prepare_aead()
1968 size_t output_len = areq->cryptlen; in artpec6_crypto_prepare_aead()
1973 artpec6_crypto_walk_init(&walk, areq->dst); in artpec6_crypto_prepare_aead()
1976 count = artpec6_crypto_walk_advance(&walk, areq->assoclen); in artpec6_crypto_prepare_aead()
2184 struct aead_request *areq = container_of(req, in artpec6_crypto_complete_aead() local
2186 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in artpec6_crypto_complete_aead()
2187 struct artpec6_crypto_aead_req_ctx *req_ctx = aead_request_ctx(areq); in artpec6_crypto_complete_aead()
2193 sg_pcopy_to_buffer(areq->src, in artpec6_crypto_complete_aead()
2194 sg_nents(areq->src), in artpec6_crypto_complete_aead()
2197 areq->assoclen + areq->cryptlen - in artpec6_crypto_complete_aead()
2214 aead_request_complete(areq, result); in artpec6_crypto_complete_aead()