EthSpring

⌘K
  1. Home
  2. Docs
  3. EthSpring
  4. Zero Knowledge Cryptograp...
  5. Section 6: Building with ZK

Section 6: Building with ZK

This section focuses on resources for building decentralized applications with zkSNARKs.

Readings

How I Learned to write zkSNARKs and the associated repo

ZKPs for Engineers: A look at the Dark Forest ZKPs

snarkjs Github repo – this is the most-used Javascript library for zkSNARK proof generation

circom-starter repo – a simple repo with a build script where you can play around with circuits

zk-browser repo – source code for a simple webapp that generates ZK proofs for pre-image of MiMC hash and verifies them in browser

Quests

  • Complete the snarkjs tutorial. Don’t worry if steps 1-8 and 15-20 don’t make sense; if you want to understand them, section 3 of this Notion document provides more context.
  • Write a zkSNARK using circom and snarkjs for the MiMC hash function (info). You’ll probably want to reference the circomlib library of useful circuits (which includes a MiMC function you can import). Feel free to check out this circuit in the Dark Forest open-source repo, which imports and uses circomlib’s MiMC circuit.
  • Take a look at the Modulo circuit in the README of this repo. Try to understand why each part is necessary!