Three-copy masked-3SAT commitment protocol for GMW zero-knowledge #
This module defines the two-round interactive protocol used to prove Goldreich, Micali, and
Wigderson's theorem [GMW91] that every language in NP has a computational
zero-knowledge interactive proof system from one-way functions (via Naor's bit commitment scheme
[Nao91] and ThreeSAT_npHard).
Rather than GMW's original 3-coloring protocol, we formalize a direct 3-copy masked-3SAT
truth-table commitment protocol: in each of 3 parallel copies, the prover samples a random mask m
for the variables of the 3CNF formula φ and commits (via naorCommit) to copyLen φ bits
consisting of m, the XOR-masked assignment v = w ⊕ m, and the 8-bit truth table of each clause
under inputs t ⊕ m. A 3-bit challenge ch selects for each copy whether to open m and the full
clause truth tables (ch[j] = false) or v and the active truth-table entries (ch[j] = true).
Main definitions #
Cslib.Crypto.GMW.realBits,Cslib.Crypto.GMW.simBits,Cslib.Crypto.GMW.allOpenFlags: committed bit layouts and selective-opening masks across the three protocol copies.Cslib.Crypto.GMW.proverReply1,Cslib.Crypto.GMW.proverReply2,Cslib.Crypto.GMW.verifyTranscript: prover round functions and verifier transcript predicate.Cslib.Crypto.GMW.runTwoRound: two-round deterministic oracle handler inProbComp.Cslib.Crypto.GMW.gmwProver,Cslib.Crypto.GMW.gmwInteract: honest prover strategy and itsProbComprealization.Cslib.Crypto.GMW.gmwVerifier: honest two-round GMW verifier.
Main results #
Cslib.Crypto.GMW.naorMaskBits_realBits: selectively opening the honest committed bits under any challengechand valid witnesswyieldssimBits.Cslib.Crypto.GMW.run_gmwProver_fst,Cslib.Crypto.GMW.eval_gmwInteract: running a verifier againstgmwProvercoincides withgmwInteract.
References #
Masked 3SAT truth-table gadgets #
Bit 0 of a 3-bit truth-table row index t < 8.
Instances For
Bit 1 of a 3-bit truth-table row index t < 8.
Instances For
Bit 2 of a 3-bit truth-table row index t < 8.
Instances For
Pack three literal-variable bits into an active truth-table row index in 0..7.
Instances For
Evaluate a clause of length at most 3 given the truth values of its first three literals' variables.
Instances For
Look up the bit for variable v in vec at its first occurrence in φ.vars, returning
false when v ∉ φ.vars.
Instances For
The 8-bit masked truth table of clause c under variable mask m.
Instances For
The 8-bit indicator of the active row of clause c under masked assignment v.
Instances For
The 8 * φ.length-bit concatenation of all clause truth tables of φ under mask m.
Instances For
The 8 * φ.length-bit concatenation of all active-row indicators of φ under v.
Instances For
Single-copy and three-copy bit layouts #
Number of committed bits in one copy of the masked 3SAT gadget:
φ.vars.length mask bits, φ.vars.length masked assignment bits, and 8 * φ.length table bits.
Instances For
Number of committed bits across all three parallel copies.
Instances For
Extract the m segment (first φ.vars.length bits) of a copy.
Instances For
Extract the v segment (second φ.vars.length bits) of a copy.
Instances For
Extract the truth-table segment (8 * φ.length bits) of a copy.
Instances For
Honest committed bits for one copy given witness w and mask m.
Instances For
Simulated (and selectively opened) bits for one copy given challenge bit b and random word
rand of length φ.vars.length.
Instances For
Selective-opening flags for one copy under challenge bit b.
Instances For
Check the opened bits of one copy against challenge bit b.
Instances For
Three-copy protocol messages and verification #
Extract copy 0 (copyLen φ bits) from a 3-copy GMW bit vector.
Instances For
Extract copy 1 (copyLen φ bits) from a 3-copy GMW bit vector.
Instances For
Extract copy 2 (copyLen φ bits) from a 3-copy GMW bit vector.
Instances For
Honest committed bits across all three copies.
Instances For
Simulated (and selectively opened) bits across all three copies.
Instances For
Selective-opening flags across all three copies under challenge word ch.
Instances For
Two-round deterministic state handler, honest prover, and honest verifier #
Deterministic two-round state transition answering the first query with reply1 q, the second
query with reply2 (BitString.listRow 3 0 q) while recording the 3-bit challenge in the state, and
subsequent queries with [].
Instances For
The honest GMW prover for a 3SAT formula φ and witness w. It samples its masks and
commitment seeds on the first query and answers the two rounds via honestReply1 and
honestReply2.
Instances For
The PPT program realizing the honest GMW prover's interaction with a verifier prog.
Instances For
The two-round GMW verifier for a problem reduced to ThreeSAT by f, at security parameter
n (using Naor commitments with seed length n + 7).