Skip to content
Chaoran Huang
Applied Cryptography

Proving Without Revealing: Anonymous Voting

Part 4 of 6. Zero-knowledge definitions, Schnorr proofs, Fiat–Shamir, and an anonymous voting system assembled one attack at a time.

Outline — prose not written

Keep Schnorr as the only protocol derived in full. Everything else should support the voting system rather than become a second survey.

Throughline

A verifier can learn that a statement is true without learning the witness that makes it true.

1. The colorblind-friend protocol

  • Run the two-marker swap game in full.
  • Derive soundness amplification:
Pr[cheat undetected]=2k\Pr[\text{cheat undetected}]=2^{-k}
  • Land the intuition: the verifier becomes convinced the colors differ but learns neither color.

Reference: Goldreich, “Foundations of Cryptography,” vol. 1 §4.1

2. What zero knowledge requires

  • Completeness: an honest prover convinces an honest verifier of a true statement.
  • Soundness: a false statement is accepted only with negligible probability.
  • Zero knowledge: a simulator without the witness can reproduce the verifier's view.
  • Treat proof of knowledge separately: an extractor can recover a witness from a prover that convinces reliably.
  • Distinguish honest-verifier, statistical, and computational zero knowledge in a collapsible aside.

Reference: Goldreich vol. 1 §4.3; Lindell, “How to Simulate It”

3. Schnorr's protocol

  • Statement: prove knowledge of xx where h=gxh=g^x.
  • Show commit, challenge, response:
a=gr,cZq,z=r+cx(modq)a=g^r,\qquad c\leftarrow\mathbb Z_q,\qquad z=r+cx\pmod q
  • Verify:
gz=ahcg^z=a\,h^c
  • Extract from two accepting transcripts with the same aa:
x=(zz)(cc)1(modq)x=(z-z')(c-c')^{-1}\pmod q
  • Show simulation by choosing (c,z)(c,z) first and setting a=gzhca=g^zh^{-c}.
  • Warn that reusing rr reveals xx.

Reference: Boneh–Shoup ch. 19

4. Fiat–Shamir

  • Replace the verifier's random challenge with:
c=H(statement,a,context)c=H(\text{statement},a,\text{context})
  • Explain the payoff: the proof becomes non-interactive.
  • State the caveat precisely: security is not automatic for every interactive proof; it depends on the protocol and is usually argued in the random-oracle model.
  • Include domain separation and transcript binding in context.

Reference: Boneh–Shoup §20.3; Fiat–Shamir (1986)

5. Anonymous voting

Build the system as attacks and answers:

Attack or requirementPrimitive
Hide individual votesElGamal encryption
Count without decrypting each ballotExponential ElGamal homomorphism
Prevent one trusted tallierThreshold decryption
Restrict each ballot to 0 or 1OR-proof
Verify partial decryptionsProof of correct decryption
Register eligible voters without linking ballotsBlind signatures
  • Show homomorphic tallying:
Enc(gv1)Enc(gv2)=Enc(gv1+v2)\mathsf{Enc}(g^{v_1})\cdot\mathsf{Enc}(g^{v_2}) =\mathsf{Enc}(g^{v_1+v_2})
  • Explain why the final discrete log is feasible: the tally lies in a small known range.
  • Make the OR-proof the point where simulation becomes a construction tool.

Reference: Cramer, Gennaro, and Schoenmakers (1997)

6. Optional sidebar

  • Graph 3-coloring as zero knowledge for NP.
  • Commitment schemes: hiding plus binding.
  • One paragraph linking to circuit satisfiability, succinct arguments, Merkle commitments, and anonymous transactions.

Reference: Goldreich–Micali–Wigderson (1991)

Assumptions introduced

  • Discrete-log hardness for Schnorr and ElGamal.
  • Random-oracle model for the Fiat–Shamir presentation used here.
  • Binding and hiding commitments for the optional NP construction.

Go deeper