Lines Matching refs:agc
38 struct aes_gmac_ctx *agc; in AES_GMAC_Init() local
40 agc = ctx; in AES_GMAC_Init()
41 bzero(agc, sizeof *agc); in AES_GMAC_Init()
47 struct aes_gmac_ctx *agc; in AES_GMAC_Setkey() local
52 agc = ctx; in AES_GMAC_Setkey()
53 agc->rounds = rijndaelKeySetupEnc(agc->keysched, key, klen * 8); in AES_GMAC_Setkey()
55 rijndaelEncrypt(agc->keysched, agc->rounds, zeros, hbuf); in AES_GMAC_Setkey()
58 gf128_genmultable4(h, &agc->ghashtbl); in AES_GMAC_Setkey()
67 struct aes_gmac_ctx *agc; in AES_GMAC_Reinit() local
69 agc = ctx; in AES_GMAC_Reinit()
70 KASSERT(ivlen <= sizeof agc->counter, ("passed ivlen too large!")); in AES_GMAC_Reinit()
71 memset(agc->counter, 0, sizeof(agc->counter)); in AES_GMAC_Reinit()
72 bcopy(iv, agc->counter, ivlen); in AES_GMAC_Reinit()
73 agc->counter[GMAC_BLOCK_LEN - 1] = 1; in AES_GMAC_Reinit()
75 memset(&agc->hash, 0, sizeof(agc->hash)); in AES_GMAC_Reinit()
81 struct aes_gmac_ctx *agc; in AES_GMAC_Update() local
87 agc = ctx; in AES_GMAC_Update()
89 v = agc->hash; in AES_GMAC_Update()
94 v = gf128_mul4b(v, data, &agc->ghashtbl); in AES_GMAC_Update()
98 v = gf128_mul(v, &agc->ghashtbl.tbls[0]); in AES_GMAC_Update()
103 v = gf128_mul(v, &agc->ghashtbl.tbls[0]); in AES_GMAC_Update()
110 agc->hash = v; in AES_GMAC_Update()
119 struct aes_gmac_ctx *agc; in AES_GMAC_Final() local
123 agc = ctx; in AES_GMAC_Final()
125 rijndaelEncrypt(agc->keysched, agc->rounds, agc->counter, enccntr); in AES_GMAC_Final()
126 a = gf128_add(agc->hash, gf128_read(enccntr)); in AES_GMAC_Final()