Lines Matching refs:ahash

25 static void *ah_alloc_tmp(struct crypto_ahash *ahash, int nfrags,
30 len = size + crypto_ahash_digestsize(ahash) +
31 (crypto_ahash_alignmask(ahash) &
36 len += sizeof(struct ahash_request) + crypto_ahash_reqsize(ahash);
49 static inline u8 *ah_tmp_icv(struct crypto_ahash *ahash, void *tmp,
52 return PTR_ALIGN((u8 *)tmp + offset, crypto_ahash_alignmask(ahash) + 1);
55 static inline struct ahash_request *ah_tmp_req(struct crypto_ahash *ahash,
60 req = (void *)PTR_ALIGN(icv + crypto_ahash_digestsize(ahash),
63 ahash_request_set_tfm(req, ahash);
68 static inline struct scatterlist *ah_req_sg(struct crypto_ahash *ahash,
72 crypto_ahash_reqsize(ahash),
132 icv = ah_tmp_icv(ahp->ahash, iph, ihl);
154 struct crypto_ahash *ahash;
166 ahash = ahp->ahash;
181 iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + seqhi_len);
185 icv = ah_tmp_icv(ahash, seqhi, seqhi_len);
186 req = ah_tmp_req(ahash, icv);
187 sg = ah_req_sg(ahash, req);
282 icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len);
312 struct crypto_ahash *ahash;
329 ahash = ahp->ahash;
368 work_iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl +
377 icv = ah_tmp_icv(ahash, auth_data, ahp->icv_trunc_len);
378 req = ah_tmp_req(ahash, icv);
379 sg = ah_req_sg(ahash, req);
477 struct crypto_ahash *ahash;
489 ahash = crypto_alloc_ahash(x->aalg->alg_name, 0, 0);
490 if (IS_ERR(ahash))
493 ahp->ahash = ahash;
494 if (crypto_ahash_setkey(ahash, x->aalg->alg_key,
508 crypto_ahash_digestsize(ahash)) {
511 crypto_ahash_digestsize(ahash),
533 crypto_free_ahash(ahp->ahash);
546 crypto_free_ahash(ahp->ahash);