Coder Social home page Coder Social logo

legosnark's Introduction

LegoSNARK

Composable Commit-and-Prove zkSNARKs
✉️ + 🧱 + 🔧 → zk🦈
commitments, gadgets and a framework for commit-and-prove zkSNARKs

This codebase is part of the LegoSNARK paper.

What this codebase includes: example and benchmark implementations in C++17 for some of the schemes in the LegoSNARK paper (plus others, e.g. multivariate polynomial commitments, algorithms for multilinear extensions, a product scheme from eprint:2014/396).

What this codebase is not: it is not for production use; it is not extensively tested; it is not a full-fledged API or EDSL* for commit-and-prove SNARKs.

(*We are still considering an EDSL for commit-and-prove but moved our focus from C++ to Rust as an implementation language as we found the latter to be a superior match)

Looking for LegoGroth16?

If you are looking for LegoGroth16, the commit-and-prove version of Groth16, you can find a Rust implementation here.

Overview

This repo includes commit-and-prove gadgets for the following relations:

It also includes code for:

Setup and Building Instructions

First, install the libraries and utilities required by libsnark and legosnark (see here for more detailed requirements). On several Ubuntu systems this can be done directly through the following command:

sudo apt-get install build-essential cmake git libgmp3-dev libprocps-dev python-markdown libboost-all-dev libssl-dev

Clone the repo and set up submodules:

 git clone https://github.com/imdea-software/legosnark.git
 cd legosnark
 git submodule update --init --recursive

Build all dependencies:

mkdir -p build
cd build
cmake ..
cd depends
make -j8
sudo make -C libsnark install

To build library and executables:

cd ../src # Assuming you were in build/depends from the steps above
make -j8

To try an example, run e.g.:

examples/cplink

License

This code is licensed under either of the following licenses, at your discretion.

Unless you explicitly state otherwise, any contribution that you submit to this library shall be dual licensed as above (as defined in the Apache v2 License), without any additional terms or conditions.

Reference paper

LegoSNARK: Modular Design and Composition of Succinct Zero-Knowledge Proofs
Matteo Campanelli, Dario Fiore, Anaïs Querol

CCS 2019

Acknowledgements

This work has been supported by the Spanish Government under projects Datamantium (ref. RTC-2016-4930-7), SCUM (ref. RTI2018-102043-B-I00), and CRYPTOEPIC (refs. ERC2018-092822, EUR2019-103816), by the Madrid Regional Government under project BLOQUES (ref. S2018/TCS-4339) and by Protocol Labs. The project that gave rise to these results received the support of a fellowship from “la Caixa” Foundation (ID 100010434). The fellowship code is LCF/BQ/ES18/11670018.

legosnark's People

Contributors

matteocam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.