Lines Matching refs:ahash
58 static void *ah_alloc_tmp(struct crypto_ahash *ahash, int nfrags, in ah_alloc_tmp() argument
63 len = size + crypto_ahash_digestsize(ahash) + in ah_alloc_tmp()
64 (crypto_ahash_alignmask(ahash) & in ah_alloc_tmp()
69 len += sizeof(struct ahash_request) + crypto_ahash_reqsize(ahash); in ah_alloc_tmp()
87 static inline u8 *ah_tmp_icv(struct crypto_ahash *ahash, void *tmp, in ah_tmp_icv() argument
90 return PTR_ALIGN((u8 *)tmp + offset, crypto_ahash_alignmask(ahash) + 1); in ah_tmp_icv()
93 static inline struct ahash_request *ah_tmp_req(struct crypto_ahash *ahash, in ah_tmp_req() argument
98 req = (void *)PTR_ALIGN(icv + crypto_ahash_digestsize(ahash), in ah_tmp_req()
101 ahash_request_set_tfm(req, ahash); in ah_tmp_req()
106 static inline struct scatterlist *ah_req_sg(struct crypto_ahash *ahash, in ah_req_sg() argument
110 crypto_ahash_reqsize(ahash), in ah_req_sg()
314 icv = ah_tmp_icv(ahp->ahash, iph_ext, extlen); in ah6_output_done()
342 struct crypto_ahash *ahash; in ah6_output() local
351 ahash = ahp->ahash; in ah6_output()
363 iph_base = ah_alloc_tmp(ahash, nfrags, IPV6HDR_BASELEN + extlen); in ah6_output()
368 icv = ah_tmp_icv(ahash, iph_ext, extlen); in ah6_output()
369 req = ah_tmp_req(ahash, icv); in ah6_output()
370 sg = ah_req_sg(ahash, req); in ah6_output()
463 icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len); in ah6_input_done()
503 struct crypto_ahash *ahash; in ah6_input() local
529 ahash = ahp->ahash; in ah6_input()
551 work_iph = ah_alloc_tmp(ahash, nfrags, hdr_len + ahp->icv_trunc_len); in ah6_input()
556 icv = ah_tmp_icv(ahash, auth_data, ahp->icv_trunc_len); in ah6_input()
557 req = ah_tmp_req(ahash, icv); in ah6_input()
558 sg = ah_req_sg(ahash, req); in ah6_input()
634 struct crypto_ahash *ahash; in ah6_init_state() local
646 ahash = crypto_alloc_ahash(x->aalg->alg_name, 0, 0); in ah6_init_state()
647 if (IS_ERR(ahash)) in ah6_init_state()
650 ahp->ahash = ahash; in ah6_init_state()
651 if (crypto_ahash_setkey(ahash, x->aalg->alg_key, in ah6_init_state()
665 crypto_ahash_digestsize(ahash)) { in ah6_init_state()
667 x->aalg->alg_name, crypto_ahash_digestsize(ahash), in ah6_init_state()
695 crypto_free_ahash(ahp->ahash); in ah6_init_state()
708 crypto_free_ahash(ahp->ahash); in ah6_destroy()