Lines Matching refs:axf
250 const struct auth_hash *axf; in swcr_authcompute() local
255 axf = sw->sw_axf; in swcr_authcompute()
260 hmac_init_ipad(axf, crp->crp_auth_key, in swcr_authcompute()
263 axf->Init(&s.ctx); in swcr_authcompute()
264 axf->Setkey(&s.ctx, crp->crp_auth_key, in swcr_authcompute()
268 memcpy(&s.ctx, sw->sw_ictx, axf->ctxsize); in swcr_authcompute()
271 err = axf->Update(&s.ctx, crp->crp_aad, crp->crp_aad_length); in swcr_authcompute()
274 axf->Update, &s.ctx); in swcr_authcompute()
282 axf->Update, &s.ctx); in swcr_authcompute()
285 crp->crp_payload_length, axf->Update, &s.ctx); in swcr_authcompute()
290 axf->Update(&s.ctx, crp->crp_esn, 4); in swcr_authcompute()
292 axf->Final(s.aalg, &s.ctx); in swcr_authcompute()
295 hmac_init_opad(axf, crp->crp_auth_key, in swcr_authcompute()
298 memcpy(&s.ctx, sw->sw_octx, axf->ctxsize); in swcr_authcompute()
299 axf->Update(&s.ctx, s.aalg, axf->hashsize); in swcr_authcompute()
300 axf->Final(s.aalg, &s.ctx); in swcr_authcompute()
332 const struct auth_hash *axf; in swcr_gmac() local
338 axf = swa->sw_axf; in swcr_gmac()
340 KASSERT(axf->blocksize == blksz, ("%s: axf block size mismatch", in swcr_gmac()
344 axf->Init(&s.ctx); in swcr_gmac()
345 axf->Setkey(&s.ctx, crp->crp_auth_key, in swcr_gmac()
348 memcpy(&s.ctx, swa->sw_ictx, axf->ctxsize); in swcr_gmac()
354 axf->Reinit(&s.ctx, blk, ivlen); in swcr_gmac()
367 axf->Update(&s.ctx, inblk, len); in swcr_gmac()
372 axf->Update(&s.ctx, blk, blksz); in swcr_gmac()
379 axf->Update(&s.ctx, blk, blksz); in swcr_gmac()
382 axf->Final(s.tag, &s.ctx); in swcr_gmac()
683 const struct auth_hash *axf; in swcr_ccm_cbc_mac() local
688 axf = swa->sw_axf; in swcr_ccm_cbc_mac()
691 axf->Init(&s.ctx); in swcr_ccm_cbc_mac()
692 axf->Setkey(&s.ctx, crp->crp_auth_key, csp->csp_auth_klen); in swcr_ccm_cbc_mac()
694 memcpy(&s.ctx, swa->sw_ictx, axf->ctxsize); in swcr_ccm_cbc_mac()
700 axf->Reinit(&s.ctx, crp->crp_iv, ivlen); in swcr_ccm_cbc_mac()
705 axf->Update(&s.ctx, s.blk, CCM_CBC_BLOCK_LEN); in swcr_ccm_cbc_mac()
708 axf->Update(&s.ctx, s.blk, len); in swcr_ccm_cbc_mac()
711 axf->Update, &s.ctx); in swcr_ccm_cbc_mac()
714 axf->Final(s.tag, &s.ctx); in swcr_ccm_cbc_mac()
1297 const struct auth_hash *axf; in swcr_setup_auth() local
1301 axf = crypto_auth_hash(csp); in swcr_setup_auth()
1302 swa->sw_axf = axf; in swcr_setup_auth()
1303 if (csp->csp_auth_mlen < 0 || csp->csp_auth_mlen > axf->hashsize) in swcr_setup_auth()
1306 swa->sw_mlen = axf->hashsize; in swcr_setup_auth()
1310 swa->sw_ictx = malloc(axf->ctxsize, M_CRYPTO_DATA, in swcr_setup_auth()
1325 swa->sw_octx = malloc(axf->ctxsize, M_CRYPTO_DATA, in swcr_setup_auth()
1329 hmac_init_ipad(axf, csp->csp_auth_key, in swcr_setup_auth()
1331 hmac_init_opad(axf, csp->csp_auth_key, in swcr_setup_auth()
1342 axf->Init(swa->sw_ictx); in swcr_setup_auth()
1348 axf->Init(swa->sw_ictx); in swcr_setup_auth()
1349 axf->Setkey(swa->sw_ictx, csp->csp_auth_key, in swcr_setup_auth()
1360 axf->Init(swa->sw_ictx); in swcr_setup_auth()
1362 axf->Setkey(swa->sw_ictx, csp->csp_auth_key, in swcr_setup_auth()
1405 const struct auth_hash *axf; in swcr_auth_supported() local
1407 axf = crypto_auth_hash(csp); in swcr_auth_supported()
1408 if (axf == NULL) in swcr_auth_supported()