Lines Matching refs:sw
106 struct swcr_encdec *sw; in swcr_encdec() local
117 sw = &ses->swcr_encdec; in swcr_encdec()
118 exf = sw->sw_exf; in swcr_encdec()
136 error = exf->setkey(sw->sw_kschedule, in swcr_encdec()
149 exf->reinit(sw->sw_kschedule, iv); in swcr_encdec()
194 exf->encrypt(sw->sw_kschedule, inblk, outblk); in swcr_encdec()
196 exf->decrypt(sw->sw_kschedule, inblk, outblk); in swcr_encdec()
202 exf->encrypt(sw->sw_kschedule, outblk, outblk); in swcr_encdec()
218 exf->decrypt(sw->sw_kschedule, inblk, outblk); in swcr_encdec()
271 exf->encrypt_last(sw->sw_kschedule, inblk, outblk, in swcr_encdec()
274 exf->decrypt_last(sw->sw_kschedule, inblk, outblk, in swcr_encdec()
287 swcr_authprepare(struct auth_hash *axf, struct swcr_auth *sw, in swcr_authprepare() argument
299 hmac_init_ipad(axf, key, klen, sw->sw_ictx); in swcr_authprepare()
300 hmac_init_opad(axf, key, klen, sw->sw_octx); in swcr_authprepare()
305 axf->Setkey(sw->sw_ictx, key, klen); in swcr_authprepare()
306 axf->Init(sw->sw_ictx); in swcr_authprepare()
321 struct swcr_auth *sw; in swcr_authcompute() local
326 sw = &ses->swcr_auth; in swcr_authcompute()
328 axf = sw->sw_axf; in swcr_authcompute()
332 swcr_authprepare(axf, sw, crp->crp_auth_key, in swcr_authcompute()
336 bcopy(sw->sw_ictx, &ctx, axf->ctxsize); in swcr_authcompute()
361 if (sw->sw_octx != NULL) { in swcr_authcompute()
362 bcopy(sw->sw_octx, &ctx, axf->ctxsize); in swcr_authcompute()
370 crypto_copydata(crp, crp->crp_digest_start, sw->sw_mlen, uaalg); in swcr_authcompute()
371 if (timingsafe_bcmp(aalg, uaalg, sw->sw_mlen) != 0) in swcr_authcompute()
376 crypto_copyback(crp, crp->crp_digest_start, sw->sw_mlen, aalg); in swcr_authcompute()