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

Function gf128_genmultable4

freebsd/opencrypto/gfmult.c:86–102  ·  view source on GitHub ↗

* Generate tables containing h, h^2, h^3 and h^4, starting at 0. */

Source from the content-addressed store, hash-verified

84 * Generate tables containing h, h^2, h^3 and h^4, starting at 0.
85 */
86void
87gf128_genmultable4(struct gf128 h, struct gf128table4 *t)
88{
89 struct gf128 h2, h3, h4;
90
91 gf128_genmultable(h, &t->tbls[0]);
92
93 h2 = gf128_mul(h, &t->tbls[0]);
94
95 gf128_genmultable(h2, &t->tbls[1]);
96
97 h3 = gf128_mul(h, &t->tbls[1]);
98 gf128_genmultable(h3, &t->tbls[2]);
99
100 h4 = gf128_mul(h2, &t->tbls[1]);
101 gf128_genmultable(h4, &t->tbls[3]);
102}
103
104/*
105 * Read a row from the table.

Callers 1

AES_GMAC_SetkeyFunction · 0.85

Calls 2

gf128_genmultableFunction · 0.85
gf128_mulFunction · 0.85

Tested by

no test coverage detected