Lines Matching refs:ahash

25 static void *ah_alloc_tmp(struct crypto_ahash *ahash, int nfrags,  in ah_alloc_tmp()  argument
30 len = size + crypto_ahash_digestsize(ahash) + in ah_alloc_tmp()
31 (crypto_ahash_alignmask(ahash) & in ah_alloc_tmp()
36 len += sizeof(struct ahash_request) + crypto_ahash_reqsize(ahash); in ah_alloc_tmp()
49 static inline u8 *ah_tmp_icv(struct crypto_ahash *ahash, void *tmp, in ah_tmp_icv() argument
52 return PTR_ALIGN((u8 *)tmp + offset, crypto_ahash_alignmask(ahash) + 1); in ah_tmp_icv()
55 static inline struct ahash_request *ah_tmp_req(struct crypto_ahash *ahash, in ah_tmp_req() argument
60 req = (void *)PTR_ALIGN(icv + crypto_ahash_digestsize(ahash), in ah_tmp_req()
63 ahash_request_set_tfm(req, ahash); in ah_tmp_req()
68 static inline struct scatterlist *ah_req_sg(struct crypto_ahash *ahash, in ah_req_sg() argument
72 crypto_ahash_reqsize(ahash), in ah_req_sg()
132 icv = ah_tmp_icv(ahp->ahash, iph, ihl); in ah_output_done()
154 struct crypto_ahash *ahash; in ah_output() local
166 ahash = ahp->ahash; in ah_output()
181 iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + seqhi_len); in ah_output()
185 icv = ah_tmp_icv(ahash, seqhi, seqhi_len); in ah_output()
186 req = ah_tmp_req(ahash, icv); in ah_output()
187 sg = ah_req_sg(ahash, req); in ah_output()
282 icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len); in ah_input_done()
312 struct crypto_ahash *ahash; in ah_input() local
329 ahash = ahp->ahash; in ah_input()
368 work_iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + in ah_input()
377 icv = ah_tmp_icv(ahash, auth_data, ahp->icv_trunc_len); in ah_input()
378 req = ah_tmp_req(ahash, icv); in ah_input()
379 sg = ah_req_sg(ahash, req); in ah_input()
478 struct crypto_ahash *ahash; in ah_init_state() local
490 ahash = crypto_alloc_ahash(x->aalg->alg_name, 0, 0); in ah_init_state()
491 if (IS_ERR(ahash)) in ah_init_state()
494 ahp->ahash = ahash; in ah_init_state()
495 if (crypto_ahash_setkey(ahash, x->aalg->alg_key, in ah_init_state()
509 crypto_ahash_digestsize(ahash)) { in ah_init_state()
512 crypto_ahash_digestsize(ahash), in ah_init_state()
534 crypto_free_ahash(ahp->ahash); in ah_init_state()
547 crypto_free_ahash(ahp->ahash); in ah_destroy()