Home

ZoKrates_

A toolbox for zkSNARKs on Ethereum, from a high-level language for provable programs to on-chain proof verification.

  • Rust
  • Zero-Knowledge Proofs
  • Compiler
  • Ethereum

[ github ] [ live ]

ZoKrates

ZoKrates is a toolbox for zkSNARKs on Ethereum, which I worked on as a core contributor at the Ethereum Foundation. zkSNARKs let you prove that a computation was executed correctly without re-running it, and without revealing its inputs. On a blockchain, where every node re-executes everything and every input is public, that changes what’s possible: heavy computation moves off-chain and privacy becomes an option. The catch is that writing a SNARK by hand means encoding your program as an arithmetic circuit, which is roughly as pleasant as it sounds.

ZoKrates closes that gap with a compiler. You write a program in a small, high-level language, and the toolbox takes it the rest of the way: compiles it to a constraint system, runs the trusted setup, computes witnesses, generates proofs, and exports a Solidity contract that verifies them on-chain. Proving you know the square root of a public number without revealing it is four lines:

def main(private field a, field b) {
    assert(a * a == b);
    return;
}

The private keyword is the whole pitch in one word: the prover convinces the verifier the assertion holds without disclosing a.

My work spanned the language, the compiler, and the proving pipeline. Working on ZoKrates meant building a compiler where the target isn’t machine code but mathematics, and where correctness is unforgiving: a miscompiled program doesn’t crash, it proves something false. That standard shaped how I approach every system I’ve built since.