Giter Site home page Giter Site logo

kzg-poly-commit's Introduction

Polynomial Commitments

Based on the paper Polynomial Commitments by Aniket Kate, Gregory Zaverucha, Ian Goldberg. The schemes from the paper are modified to work with type-3 pairings.

Since type-3 requires both groups of the bilinear map to be distinct (in addition to other conditions), another group G2 is introduced. As a result public key becomes twice the size of whats mentioned in the paper as now for each power of secret key, there is an element in both G1 and G2.
Scheme PolyCommit_DL in section 3.2, for efficiency we can choose the public key elements in G2 (g2^{alpha^i}s) to compute commitment since commitment is done once for each polynomial. The witness is computed in G1 since it is computed once for each evaluation. Verification requires 1 exponentiation in G2 in addition to a multi-pairing. There are precomputations possible, look at the verification methods for comments.
Similarly for PolyCommit_Ped in 3.3, commitment is in G1 and witness is in G2. For more details look at the code comments.

For batch openings, look at functions create_witness_for_batch and verify_eval_for_batch in both PolyCommit_DL and PolyCommit_Ped. Run tests timing_batch_witness_random_poly in both PolyCommit_DL and PolyCommit_Ped in release mode to see the time it takes for creating and verifying the witness for various degree polynomials and for various batch sizes. Those tests will also do witness creation and verification individually as well and compare the timing with batched execution.

TODO:

  • Error handling. Start by converting asserts into errors.
  • Address TODOs in code
  • More documentation.

kzg-poly-commit's People

Contributors

lovesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.