Fold homomorphism: a ZMod64 conditional-add fold and the matching Nat
conditional-add fold agree modulo p on their toNat values. This is what lets
a lazily-accumulated (reduce-once) sum equal the per-term-reduced ZMod64 sum.
Packed lazy-reduction multiply: pack both operands to backing words,
convolve natively, reduce once per output coefficient, unpack. The FpPoly
coefficients are reduced residues below p < 2^31, so the internal
fpConvolve extern is always called within its contract.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Reading ofWords with default 0 unpacks the word read with default 0.
The packed lazy multiply computes the same polynomial as the reference *.
Shorter-size threshold below which generic schoolbook multiplication beats
the packed lazy-reduction setup. The forced F_257 and F_65537 ladders both
cross between 8 and 16 coefficients per operand.
Equations
Instances For
Total finite-field multiplication for the published consumers: generic
schoolbook multiplication below packedCutoff coefficients in the shorter
operand, the packed lazy-reduction kernel above it. This is the mulFast
dispatcher without its auxiliary-prime NTT and Karatsuba tail, which lives in
HexPolyFp.NttMul and depends on libraries that are not yet published; every
measured consumer size sits below that tail's 8192-coefficient crossover.
Equations
- left.mulPackedFast right = if min (Hex.DensePoly.size left) (Hex.DensePoly.size right) < Hex.FpPoly.packedCutoff then left * right else left.mulPacked right
Instances For
The published dispatcher agrees with schoolbook multiplication.