Zook : Protocol Wiring - #269
Conversation
# Conflicts: # benches/expand_from_coeff.rs # src/algebra/ntt/cooley_tukey.rs # src/algebra/ntt/mod.rs # src/protocols/code_switch.rs # src/protocols/irs_commit.rs # src/protocols/mask_proximity.rs
Merging this PR will not alter performance
Comparing Footnotes
|
|
Thanks for the PR @ocdbytes. The protocol wiring looks correct, but
Reproduced by attempting to prove with
What's missing to close it:
Did you mean base-field is supported at the |
Summary
Adds the Zook zero-knowledge protocol (Construction 9.7) end-to-end, along with the supporting protocol and parameter-selection changes it needs. Added adaptive rate planning for optimised proving schedule.
Changes
protocols/zook/) : new module implementing the Construction 9.7 ZK flow: commit → per-round (sumcheck → code-switch → mask discharge) → basecase, closed out viaFinalClaim.Claim { covector, sum }keepingμ == ⟨vector, covector⟩across rounds; addsverify_for_implicit/CovectorUpdateParamsfor implicit covector accumulation.mask_contribution_covectors) running the Construction 7.2 target check, with claims bound before γ.interleaved_encodeis now a pure encoder overmessage ‖ maskslices (&[&[F]] → Buffer<F>); drops theMessages/masksAPI.params/) : newRateSchedule(Stepping/Capped/Adaptive) and a Pareto-knee planner (adaptive.rs) choosing per-round inverse rates under the security target.wipe()(zeroize secret buffers) andinto_vec()(zero-copy readback for in-place sumcheck/basecase folds).Zook protocol flow
flowchart TD A["commit(witness)<br/>→ CommittedWitness"] --> B["γ ← verifier<br/>(RLC challenge)"] B --> C["covector = Σ γ·formⱼ<br/>sum = Σ γ·evalⱼ"] C --> D{"CommittedState?"} D -->|Basecase-only| BC D -->|Round| L subgraph L["per round: reduce (message, covector, sum)"] direction TB R0["RoundMaskOracle::begin<br/>sample + commit sumcheck-mask tree"] R1["sumcheck.prove(message, covector, sum, blinding)<br/>→ opening (round challenges)"] R2["bind_code_switch_mask<br/>build cs_mask, commit, send mask_eval_sum<br/>reconcile sum → unmasked dot"] R3["extend covector for ZK mask region"] R4["code_switch.prove(message, irs_witness,<br/>Claim{covector, sum}, challenges, cs_mask)<br/>→ cs_witness"] R5["masker.finish<br/>prove both mask trees<br/>subtract cs_mask contribution from sum"] R6["message ← cs_witness.message<br/>irs_witness ← cs_witness.target_witness<br/>truncate covector"] R0 --> R1 --> R2 --> R3 --> R4 --> R5 --> R6 end L -->|"loops over self.rounds()<br/>invariant: sum == ⟨message, covector⟩"| BC BC["basecase.prove(message, witness, covector, sum)"] --> F["FinalClaim<br/>verifier checks:<br/>scale · Σ rlcⱼ · formⱼ(eval_pt) == contribution"]