Skip to content

BLS threshold signature verification in Solidity

License

Notifications You must be signed in to change notification settings

futo/solidity-bls

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solidity-bls

Note: This repository is a WIP and will be updated frequently in the coming weeks. This is probably completely broken, please don't use this in production!


This is a library for verifying BLS signatures over bn128 in Solidity. Almost all of the code here is taken from BjornvdLaan's work and the work on ZoKrates available here.

TODO

  • Add real testing
  • See if there are any obvious optimizations
  • Add support for verification of signatures with different messages

Testing

We use Truffle for testing.

$ truffle test
Compiling ./contracts/BLS.sol...
Compiling ./contracts/BLSTest.sol...
Compiling ./contracts/Migrations.sol...
Compiling ./contracts/Pairing.sol...


  Contract: BLS
    ✓ should verify a valid signature (302ms)
    ✓ should not verify a invalid signature (59ms)
    ✓ should not verify a invalid message (291ms)

Gas Cost

The cost of verifying a signature is currently ~365,000 gas.

About

BLS threshold signature verification in Solidity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%