Lines Matching defs:axf
469 const struct swcr_auth_hash *axf;
476 axf = sw->sw_axf;
478 memcpy(&ctx, sw->sw_ictx, axf->ctxsize);
482 axf->Update(&ctx, (char *)buf + crd->crd_skip, crd->crd_len);
486 (int (*)(void*, void *, unsigned int))(void *)axf->Update,
494 (int (*)(void *, void *, unsigned int))(void *)axf->Update,
517 axf->Final(aalg, &ctx);
518 memcpy(&ctx, sw->sw_octx, axf->ctxsize);
519 axf->Update(&ctx, aalg, axf->auth_hash->hashsize);
520 axf->Final(aalg, &ctx);
528 axf->Update(&ctx, sw->sw_octx, sw->sw_klen);
529 axf->Final(aalg, &ctx);
536 axf->Final(aalg, &ctx);
544 axf->auth_hash->authsize);
548 axf->auth_hash->authsize, aalg);
551 memcpy(crp->crp_mac, aalg, axf->auth_hash->authsize);
572 const struct swcr_auth_hash *axf = NULL;
599 axf = swa->sw_axf;
602 memcpy(&ctx, swa->sw_ictx, axf->ctxsize);
603 blksz = axf->auth_hash->blocksize;
643 if (axf->Reinit)
644 axf->Reinit(&ctx, iv, ivlen);
650 axf->Update(&ctx, blk, len);
661 axf->Update(&ctx, blk, len);
663 axf->Update(&ctx, blk, len);
680 axf->Update(&ctx, blk, blksz);
685 axf->Final(aalg, &ctx);
689 COPYBACK(outtype, buf, crda->crd_inject, axf->auth_hash->authsize, aalg);
691 memcpy(crp->crp_mac, aalg, axf->auth_hash->authsize);
763 const struct swcr_auth_hash *axf;
860 axf = &swcr_auth_hash_hmac_md5;
863 axf = &swcr_auth_hash_hmac_md5_96;
866 axf = &swcr_auth_hash_hmac_sha1;
869 axf = &swcr_auth_hash_hmac_sha1_96;
872 axf = &swcr_auth_hash_hmac_sha2_256;
875 axf = &swcr_auth_hash_hmac_sha2_384;
878 axf = &swcr_auth_hash_hmac_sha2_512;
881 axf = &swcr_auth_hash_null;
884 axf = &swcr_auth_hash_hmac_ripemd_160;
887 axf = &swcr_auth_hash_hmac_ripemd_160_96;
890 (*swd)->sw_ictx = kmem_alloc(axf->ctxsize, KM_NOSLEEP);
896 (*swd)->sw_octx = kmem_alloc(axf->ctxsize, KM_NOSLEEP);
905 axf->Init((*swd)->sw_ictx);
906 axf->Update((*swd)->sw_ictx, cri->cri_key,
908 axf->Update((*swd)->sw_ictx, hmac_ipad_buffer,
909 axf->auth_hash->blocksize - (cri->cri_klen / 8));
914 axf->Init((*swd)->sw_octx);
915 axf->Update((*swd)->sw_octx, cri->cri_key,
917 axf->Update((*swd)->sw_octx, hmac_opad_buffer,
918 axf->auth_hash->blocksize - (cri->cri_klen / 8));
922 (*swd)->sw_axf = axf;
926 axf = &swcr_auth_hash_key_md5;
932 axf = &swcr_auth_hash_key_sha1;
934 (*swd)->sw_ictx = kmem_alloc(axf->ctxsize, KM_NOSLEEP);
950 axf->Init((*swd)->sw_ictx);
951 axf->Update((*swd)->sw_ictx, cri->cri_key,
953 axf->Final(digest, (*swd)->sw_ictx);
954 (*swd)->sw_axf = axf;
959 axf = &swcr_auth_hash_md5;
963 axf = &swcr_auth_hash_sha1;
965 (*swd)->sw_ictx = kmem_alloc(axf->ctxsize, KM_NOSLEEP);
971 axf->Init((*swd)->sw_ictx);
972 (*swd)->sw_axf = axf;
976 axf = &swcr_auth_hash_aes_xcbc_mac;
979 axf = &swcr_auth_hash_gmac_aes_128;
982 axf = &swcr_auth_hash_gmac_aes_192;
985 axf = &swcr_auth_hash_gmac_aes_256;
987 (*swd)->sw_ictx = kmem_alloc(axf->ctxsize, KM_NOSLEEP);
992 axf->Init((*swd)->sw_ictx);
993 axf->Setkey((*swd)->sw_ictx,
995 (*swd)->sw_axf = axf;
1032 const struct swcr_auth_hash *axf;
1069 axf = swd->sw_axf;
1072 explicit_memset(swd->sw_ictx, 0, axf->ctxsize);
1073 kmem_free(swd->sw_ictx, axf->ctxsize);
1076 explicit_memset(swd->sw_octx, 0, axf->ctxsize);
1077 kmem_free(swd->sw_octx, axf->ctxsize);
1083 axf = swd->sw_axf;
1086 explicit_memset(swd->sw_ictx, 0, axf->ctxsize);
1087 kmem_free(swd->sw_ictx, axf->ctxsize);
1101 axf = swd->sw_axf;
1104 explicit_memset(swd->sw_ictx, 0, axf->ctxsize);
1105 kmem_free(swd->sw_ictx, axf->ctxsize);