Lines Matching refs:axf

251 	const struct auth_hash *axf;  in swcr_authcompute()  local
256 axf = sw->sw_axf; in swcr_authcompute()
261 hmac_init_ipad(axf, crp->crp_auth_key, in swcr_authcompute()
264 axf->Init(&s.ctx); in swcr_authcompute()
265 axf->Setkey(&s.ctx, crp->crp_auth_key, in swcr_authcompute()
269 memcpy(&s.ctx, sw->sw_ictx, axf->ctxsize); in swcr_authcompute()
272 err = axf->Update(&s.ctx, crp->crp_aad, crp->crp_aad_length); in swcr_authcompute()
275 axf->Update, &s.ctx); in swcr_authcompute()
283 axf->Update, &s.ctx); in swcr_authcompute()
286 crp->crp_payload_length, axf->Update, &s.ctx); in swcr_authcompute()
291 axf->Update(&s.ctx, crp->crp_esn, 4); in swcr_authcompute()
293 axf->Final(s.aalg, &s.ctx); in swcr_authcompute()
296 hmac_init_opad(axf, crp->crp_auth_key, in swcr_authcompute()
299 memcpy(&s.ctx, sw->sw_octx, axf->ctxsize); in swcr_authcompute()
300 axf->Update(&s.ctx, s.aalg, axf->hashsize); in swcr_authcompute()
301 axf->Final(s.aalg, &s.ctx); in swcr_authcompute()
333 const struct auth_hash *axf; in swcr_gmac() local
339 axf = swa->sw_axf; in swcr_gmac()
341 KASSERT(axf->blocksize == blksz, ("%s: axf block size mismatch", in swcr_gmac()
345 axf->Init(&s.ctx); in swcr_gmac()
346 axf->Setkey(&s.ctx, crp->crp_auth_key, in swcr_gmac()
349 memcpy(&s.ctx, swa->sw_ictx, axf->ctxsize); in swcr_gmac()
355 axf->Reinit(&s.ctx, blk, ivlen); in swcr_gmac()
368 axf->Update(&s.ctx, inblk, len); in swcr_gmac()
373 axf->Update(&s.ctx, blk, blksz); in swcr_gmac()
380 axf->Update(&s.ctx, blk, blksz); in swcr_gmac()
383 axf->Final(s.tag, &s.ctx); in swcr_gmac()
684 const struct auth_hash *axf; in swcr_ccm_cbc_mac() local
689 axf = swa->sw_axf; in swcr_ccm_cbc_mac()
692 axf->Init(&s.ctx); in swcr_ccm_cbc_mac()
693 axf->Setkey(&s.ctx, crp->crp_auth_key, csp->csp_auth_klen); in swcr_ccm_cbc_mac()
695 memcpy(&s.ctx, swa->sw_ictx, axf->ctxsize); in swcr_ccm_cbc_mac()
701 axf->Reinit(&s.ctx, crp->crp_iv, ivlen); in swcr_ccm_cbc_mac()
706 axf->Update(&s.ctx, s.blk, CCM_CBC_BLOCK_LEN); in swcr_ccm_cbc_mac()
709 axf->Update(&s.ctx, s.blk, len); in swcr_ccm_cbc_mac()
712 axf->Update, &s.ctx); in swcr_ccm_cbc_mac()
715 axf->Final(s.tag, &s.ctx); in swcr_ccm_cbc_mac()
1298 const struct auth_hash *axf; in swcr_setup_auth() local
1302 axf = crypto_auth_hash(csp); in swcr_setup_auth()
1303 swa->sw_axf = axf; in swcr_setup_auth()
1304 if (csp->csp_auth_mlen < 0 || csp->csp_auth_mlen > axf->hashsize) in swcr_setup_auth()
1307 swa->sw_mlen = axf->hashsize; in swcr_setup_auth()
1311 swa->sw_ictx = malloc(axf->ctxsize, M_CRYPTO_DATA, in swcr_setup_auth()
1326 swa->sw_octx = malloc(axf->ctxsize, M_CRYPTO_DATA, in swcr_setup_auth()
1330 hmac_init_ipad(axf, csp->csp_auth_key, in swcr_setup_auth()
1332 hmac_init_opad(axf, csp->csp_auth_key, in swcr_setup_auth()
1343 axf->Init(swa->sw_ictx); in swcr_setup_auth()
1349 axf->Init(swa->sw_ictx); in swcr_setup_auth()
1350 axf->Setkey(swa->sw_ictx, csp->csp_auth_key, in swcr_setup_auth()
1361 axf->Init(swa->sw_ictx); in swcr_setup_auth()
1363 axf->Setkey(swa->sw_ictx, csp->csp_auth_key, in swcr_setup_auth()
1406 const struct auth_hash *axf; in swcr_auth_supported() local
1408 axf = crypto_auth_hash(csp); in swcr_auth_supported()
1409 if (axf == NULL) in swcr_auth_supported()