Lines Matching +full:16 +full:v
40 /* calculate v * 2 */
42 gf128_mulalpha(struct gf128 v) in gf128_mulalpha() argument
46 mask = !!(v.v[1] & 1); in gf128_mulalpha()
48 v.v[1] = (v.v[1] >> 1) | ((v.v[0] & 1) << 63); in gf128_mulalpha()
49 v.v[0] = (v.v[0] >> 1) ^ ((mask & REV_POLY_REDUCT) << 56); in gf128_mulalpha()
51 return v; in gf128_mulalpha()
55 * Generate a table for 0-16 * h. Store the results in the table w/ indexes
61 struct gf128 tbl[16]; in gf128_genmultable()
67 for (i = 2; i < 16; i += 2) { in gf128_genmultable()
72 for (i = 0; i < 16; i++) { in gf128_genmultable()
73 t->a[nib_rev[i]] = tbl[i].v[0] >> 32; in gf128_genmultable()
74 t->b[nib_rev[i]] = tbl[i].v[0]; in gf128_genmultable()
75 t->c[nib_rev[i]] = tbl[i].v[1] >> 32; in gf128_genmultable()
76 t->d[nib_rev[i]] = tbl[i].v[1]; in gf128_genmultable()
109 bits = bits % 16; in readrow()
111 r.v[0] = ((uint64_t)tbl->a[bits] << 32) | tbl->b[bits]; in readrow()
112 r.v[1] = ((uint64_t)tbl->c[bits] << 32) | tbl->d[bits]; in readrow()
143 bits = word % 16; in gfmultword()
149 redbits = x.v[1] % 16; in gfmultword()
150 x.v[1] = (x.v[1] >> 4) | (x.v[0] % 16) << 60; in gfmultword()
151 x.v[0] >>= 4; in gfmultword()
152 x.v[0] ^= (uint64_t)reduction[redbits] << (64 - 16); in gfmultword()
182 * nibble reverse would take 20 ops (5 * 4) verse 16 in gfmultword4()
186 bitsa = worda % 16; in gfmultword4()
187 bitsb = wordb % 16; in gfmultword4()
188 bitsc = wordc % 16; in gfmultword4()
189 bitsd = wordd % 16; in gfmultword4()
198 redbits = x.v[1] % 16; in gfmultword4()
199 x.v[1] = (x.v[1] >> 4) | (x.v[0] % 16) << 60; in gfmultword4()
200 x.v[0] >>= 4; in gfmultword4()
201 x.v[0] ^= (uint64_t)reduction[redbits] << (64 - 16); in gfmultword4()
216 gf128_mul(struct gf128 v, struct gf128table *tbl) in gf128_mul() argument
222 ret = gfmultword(v.v[1], ret, tbl); in gf128_mul()
223 ret = gfmultword(v.v[0], ret, tbl); in gf128_mul()
240 tmp = gfmultword4(a.v[1], b.v[1], c.v[1], d.v[1], tmp, tbl); in gf128_mul4()
241 tmp = gfmultword4(a.v[0], b.v[0], c.v[0], d.v[0], tmp, tbl); in gf128_mul4()
248 * b = data[16..31]
256 gf128_mul4b(struct gf128 r, const uint8_t *v, struct gf128table4 *tbl) in gf128_mul4b() argument
263 a = gf128_add(r, gf128_read(&v[0*16])); in gf128_mul4b()
264 b = gf128_read(&v[1*16]); in gf128_mul4b()
265 c = gf128_read(&v[2*16]); in gf128_mul4b()
266 d = gf128_read(&v[3*16]); in gf128_mul4b()
268 tmp = gfmultword4(a.v[1], b.v[1], c.v[1], d.v[1], tmp, tbl); in gf128_mul4b()
269 tmp = gfmultword4(a.v[0], b.v[0], c.v[0], d.v[0], tmp, tbl); in gf128_mul4b()