GithubHelp home page GithubHelp logo

tobias-rothmann / kzg Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 15 KB

Implementing the KZG according to the original paper in Rust

Rust 100.00%
concept cryptography kzg rust paper-implementations polynomial-commitments

kzg's Introduction

Implementing the KZG according to the original paper in Rust

Disclaimer

This is a toy/concept implementation and not for use in real-world applications.

Source Paper

This implementation reffers to the original paper "Polynomial Commitments" by Aniket Kate, Gregory M. Zaverucha, and Ian Goldberg. To be found at: https://cacr.uwaterloo.ca/techreports/2010/cacr2010-10.pdf

Implementation

This implementation tries to mirror the original paper definition as close as possible. However, this is not always easily possbile, as finding elliptic curve bilinear group pairing implementations with only two groups (as described in the original paper) is basically impossible. Instead, the implementation uses the popular bls12_381 implementation with 3 groups. That is however the only notable change from the original paper.

The polynomial commitment scheme Trait

In order to support easy exchangable implementations of polynomial commitment schemes, for e.g. use in different plonk versions (DL-KZG-PLONK as SNARK without zero knowledge, PED-KZG-PLONK as zk-SNARK, FRI-PLONK as STARK), I define a polynomial commitment scheme trait upfront, which is implemented by every consruction-implementation.

Done

DL-Construction

Mirroring section 3.2 of the original paper, kzg_dl.rs implements the KZG construction based on the Discrete Log assumption.

Done

PED-CONSTRUCTION

Mirroring section 3.3 of the original paper, kzg_ped implements the KZG construction based on Pedersen-Commitments, which is basically the DL-Constrcution with Pedersen-Commitment style multiplication of random values on to commitments and hence it grants a bit stronger privacy gurantees in exchange for a bit more prover overhead.

Done

Batch Opening

Mirroring section 3.4 Batch Opening of the original paper, the batch-opening trait mirrors bacth-opening for a polynomial commitmenrt schemeand is implemented for the DL and the PED construction.

TODO

kzg's People

Contributors

tobias-rothmann avatar

Watchers

 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.