ZoKrates is a toolbox for zkSNARKs on Ethereum.
This is a proof-of-concept implementation. It has not been tested for production.
Install the ZoKrates CLI:
curl -Ls https://scrypt.io/scripts/setup-zokrates.sh | sh
Have a look at the documentation for more information about using ZoKrates. Get started, then try a tutorial!
If you run into problems, ZoKrates has a Gitter room.
ZoKrates is released under the GNU Lesser General Public License v3.
We happily welcome contributions. You can either pick an existing issue or reach out on Gitter.
Unless you explicitly state otherwise, any contribution you intentionally submit for inclusion in the work shall be licensed as above, without any additional terms or conditions.
You can enable zokrates git hooks locally by running:
git config core.hooksPath .githooks
A circuit:
def main(private field p, private field q, field n) {
assert(p * q == n);
assert(p > 1);
assert(q > 1);
return;
}
zokrates compile -i root.zok
# perform the setup phase
zokrates setup
# execute the program
zokrates compute-witness -a 2 2 4
# generate a proof of computation
zokrates generate-proof
# export an sCrypt verifier
zokrates export-verifier-scrypt
# or verify natively
zokrates verify
[1] we use bellman as default backend.