Home

Awesome

This repo is archived for prosperity

While ethsnarks has been of use to many, and at the time did fit a niche in the Ethereum ecosystem, unfortunately I don't have time to maintain the project and would warn people away from using Ethsnarks as the basis for their project. Many other projects have been developed since its inception that do everything a lot better, have been reviewed by more developers, have more active support - or have simply jumped ahead leaps & bounds to take advantage of new developments made in the past 5 years.

For more information, try some of these awesome lists:

Please note, the PyPi package at https://pypi.org/project/ethsnarks/ should also be considered deprecated.

Thanks to all who've been involved, everybody who provided inspiration and feedback, the Ethereum foundation, everybody who used it or was inspired to make better things. ZK is here, on desktop, on mobile, on-chain, in browsers it's amazing to see how much progress there has been, and I'm excited to see how much more progress there will be in the next 5 years.


EthSnarks

Join the chat at https://gitter.im/ethsnarks

Zero-Knowledge proofs are coming to Ethereum and Dapps in 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:

EthSnarks is participating in the Ethereum Foundation's grants program, 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 beta quality software, improvements and fixes are made frequently, and documentation doesn't yet exist

Examples

Building

Build Status Build status

Unix Flavours (Linux, OSX, Ubuntu, CentOS etc.)

The following dependencies are required to build Ethsnarks:

Check-out the source-code using:

git clone git@github.com:HarryR/ethsnarks.git && cd ethsnarks

After checking-out the repository you need to install the necessary dependencies, the Makefile includes pre-determined rules for different platforms, you need to run this as root or an administrator user (i.e. for Brew on OSX):

Then install the Python dependencies, via Pip, into the local user directory:

Then build and test the project:

Windows (64-bit)

Install MSYS2 from https://www.msys2.org/ then open the MSYS2 Shell and run:

pacman --noconfirm -S make gmp gmp-devel gcc git cmake
git clone git@github.com:HarryR/ethsnarks.git
cd ethsnarks
git submodule update --init --recursive
cmake -E make_directory build
cmake -E chdir build cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build build

Building under 32-bit MinGW32, MSYS (not MSYS2) and Microsoft Visual Studio may be supported in future depending upon demand, but currently it's probably broken...

WASM / Browser

WebAssembly, WASM and JavaScript builds are partially supported via ethsnarks-emscripten and ethsnarks-cheerp. The build process is similar, but using the Emscripten and Cheerp toolchains.

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