Runtime ReducedKWise Parameters and Four-Russians Table Initialization #
Defines the 162-word limb scratch layout (accWords, prodWords, scratchWords), the 19-word
runtime parameter vector (HashParams, mkHashParams), loop-verification helpers on
Memory.Prog, and the parameter-free (¬ReadsWidth) runtime Four-Russians carryless
multiplication table builder (initTableGenProg) for the two-stage universe-reduced $k$-wise
independent polynomial hash family of [BFCKK24].
Main definitions #
Cslib.DataStructure.HashFamily.WordRAM.RuntimeReducedKWise.accWords,prodWords,scratchWords: 162-word limb scratch layout (54accumulator words +108product words).Cslib.DataStructure.HashFamily.WordRAM.RuntimeReducedKWise.HashParams,mkHashParams: 19-word runtime parameter vector encoding shifts, masks, and loop bounds.Cslib.DataStructure.HashFamily.WordRAM.RuntimeReducedKWise.initTableGenProg,InitTableGenPre: runtime Four-Russians carryless multiplication table builder inMemory.Prog.Cslib.DataStructure.HashFamily.WordRAM.RuntimeReducedKWise.reduceKeyGenProg,ReduceKeyGenPre,zeroWordsStepProg,ZeroWordsStepPre: Stage-1 key reduction and bounded word-zeroing loop body inMemory.Prog.
Main results #
fits_mkHashParams: every entry ofmkHashParamsfits in aw-bit word.initTableGenProg_spec,realizesBounded_initTableGen: functional correctness (O(2 ^ (2 * c))memory operations establishingReducedKWise.TableRep) andRealizesBounded .exactcertificate.realizesBounded_reduceKeyGen,realizesBounded_zeroWordsStep,zeroWordsLoop_spec: certificates and specification for Stage-1 key reduction and bounded word-zeroing.
References #
Section 1: 162-word scratch layout, runtime HashParams, and loop helpers #
Number of accumulator limb words (54 ≥ reducedLimbCount t) at [scratchBase, +54).
Number of product limb words (108 ≥ 2 * reducedLimbCount t) at [scratchBase + 54, +108).
Total scratch footprint (54 + 108 = 162 words) for runtime polynomial hash evaluation.
19-word runtime parameter vector passed to initTableGenProg and evalHashGenProg.
Instances For
Populate the 19-word HashParams vector for (w, w₀, b, b', k).
Total word space allocated for hash parameters and polynomial state.
Number of seed words for the hash family.
Number of bottom-limb words.
Bitmask for limb size $m$.
Half-limb width $h$.
Bitmask for half-limb width $h$.
Bitmask for $m - h$ bits.
Bitmask for $m - 2h$ bits.
Shift amount for remainder reduction.
Chunk width $c$.
Bitmask for chunk width $c$.
Twice the chunk width, $2c$.
Power of two $2^{2c}$.
Bitmask for $2c$ bits.
Packing shift parameter $p$.
Bitmask for $p$ bits.
Number of initial limb words $L_0$.
Polynomial degree parameter $k$.
Target hash output bit-length $b'$.
Every word of mkHashParams w w₀ b b' k fits in a w-bit register.
Section 2: Runtime Memory.Prog table construction (initTableGenProg) #
Full runtime Four-Russians table initialization Memory.Prog.
Precondition for initTableGenProg.
Full specification of initTableGenProg.
Parameter-free RealizesBounded .exact certificate for initTableGenProg (
¬ReadsWidth).
Section 3: Key reduction and word-zeroing helpers #
Karatsuba half-limb multiplication subroutine.
Universe-reduction key evaluator subroutine.
Precondition for reduceKeyGenProg.
Single word zeroing step subroutine.
Precondition for zeroWordsStepProg.