Lines Matching refs:ahash

23 static void *ah_alloc_tmp(struct crypto_ahash *ahash, int nfrags,  in ah_alloc_tmp()  argument
28 len = size + crypto_ahash_digestsize(ahash) + in ah_alloc_tmp()
29 (crypto_ahash_alignmask(ahash) & in ah_alloc_tmp()
34 len += sizeof(struct ahash_request) + crypto_ahash_reqsize(ahash); in ah_alloc_tmp()
47 static inline u8 *ah_tmp_icv(struct crypto_ahash *ahash, void *tmp, in ah_tmp_icv() argument
50 return PTR_ALIGN((u8 *)tmp + offset, crypto_ahash_alignmask(ahash) + 1); in ah_tmp_icv()
53 static inline struct ahash_request *ah_tmp_req(struct crypto_ahash *ahash, in ah_tmp_req() argument
58 req = (void *)PTR_ALIGN(icv + crypto_ahash_digestsize(ahash), in ah_tmp_req()
61 ahash_request_set_tfm(req, ahash); in ah_tmp_req()
66 static inline struct scatterlist *ah_req_sg(struct crypto_ahash *ahash, in ah_req_sg() argument
70 crypto_ahash_reqsize(ahash), in ah_req_sg()
130 icv = ah_tmp_icv(ahp->ahash, iph, ihl); in ah_output_done()
152 struct crypto_ahash *ahash; in ah_output() local
164 ahash = ahp->ahash; in ah_output()
179 iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + seqhi_len); in ah_output()
183 icv = ah_tmp_icv(ahash, seqhi, seqhi_len); in ah_output()
184 req = ah_tmp_req(ahash, icv); in ah_output()
185 sg = ah_req_sg(ahash, req); in ah_output()
275 icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len); in ah_input_done()
305 struct crypto_ahash *ahash; in ah_input() local
322 ahash = ahp->ahash; in ah_input()
361 work_iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + in ah_input()
368 icv = ah_tmp_icv(ahash, auth_data, ahp->icv_trunc_len); in ah_input()
369 req = ah_tmp_req(ahash, icv); in ah_input()
370 sg = ah_req_sg(ahash, req); in ah_input()
466 struct crypto_ahash *ahash; in ah_init_state() local
478 ahash = crypto_alloc_ahash(x->aalg->alg_name, 0, 0); in ah_init_state()
479 if (IS_ERR(ahash)) in ah_init_state()
482 ahp->ahash = ahash; in ah_init_state()
483 if (crypto_ahash_setkey(ahash, x->aalg->alg_key, in ah_init_state()
497 crypto_ahash_digestsize(ahash)) { in ah_init_state()
500 crypto_ahash_digestsize(ahash), in ah_init_state()
522 crypto_free_ahash(ahp->ahash); in ah_init_state()
535 crypto_free_ahash(ahp->ahash); in ah_destroy()