def gf128.gcm.word

bend-osdev-gf@0.1.2.0 · gf128.bend:128

import bend-osdev-gf@0.1.2.0/gf128.bend as Gf128
import Base

128# the 32 bits of the word x, from its top bit
129def gf128.gcm.word(n: Nat, +x: U32, zv: Gf128 & Gf128) -> Gf128 & Gf128:
130  match n:
131    case 0n:
132      zv
133    case 1n+k:
134      gf128.gcm.word(k, U32.shl(x), gf128.gcm.bit(x, zv))

Uses (6)

Used by (1)