Lines Matching refs:ahash

21 static void *ah_alloc_tmp(struct crypto_ahash *ahash, int nfrags,  in ah_alloc_tmp()  argument
26 len = size + crypto_ahash_digestsize(ahash) + in ah_alloc_tmp()
27 (crypto_ahash_alignmask(ahash) & in ah_alloc_tmp()
32 len += sizeof(struct ahash_request) + crypto_ahash_reqsize(ahash); in ah_alloc_tmp()
45 static inline u8 *ah_tmp_icv(struct crypto_ahash *ahash, void *tmp, in ah_tmp_icv() argument
48 return PTR_ALIGN((u8 *)tmp + offset, crypto_ahash_alignmask(ahash) + 1); in ah_tmp_icv()
51 static inline struct ahash_request *ah_tmp_req(struct crypto_ahash *ahash, in ah_tmp_req() argument
56 req = (void *)PTR_ALIGN(icv + crypto_ahash_digestsize(ahash), in ah_tmp_req()
59 ahash_request_set_tfm(req, ahash); in ah_tmp_req()
64 static inline struct scatterlist *ah_req_sg(struct crypto_ahash *ahash, in ah_req_sg() argument
68 crypto_ahash_reqsize(ahash), in ah_req_sg()
128 icv = ah_tmp_icv(ahp->ahash, iph, ihl); in ah_output_done()
152 struct crypto_ahash *ahash; in ah_output() local
160 ahash = ahp->ahash; in ah_output()
171 iph = ah_alloc_tmp(ahash, nfrags, ihl); in ah_output()
175 icv = ah_tmp_icv(ahash, iph, ihl); in ah_output()
176 req = ah_tmp_req(ahash, icv); in ah_output()
177 sg = ah_req_sg(ahash, req); in ah_output()
261 icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len); in ah_input_done()
287 struct crypto_ahash *ahash; in ah_input() local
300 ahash = ahp->ahash; in ah_input()
335 work_iph = ah_alloc_tmp(ahash, nfrags, ihl + ahp->icv_trunc_len); in ah_input()
340 icv = ah_tmp_icv(ahash, auth_data, ahp->icv_trunc_len); in ah_input()
341 req = ah_tmp_req(ahash, icv); in ah_input()
342 sg = ah_req_sg(ahash, req); in ah_input()
419 struct crypto_ahash *ahash; in ah_init_state() local
431 ahash = crypto_alloc_ahash(x->aalg->alg_name, 0, 0); in ah_init_state()
432 if (IS_ERR(ahash)) in ah_init_state()
435 ahp->ahash = ahash; in ah_init_state()
436 if (crypto_ahash_setkey(ahash, x->aalg->alg_key, in ah_init_state()
450 crypto_ahash_digestsize(ahash)) { in ah_init_state()
452 x->aalg->alg_name, crypto_ahash_digestsize(ahash), in ah_init_state()
476 crypto_free_ahash(ahp->ahash); in ah_init_state()
489 crypto_free_ahash(ahp->ahash); in ah_destroy()