liveBook · Manning

Zero-knowledge proof

As explained in Elliptic Curve Cryptography for Developers

A zero-knowledge proof is a cryptographic protocol that lets a prover demonstrate that a statement is true or that secret information is known without revealing the secret information itself.

A zero-knowledge proof lets a prover convince a verifier that a statement is true, or that the prover knows secret information, without disclosing that secret. It supports privacy-preserving verification: a person might prove they are over 18 without revealing their age, or a record might establish a permitted medical fact without identifying the patient. section 1.3.4 section 19.7

The central separation is between what must be checked and what must remain hidden. In a noninteractive proof, public input is the statement and private input is the witness. A proof of knowledge combines the witness with the relevant mathematics; verification uses the public statement, a public common reference string (CRS), and the proof. A matching proof and public data yield acceptance, while inconsistent data are rejected. section 1.3.4 section 19.2

Zero-knowledge protocols appear in two broad forms:

  • Interactive proofs exchange challenges and responses between prover and verifier. Repetition reduces a dishonest prover’s chance of passing: with a 50% chance per attempt, 20 attempts reduce it to less than one in one million. section 1.3.4 section 19.1
  • Noninteractive proofs remove the back-and-forth communication. They use public data, a CRS, and a public proof, making them suited to settings such as blockchain verification. section 1.3.4 section 19.7

Ali Baba’s cave

A prover enters one of two cave passages while the verifier waits outside. The verifier then randomly asks the prover to exit through either passage. If a magic door connects the passages, answering an opposite-side request requires knowing the door’s secret. Repeated challenges give evidence of knowledge while the secret itself is never spoken. section 19.1

Figure 19.1 Ali Baba’s cave illustrates the concept of zero-knowledge proof. The prover knows a secret and the verifier wants them to prove they know it, but the verifier doesn’t need to know the secret themselves.
figure

The cave diagram makes the interactive roles visible: the prover demonstrates the ability to satisfy an unpredictable challenge, and the verifier learns no door secret. section 19.1

zk-SNARKs are succinct noninteractive arguments of knowledge adapted to provide zero knowledge. Their construction represents the claim as a quadratic arithmetic program (QAP): wires hold inputs or computed values, and multiplication gates enforce relationships. The QAP’s public wires form the statement; private wires form the witness. A medical-record toy example uses medicine number, dose, patient number, and randomness to prove a specified treatment fact while hiding which patient supplied the record. section 19.1 section 19.2

For pairing-based QAP proofs, gate equations are encoded through functions associated with the gates. Values are taken modulo the torsion-field size, and verification checks that the encoded left, right, and output relationships agree. The CRS contains random setup values that must be destroyed: if retained, they could allow arbitrary proofs. Elliptic-curve pairings can also reduce proof data transmitted compared with other approaches. section 19.7 section 1.5

Zero-knowledge proofs therefore make authenticity or eligibility checkable without making all underlying certificate, transaction, financial, or medical data public. They trade direct disclosure for a proof whose validity can be checked from agreed public information. section 1.3.4 section 19.7

How Elliptic Curve Cryptography for Developers covers it

How deep it goes
Develops interactive and noninteractive proofs through zk-SNARKs, QAP gates, interpolants, CRS setup, and pairing-based verification.
Examples
Uses age verification, Ali Baba’s cave, blockchain transactions, and a medical-record QAP with medicine, dose, and patient inputs.
What it assumes
Introduces zero knowledge from interactive prover-verifier challenges before progressing to noninteractive proofs and QAP mathematics.
What you can do after
Evaluate/understand how a prover establishes knowledge without revealing a witness, including the role of QAPs and CRS-based verification.
How it connects
Connects prover-verifier protocols with zk-SNARKs, quadratic arithmetic programs, common reference strings, elliptic curves, and pairings.

Also explained in

Compare how 3 books explain zero-knowledge proof →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elliptic Curve Cryptography for Developers. The section links point to the parts of the book it draws on.