Lines Matching refs:ahash
24 static void *ah_alloc_tmp(struct crypto_ahash *ahash, int nfrags, in ah_alloc_tmp() argument
29 len = size + crypto_ahash_digestsize(ahash) + in ah_alloc_tmp()
30 (crypto_ahash_alignmask(ahash) & in ah_alloc_tmp()
35 len += sizeof(struct ahash_request) + crypto_ahash_reqsize(ahash); in ah_alloc_tmp()
48 static inline u8 *ah_tmp_icv(struct crypto_ahash *ahash, void *tmp, in ah_tmp_icv() argument
51 return PTR_ALIGN((u8 *)tmp + offset, crypto_ahash_alignmask(ahash) + 1); in ah_tmp_icv()
54 static inline struct ahash_request *ah_tmp_req(struct crypto_ahash *ahash, in ah_tmp_req() argument
59 req = (void *)PTR_ALIGN(icv + crypto_ahash_digestsize(ahash), in ah_tmp_req()
62 ahash_request_set_tfm(req, ahash); in ah_tmp_req()
67 static inline struct scatterlist *ah_req_sg(struct crypto_ahash *ahash, in ah_req_sg() argument
71 crypto_ahash_reqsize(ahash), in ah_req_sg()
131 icv = ah_tmp_icv(ahp->ahash, iph, ihl); in ah_output_done()
153 struct crypto_ahash *ahash; in ah_output() local
165 ahash = ahp->ahash; in ah_output()
180 iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + seqhi_len); in ah_output()
184 icv = ah_tmp_icv(ahash, seqhi, seqhi_len); in ah_output()
185 req = ah_tmp_req(ahash, icv); in ah_output()
186 sg = ah_req_sg(ahash, req); in ah_output()
281 icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len); in ah_input_done()
311 struct crypto_ahash *ahash; in ah_input() local
328 ahash = ahp->ahash; in ah_input()
367 work_iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + in ah_input()
376 icv = ah_tmp_icv(ahash, auth_data, ahp->icv_trunc_len); in ah_input()
377 req = ah_tmp_req(ahash, icv); in ah_input()
378 sg = ah_req_sg(ahash, req); in ah_input()
476 struct crypto_ahash *ahash; in ah_init_state() local
488 ahash = crypto_alloc_ahash(x->aalg->alg_name, 0, 0); in ah_init_state()
489 if (IS_ERR(ahash)) in ah_init_state()
492 ahp->ahash = ahash; in ah_init_state()
493 if (crypto_ahash_setkey(ahash, x->aalg->alg_key, in ah_init_state()
507 crypto_ahash_digestsize(ahash)) { in ah_init_state()
510 crypto_ahash_digestsize(ahash), in ah_init_state()
532 crypto_free_ahash(ahp->ahash); in ah_init_state()
545 crypto_free_ahash(ahp->ahash); in ah_destroy()