Arrow icon
Ness Labs: Make the most of your mind
Learn more about Joggo

A Summary of

Introduction to zk-SNARKs with examples

Christian Lundkvist
View original

Goal of zero-knowledge proofs:

  • Verifier convinces themself that a prover has knowledge of a secret parameter, known as a witness, satisfying some relation.
  • The witness is not revealed to the verifier or anyone else.

Non-interactive zero knowledge proofs:

  • The proof itself is a blob of data that can be verified without any interaction from the prover.

zk-SNARKs can help with privacy on Ethereum.

  • Building blocks of the verification algorithm are added to Ethereum through precompiled contracts. 
  • The generator is run off-chain to produce the proving key and verification key. 
  • Any prover can then use the proving key to create a proof, also off-chain. 
  • The general verification algorithm can then be run inside a smart contract, using the proof, the verification key and the public input as input parameters. 
  • The outcome of the verification algorithm can then be used to trigger other on-chain activity.
Related content
See all posts
Arrow icon