Rishabh Kataria

What is a zero-knowledge proof?

By Rishabh Kataria ·

A zero-knowledge proof lets one person (the prover) convince another (the verifier) that a statement is true without revealing anything except that it is true. For example: "my credit score is above 700" can be proven without showing the score.

Three properties

Every zero-knowledge proof must be:

  1. Complete: if the statement is true, an honest prover can always convince the verifier.
  2. Sound: if it is false, a cheating prover cannot convince the verifier, except with a tiny probability.
  3. Zero-knowledge: the verifier learns nothing beyond the fact that the statement is true.

An intuition: the cave

Picture a ring-shaped cave with a locked door in the middle. Peggy says she knows the password. Victor waits outside while she walks in down either the left or right path. Victor then shouts which side she should come out of. If she knows the password, she can always obey by going through the door. If she does not, she only has a 50% chance each time. After 20 rounds, a faker would succeed with probability about one in a million, yet Victor never hears the password.

What zk-SNARKs add

Real systems use zk-SNARKs: zero-knowledge succinct non-interactive arguments of knowledge.

The statement is written as a program (a "circuit"). The prover runs it on private inputs and produces a proof; the verifier only sees public inputs and the proof. Many zk-SNARKs work over pairing-friendly elliptic curves such as BLS12-381.

How Credipro uses it

In Credipro, a borrower proves "my creditworthiness meets the lender's threshold" without revealing their identity or score. Because a fully anonymous borrower could default without consequence, Credipro adds an escape hatch: the identity is stored encrypted, and only a 2-of-3 oracle consensus can decrypt it, and only for the affected lender, if the loan defaults.

Where else they are used

Private payments, proving age or citizenship without showing an ID, scaling blockchains with rollups, and proving a computation was done correctly without redoing it.