MCPcopy Create free account
hub / github.com/F-Stack/f-stack / AES_GMAC_Final

Function AES_GMAC_Final

freebsd/opencrypto/gmac.c:115–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void
116AES_GMAC_Final(uint8_t *digest, void *ctx)
117{
118 struct aes_gmac_ctx *agc;
119 uint8_t enccntr[GMAC_BLOCK_LEN];
120 struct gf128 a;
121
122 /* XXX - zero additional bytes? */
123 agc = ctx;
124 agc->counter[GMAC_BLOCK_LEN - 1] = 1;
125
126 rijndaelEncrypt(agc->keysched, agc->rounds, agc->counter, enccntr);
127 a = gf128_add(agc->hash, gf128_read(enccntr));
128 gf128_write(a, digest);
129
130 explicit_bzero(enccntr, sizeof enccntr);
131}

Callers

nothing calls this directly

Calls 5

rijndaelEncryptFunction · 0.85
gf128_addFunction · 0.85
gf128_readFunction · 0.85
gf128_writeFunction · 0.85
explicit_bzeroFunction · 0.85

Tested by

no test coverage detected