Expand description
Raw polynomial coordinates for GF(2^128) modulo x^128 + x^7 + x^2 + x + 1.
Prefer the typed field for ordinary arithmetic. These helpers are for buffers whose representation the caller manages.
The coordinates stay a bare integer on purpose. Wrapped, the two bases look alike, and a value in the wrong one is silently wrong.
Structs§
- LowStage
Twiddles - The twiddles of the lowest
LOW_STAGESstages of a single-column additive transform.
Constants§
- HAS_
HARDWARE_ CLMUL - Whether multiplication and squaring use hardware carryless multiplication.
- LOW_
STAGES - Stages
LowStageTwiddles::forwardruns together, over runs of2^LOW_STAGESelements.
Functions§
- butterfly_
forward - Apply
(lo, hi) -> (lo + scalar*hi, lo + (scalar + 1)*hi)in place. - butterfly_
inverse - Undo
butterfly_forwardwith the same scalar. - from_
tower - The polynomial-basis coordinates of a tower element.
- from_
tower_ slice - The polynomial-basis coordinates of a whole slice of tower-basis bit patterns.
- mul
- Multiply two elements expressed in polynomial coordinates.
- mul_
slice - Multiply every polynomial-basis element by the same scalar.
- square
- The square of an element, given and returned in the polynomial basis.
- to_
tower - The tower element with the given polynomial-basis coordinates.
- to_
tower_ slice - The tower-basis bit patterns of a whole slice of polynomial-basis coordinates.