Certified Memory.Prog Hash, Feistel Quotient, and Salted Fingerprint Subroutines #
This module builds parameter-free Memory.Prog subroutines over Basis.exact (certified with zero
local work via realize) for all hash and one-round Feistel operations used by the WHP succinct
dynamic dictionary (SuccinctWhpModel and SuccinctWhpFallback):
- Frontier-independent
Realizes .exactwrappers aroundBitPackedDoubleTabulation's 4-limboddMulModWorduniverse reduction and bit-packed double tabulation loop (outerLoopGenProg). HashRtandmkHashRtGenProg: compact 38-word runtime parameter bundle extracted from the 101-word(WhpParams, base)input.bktHashRtProg,feistelSplitRtProg,feistelReconstructRtProg,fpReducedKeyOptRtProg,fpOfSaltOptRtProg,rKeyOfQuotRtProg, andfpOfQuotRtProg: exactMemory.Progrefinements ofbktHash,(feistelBucket, keyQuotient),feistelReconstruct,fpReducedKey,fpOfSalt,FastState.rKeyAt, andFastState.fpAtunderSeedWhpMemRep, each running inO_c(1)worst-case memory operations without mutating memory.
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.HashRt,mkHashRt,mkHashRtGenProg,hashEvalCostWhp: compact hash runtime parameter tuple andc-only cost bound.Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.feistelSplitRtProg,fpReducedKeyOptRtProg,fpOfSaltOptRtProg,rKeyOfQuotRtProg,fpOfQuotRtProg: certifiedMemory.Proghash and Feistel subroutines.
Main results #
Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.realizes_feistelSplitRt,realizes_fpReducedKeyOptRt,realizes_fpOfSaltOptRt,realizes_rKeyOfQuotRt,realizes_fpOfQuotRt: parameter-freeRealizes .exactcertificates.Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.feistelSplitRtProg_spec,fpReducedKeyOptRtProg_spec,fpOfSaltOptRtProg_spec,rKeyOfQuotRtProg_spec,fpOfQuotRtProg_spec: exact functional refinement, state preservation,O_c(1)memoryCost, andValidProg.
Section 1: Frontier-Independent stage1RedGenProg and evalHashGenProg #
c-only worst-case memoryCost bound for a full bit-packed double-tabulation evaluation.
Compact 38-word runtime parameter bundle (hp₁, hp₂, base, U, bWhp, maskBkt, sMax, offHashFp).
Base word address extracted from HashRt.
Pure constructor for HashRt in the large regime.
Runtime envelope for hrt : HashRt coupled with SeedWhpMemRep.
Extract HashRt from (wp, base) : WhpParams × ℕ in 0 memory operations.
Section 3: Certified bktHash, Feistel Split/Reconstruct, fpReducedKey, fpOfSalt #
Split any u_val : ℕ into (feistelBucket, keyQuotient).
Precondition for subroutines taking a stored quotient q < 2 ^ quotBitsWhp U n_max.
Compute if h : kv < U then fpReducedKey c U n_max θ.2 ⟨kv, h⟩ else 0 (d = (hrt, kv)).
Compute if hs : salt < sMaxWhp then if hu : kv < U then fpHash θ.2 ⟨salt, hs⟩ ⟨kv, hu⟩ else 0 else 0 (d = ((hrt, salt), kv)).
Composite rKey from (b, q) (d = ((hrt, b), q) with q < 2 ^ quotBitsWhp U n_max),
matching FastState.rKeyAt when q = fs.quotArr (fs.physSlot n_max b loc).