Lines Matching refs:ahp
291 struct ah_data *ahp = x->data; in ah6_output_done() local
302 icv = ah_tmp_icv(ahp->ahash, iph_ext, extlen); in ah6_output_done()
304 memcpy(ah->auth_data, icv, ahp->icv_trunc_len); in ah6_output_done()
333 struct ah_data *ahp; in ah6_output() local
340 ahp = x->data; in ah6_output()
341 ahash = ahp->ahash; in ah6_output()
371 memset(ah->auth_data, 0, ahp->icv_trunc_len); in ah6_output()
406 ah->hdrlen = (XFRM_ALIGN8(sizeof(*ah) + ahp->icv_trunc_len) >> 2) - 2; in ah6_output()
437 memcpy(ah->auth_data, icv, ahp->icv_trunc_len); in ah6_output()
461 struct ah_data *ahp = x->data; in ah6_input_done() local
471 icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len); in ah6_input_done()
473 err = crypto_memneq(icv, auth_data, ahp->icv_trunc_len) ? -EBADMSG : 0; in ah6_input_done()
519 struct ah_data *ahp; in ah6_input() local
542 ahp = x->data; in ah6_input()
543 ahash = ahp->ahash; in ah6_input()
548 if (ah_hlen != XFRM_ALIGN8(sizeof(*ah) + ahp->icv_full_len) && in ah6_input()
549 ah_hlen != XFRM_ALIGN8(sizeof(*ah) + ahp->icv_trunc_len)) in ah6_input()
571 ahp->icv_trunc_len + seqhi_len); in ah6_input()
578 seqhi = (__be32 *)(auth_data + ahp->icv_trunc_len); in ah6_input()
585 memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len); in ah6_input()
586 memset(ah->auth_data, 0, ahp->icv_trunc_len); in ah6_input()
622 err = crypto_memneq(icv, auth_data, ahp->icv_trunc_len) ? -EBADMSG : 0; in ah6_input()
671 struct ah_data *ahp = NULL; in ah6_init_state() local
685 ahp = kzalloc(sizeof(*ahp), GFP_KERNEL); in ah6_init_state()
686 if (!ahp) in ah6_init_state()
695 ahp->ahash = ahash; in ah6_init_state()
717 ahp->icv_full_len = aalg_desc->uinfo.auth.icv_fullbits/8; in ah6_init_state()
718 ahp->icv_trunc_len = x->aalg->alg_trunc_len/8; in ah6_init_state()
721 ahp->icv_trunc_len); in ah6_init_state()
733 x->data = ahp; in ah6_init_state()
738 if (ahp) { in ah6_init_state()
739 crypto_free_ahash(ahp->ahash); in ah6_init_state()
740 kfree(ahp); in ah6_init_state()
747 struct ah_data *ahp = x->data; in ah6_destroy() local
749 if (!ahp) in ah6_destroy()
752 crypto_free_ahash(ahp->ahash); in ah6_destroy()
753 kfree(ahp); in ah6_destroy()