Skip to content

KZG polynomial commitments over bls12-381 in JavaScript

License

Notifications You must be signed in to change notification settings

vsc-eco/bls-kzg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KZG Commitments Over BLS12-381

Proof of concept KZG commitments using BLS12-381 curves using noble-curves and galois

This library is based off libkzg by weijiekoh. We specifically used BLS12-381 instead of bn254 due to security issues and integration with the rest of the VSC tech stack. To learn more about what we are building please go to our website

TBD

Implementation notes

  • The trusted setup used within this library is hardcoded and cannot securly generate proofs. A proper trusted setup much be used.
  • Both single and multi proofs use G2 point as the proof.
  • Pure Javascript with no bindings

Tests

PASS  src/__tests__/kzg.test.ts (18.857 s)
  kzg/apk proofs on bls12-381
    commit, prove, and verify the polynomial 
      √ compute coefficientes (small) (4 ms)
      √ compute coefficientes (large) (2 ms)
      √ generate a KZG commitment (93 ms)
      √ generate a KZG proof (57 ms)
      √ verify a KZG proof (151 ms)
      √ generate and verify a multi KZG proof (332 ms)

License

MIT