• Stars
    star
    142
  • Rank 258,495 (Top 6 %)
  • Language
    C++
  • License
    GNU Affero Genera...
  • Created over 5 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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 Solidity, and used as random beacon (common coin)

libBLS: a C++ library for BLS Threshold Signatures

Build and test libBLS codecov CII Best Practices Discord

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

An important note about production readiness

This libBLS library is still in active development and therefore should be regarded as alpha 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 see SECURITY.md for reporting policies.

Overview

libBLS is a C++ library for BLS signatures and DKG that supports both threshold signatures and multi-signatures. Also it supports Threshold Encryption.

The signature process proceeds in 4 steps:

  1. Key generation
  2. Hashing
  3. Signing
  4. Verification

libBLS uses the alt_bn128 (Barreto-Naehrig curve) elliptic curve to be compatible with Ethereum'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 to BLS 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:

  1. Key generation
  2. Encryption
  3. Decryption
  4. Verifying and combining shares

libBls uses the same alt_bn128 curve for threshold encryption as for BLS signatures.

Performance Specifications

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.

Installation Requirements

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.git
cd libBLS

Building Dependencies

Ensure that required packages listed below are installed.

Build libBLS's dependencies by:

cd deps
bash ./build.sh
cd ..

Building from source on Mac

brew install flex bison 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)

Building from source on Ubuntu

Ensure that the required packages are installed by executing:

sudo apt-get update
sudo apt-get install -y automake cmake build-essential libprocps-dev libtool\
                        pkg-config yasm texinfo autoconf flex bison clang-format-6.0

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 the library

#include <libBLS.h>

Documentation

See docs for libBLS documentation.

Libraries

Contributing

If you have any questions please ask the development community on Discord.

Discord

Otherwise see our CONTRIBUTING.md for more information.

License

License

Copyright (C) 2018-present SKALE Labs

More Repositories

1

skale-network

Handling millions of transactions per week, SKALE is a multichain network composed of an unlimited number of secure, decentralized, high-performance Ethereum Native Blockchains
Python
134
star
2

skaled

Running more than 20 production blockchains, SKALED is Ethereum-compatible, high performance C++ Proof-of-Stake client, tools and libraries. Uses SKALE consensus as a blockchain consensus core. Includes dynamic Oracle. Implements file storage and retrieval as an EVM extension.
C++
84
star
3

skale-consensus

Running the very core of SKL network, SKALE BFT consensus is universal, modern, modular, high-performance, asynchronous, provably-secure, agent-based Proof-of-Stake blockchain consensus engine in C++ 17. Includes provably secure embedded Oracle. Used by SKALE elastic blockchains. Easy and flexible enough to implement your own blockchain or smart contract platform. BLS signatures and Binary Asynchronous Consensus are main building blocks.
C++
78
star
4

sgxwallet

sgxwallet is the first-ever opensource high-performance hardware secure crypto wallet that is based on Intel SGX technology. First opensource product on Intel SGX whitelist. Scales to 100,000+ transactions per second. Currently supports ETH and SKALE, and will support BTC in the future. Sgxwallet is under heavy development and use by SKALE network.
Shell
63
star
5

skale-manager

Ethereum Mainnet smart contracts that manage SKALE Network. Coordinates validator-node registration, SKALE Chain creation, bounties, delegation, distributed key generation and service level agreements
TypeScript
55
star
6

skale-demo

Example dApps used during SKALE presentations
C#
41
star
7

IMA

SKALE Interchain Messaging Agent
TypeScript
37
star
8

filestorage.js

Filestorage.js is client library for SKALE sidechain decentralized file storage. Used to transfer files between a browser and a SKALE sidechain.
JavaScript
30
star
9

skale.py

Python library for interacting with SKALE Manager
Python
29
star
10

skale-node

Configuration files for SKALE node
Jinja
22
star
11

node-cli

A command line tool to setup, register and maintain your SKALE node. Written in Python.
Python
20
star
12

filestorage

SKALE filestorage extension to EVM
JavaScript
20
star
13

skale-sdk

Shell
19
star
14

skale-admin

SKALE admin docker container orchestrates all other SKALE Docker containers
Python
18
star
15

skale.js

Javascript library for interacting with SKALE Manager
TypeScript
15
star
16

universal-cli

Instantly execute any Solidity smart contract from command line
Python
14
star
17

skale-nms

DEPRECATED: SKALE Node Monitoring Service (NMS) - decentralized SLA metrics and bounty collection
Python
13
star
18

transaction-manager

Microservice used to send concurrent transactions to the Ethereum network.
Python
13
star
19

truffle-skale-network-box

Truffle Box for deploying smart contracts directly to the SKALE Network.
JavaScript
12
star
20

skale-node-tests

Framework for system/integration testing of skale node
Python
10
star
21

skaled-tests

Skaled tests
Python
10
star
22

hackathon

Guidelines for hackathons
10
star
23

validator-cli

A command line tool for validators and delegators. Written in Python.
Python
10
star
24

docker-lvmpy

Easily manage LVM volumes from docker containers using this Docker plugin. Written in python. Under heavy development and use by SKALE network. Stay tuned for more docs!
Python
9
star
25

sgx.py

Python library to interact with sgxwallet
Python
9
star
26

documentation

SKALE Network documentation
Handlebars
8
star
27

skale-allocator

TypeScript
8
star
28

node-provisioning

Provision SKALE nodes in the cloud for testing purposes
Python
8
star
29

skale-node-monitor-jenkins

Python
6
star
30

skale-ima-sdk

Solidity
6
star
31

IMA-ethereum-contracts

SKALE Interchain Messaging Agent (IMA) Ethereum Contracts
5
star
32

sla-agent

SKALE SLA Agent - decentralized SLA metrics and part of the SKALE Node Monitoring Service (NMS)
Python
5
star
33

metaport

Metaport is simple JS/TS IMA widget
TypeScript
5
star
34

bounty-agent

Bounty agent - part of SKALE Node Monitoring Service (NMS)
Python
4
star
35

skale-test-abi

ABIs for skale internal testnets
3
star
36

skale-explorer

Administration tool for skale explorers
Python
3
star
37

oracle-contract

Predeployed contract to verify Oracle responses
TypeScript
3
star
38

skale-watchdog

SKALE microservice for providing statuses of SKALE node docker containers
Python
3
star
39

allocator-cli

Python
3
star
40

paymaster

A system that collects SKALE chain fee and distribute it across validators.
Solidity
3
star
41

pow-unity

Pow implementation on C# for unity
C++
2
star
42

filestorage-ui

TypeScript
2
star
43

doc-ui

doc-ui
CSS
2
star
44

awesomesauce

Awesomesauce is an agent-based framework for Ethereum Smart Contract testing. It is used to test SKALE smart contracts.
Python
2
star
45

skale-proxy

SKALE Proxy is high performance, easy-to-run public service that provides proxied and load-balanced JSON-RPC endpoints for SKALE chains. It is based on NGINX.
Python
2
star
46

portal

React-based UI to transfer assets, get chains info and more
TypeScript
2
star
47

doc-utils

doc-utils
JavaScript
2
star
48

predeployed

predeployed
Solidity
2
star
49

skale-ci-integration_tests

JavaScript
2
star
50

admin-ui

SKALE Chain Administrative Dashboard
TypeScript
2
star
51

skale.py-examples

Code samples for the skale.py library
Python
2
star
52

skale-contracts

Artifacts manager for all smart contracts in SKALE system.
TypeScript
2
star
53

ima-agent

Containerized SKALE Interchain Messaging Agent
TypeScript
2
star
54

skaled-blockchain-explorer

JavaScript
1
star
55

helper-scripts

Shell
1
star
56

test-docs

1
star
57

ima-js

JS/TS library for interacting with SKALE IMA Bridge
TypeScript
1
star
58

skaled-stats-viewer

JavaScript
1
star
59

se-integrations

Integrations with Partners and dApp developers
JavaScript
1
star
60

pow-demo

Demo of sChain PoW script
JavaScript
1
star
61

proxy-provision

A set of ansible playbooks to setup SKALE Proxy and Block explorer in the cloud
1
star
62

workflow_test

Play with GitHub Actions workflows
1
star
63

oracle-demo

Examples of using Skale Oracle
TypeScript
1
star
64

etherbase

Predeployed smart contract that stores and manages access to ETH received from block rewards and gas fees.
Python
1
star
65

multisigwallet-cli

JavaScript
1
star
66

upgrade-tools

Scripts to support upgrades of smart contracts
TypeScript
1
star
67

levitation_decentralized_zk_sequencer

Decentralized Sequencer for running ZK-EVM Rollups implemented in Solidity
Solidity
1
star
68

skale-manager-interfaces

Definitions of interfaces needed to integrate with skale-manager smart contracts
Solidity
1
star
69

skale-checks

Python package for node and schain checks
Python
1
star
70

consensusv

SKALE Consensus visualization using OpenGL
C++
1
star
71

marionette

Predeployed smart contract on skale chain that is controlled by external entity.
TypeScript
1
star