Overview of Zero-Knowledge Proofs (ZKP)
A Zero-Knowledge Proof or a Zero-Knowledge Protocol (ZKP) is a way of proving the validity of a statement without revealing the statement itself. Only the fact of the statement being valid (i.e., true) is sufficient for a part (the Verifier) to validate the claims made by the other party (the Prover). Hence "Zero-Knowledge" since the statement itself is not part of the verification process.
There are two main aspects for Zero-Knowledge protocols:
- Zero Knowledge - that no data other than the claim of of the validity of a statement is shared between the Prover and the Verifier.
- Provable Computation - the ability to validate that the computation ran as designed, and so the output of the computation can be trusted.
Zero-Knowledge protocols can be interactive or non-interactive. For most practical applications, non-interactive protocols are preferred. These can be classified into two main categories:
- ZK-SNARKs (Zero-Knowledge Succinct Non-interactve Arguments of Knowledge).
- ZK-STARKs (Zero-Knowledge Scalable Transparent Argument of Knowledge).
Polylang uses zk-STARK.
Polylang programs are compiled to Miden VM (opens in a new tab) assembly instructions, and proofs are generated on Miden. Miden is a zk-STARK based virtual
machine. For more details on Miden, please refer to their official documentation (opens in a new tab).
The lifecycle of a
Polylang program is:
Polylang compiler compiles the
Polylang contract and program and generates code that can be verified and run on the Miden VM during the run stage. This includes generating code
to verify fields and functions using hashes, validating the inputs, and Declarative Permissions.
Zooming in on the
Polylang compiler compilaton stage:
Polylang prover uses the available context from compilation for actual verification, running, and proof generation: