Low-word fold step for the one-hot left word 1 <<< hot: XOR
1 <<< (hot + bitIdx) into the low word when bit bitIdx of a is set and
hot + bitIdx < 64, otherwise leave it unchanged.
Equations
Instances For
High-word fold step for the one-hot left word 1 <<< hot: XOR
1 <<< (hot + bitIdx - 64) into the high word when bit bitIdx of a is set and
64 ≤ hot + bitIdx, otherwise leave it unchanged.
Equations
Instances For
Trusted runtime hook for carry-less multiplication.
The compiled C shim must return the same (hi, lo) pair as
Hex.pureClmul; the intrinsic-backed implementations are an optimization
only.
Equations
- Hex.clmul a b = Hex.pureClmul a b
Instances For
The trusted extern-backed multiplier has Hex.pureClmul as its logical
reference semantics.
Componentwise bitwise XOR of two (hi, lo) word pairs. This is the
addition law on 128-bit carry-less products, used to combine partial
products in the bit-fold reformulations of clmul.
Instances For
Fold step that XORs the monomial x^bit into the accumulator exactly when
bit bit of w is set, leaving it unchanged otherwise. Folding this over all
bit positions reassembles w from its set bits.
Equations
Instances For
Reconstruct w by folding wordBitXorStep over all 64 bit positions,
re-expressing the word as the XOR of its one-hot monomials.
Equations
- Hex.wordBitFold w = List.foldl (Hex.wordBitXorStep w) 0 (List.range 64)
Instances For
Fold step accumulating the partial product clmul y (x^bit) (one-hot on the
right factor) into acc when bit bit of w is set. The right-factor twin of
clmulLeftBitFoldStep, used to commute the two arguments.
Equations
Instances For
Fold step driving clmul y w the way pureClmul does: apply the executable
clmulAccumulateBit acc y bit when bit bit of w is set, else keep acc.
Links the executable fold to clmulRightBitFoldStep.