- Notifications
You must be signed in to change notification settings - Fork45
If you like this project, please ⭐⭐⭐ it on GitHub!! Solidity-compatible BLS signatures, threshold encryption, distributed key generation library in modern C++. Actively maintained and used by SKALE for consensus, distributed random number gen, inter-chain communication and protection of transactions. BLS threshold signatures can be verified in
License
skalenetwork/libBLS
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A mathematical library written in C++ that supports BLS threshold signatures, Distributed Key Generation (DKG) and Threshold Encryption (TE).
This libBLS library is developed by SKALE Labs and uses SCIPR-LAB's libff (see Libraries below).
This libBLS library is still in active development and therefore should be regarded asalpha software. The development is still subject to security hardening, further testing, and breaking changes.This library has not yet been reviewed or audited for security. Please seeSECURITY.md for reporting policies.
libBLS is a C++ library forBLS signatures andDKG that supports both threshold signatures and multi-signatures. Also it supportsThreshold Encryption.
The signature process proceeds in 4 steps:
- Key generation
- Hashing
- Signing
- Verification
libBLS uses the alt_bn128 (Barreto-Naehrig curve) elliptic curve to be compatible withEthereum's cryptography and provides 128 bits of security. Also, it provides opportunity to generate secret keys with DKG algorithm that supports the same curve.
libBLS for the most part corresponds toBLS signature standard. This work is still in progress and is going to be improved in the next couple of months.
Encryption process is running as follows:
- Key generation
- Encryption
- Decryption
- Verifying and combining shares
libBls uses the same alt_bn128 curve for threshold encryption as for BLS signatures.
libBLS allows to sign about 3000 messages per second on a single thread (Intel® Core™ i3-4160 CPU @ 3.60GHz). However, for our solution we have implemented constant time signing (0.01 sec for sign) to avoid timing attacks.
libBLS has been built and tested on Ubuntu and Mac.
GitHub is used to maintain this source code. Clone this repository by:
git clone https://github.com/skalenetwork/libBLS.gitcd libBLS
Ensure that required packages listed below are installed.
Build libBLS's dependencies by:
cd depsbash ./build.shcd ..
brew install libtool automake cmake pkg-config yasm# Configure the project and create a build directory.cmake -H. -Bbuild# Build all default targets using all cores.cmake --build build -- -j$(sysctl -n hw.ncpu)
Ensure that the required packages are installed by executing:
sudo apt-get updatesudo apt-get install -y automake cmake build-essential libgnutls28-dev libtool\ pkg-config yasm texinfo autoconf clang-format-14
Configure the project build with the following commands.
# Configure the project and create a build directory.cmake -H. -Bbuild# Build all default targets using all cores.cmake --build build -- -j$(nproc)
#include<libBLS.h>
Seedocs for libBLS documentation.
If you have any questions please ask the development community onDiscord.
Otherwise see ourCONTRIBUTING.md for more information.
Copyright (C) 2018-present SKALE Labs
About
If you like this project, please ⭐⭐⭐ it on GitHub!! Solidity-compatible BLS signatures, threshold encryption, distributed key generation library in modern C++. Actively maintained and used by SKALE for consensus, distributed random number gen, inter-chain communication and protection of transactions. BLS threshold signatures can be verified in