Skip to content

A toolkit for viable zk-SNARKS on Ethereum, Web, Mobile and Desktop

License

Notifications You must be signed in to change notification settings

swasilyev/ethsnarks

 
 

Repository files navigation

EthSnarks

Zero-Knowledge proofs are coming to Ethereum and Dapps in 2018/2019!

EthSnarks is a collection of zkSNARK circuits and supporting libraries to use them with Ethereum smart contracts, it aims to help solve one of the biggest problems facing zkSNARKS on Ethereum - cross-platform on desktop, mobile and in-browser, cheap enough to run on-chain, and with algorithms that significantly reduces the time it takes to run the prover.

The notable advantages of using EthSnarks are:

  • Reduced cost, 500k gas with 1 input, using Groth16.
  • Prove zkSNARKs in-browser, with WebAssembly and Emscripten
  • Linux, Mac and (soon) Windows builds
  • Solidity, Python and C++ support in one place
  • A growing library of gadgets and algorithms

EthSnarks is participating in the Ethereum Foundation's grants program Wave 4, over the next 6-8 months development will continue full-time, and we will be working with companies and developers to help overcome the common challenges and hurdles that we all face. Get in-touch for more information.

WARNING: EthSnarks is alpha quality software, improvements and fixes are made frequently, and documentation doesn't yet exist

Examples

Miximus

Miximus is a self-service coin mixer and anonymous transfer method for Ethereum, it accepts deposits of 1 ETH, then allows you to withdraw coins by providing a zkSNARK proof that proves you know the spend key for one unspent coin without revealing which one it is.

For more information, see:

The zkSNARK prover is built as a native library which can plug-in to your application, when provided with the correct arguments it returns the zkSNARK proof as JSON. While you may think of zkSNARKs as being slow - the algorithms chosen for Miximus mean proofs can be made in 5 seconds, however we're still studying their security properties.

Building

Build Status Codacy Badge BCH compliance

Type make - the first time you run it will retrieve submodules, setup cmake and build everything, for more information about the build process see the Travis-CI build logs. The following dependencies (for Linux) are needed:

  • cmake
  • g++ or clang++
  • gmp
  • libcrypto
  • boost
  • npm / nvm

WebAssembly and JavaScript builds are supported via ethsnarks-emscripten

Requests and Contributions

This project aims to help create an ecosystem where a small number of well tested but simple zkSNARK circuits can be easily integrated into your project without having to do all of the work up-front.

If you have any ideas for new components, please Open an issue, or submit a pull request.

Gadgets

We are surely increasing the range of gadgets, supporting libraries, available documentation and examples; at the moment the best way to find out how to use something is to dig into the code or ask questions via a new issue

The following gadgets are available

Maintainers

@HarryR

About

A toolkit for viable zk-SNARKS on Ethereum, Web, Mobile and Desktop

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 61.1%
  • Python 21.7%
  • Solidity 10.1%
  • Shell 2.5%
  • CMake 1.8%
  • JavaScript 1.7%
  • Makefile 1.1%