Skip to content

blockhackersio/zksampler

Repository files navigation

ZK Sampler

This repo demonstrates various circuits using various ZK protocols. It is a work in progress but can act as a good example of how to setup end to end Zero Knowledge Proofs using various proving languages and systems.

So far we have:

  • Multiplication of two fields
    • Noir (TurboPlonk)
    • Circom (Plonk)
  • Chained multiplication of three fields
    • Noir (TurboPlonk)
    • Circom (Plonk)
  • Pederson hash of a secret string
    • Noir (TurboPlonk)
    • Circom (Plonk)
  • Merkle tree inclusion proof
    • Noir (TurboPlonk)
    • [-] Circom (Plonk)
  • Tornado style Darkpool
    • Noir (TurboPlonk)
    • Circom (Plonk)
  • utx0 Darkpool
    • Noir (TurboPlonk)
    • Circom (Plonk)

Requirements

  • Node v18.13.0
  • snarkjs 0.5.0
  • nargo 0.1
  • circom compiler 2.1.3
  • pnpm 7.26.0

Install dependencies

pnpm install # will download ptau file

Build project

pnpm build --force

Run frontend

pnpm dev

Build and prove circom circuits locally

cd circom
pnpm build
pnpm prove
pnpm verify

Build and prove noir circuits locally

cd noir
pnpm build
./scripts/prove.sh multiplication | ./scripts/verify.sh multiplication
./scripts/prove.sh double | ./scripts/verify.sh double
./scripts/prove.sh pedersen | ./scripts/verify.sh pedersen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published