{"id":13629820,"url":"https://github.com/skalenetwork/libBLS","last_synced_at":"2025-04-17T09:36:38.696Z","repository":{"id":34651925,"uuid":"173122387","full_name":"skalenetwork/libBLS","owner":"skalenetwork","description":"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)","archived":false,"fork":false,"pushed_at":"2024-03-01T19:17:08.000Z","size":32413,"stargazers_count":142,"open_issues_count":7,"forks_count":46,"subscribers_count":11,"default_branch":"develop","last_synced_at":"2024-08-31T23:48:32.420Z","etag":null,"topics":["bls","bls-signature","bls-signatures","bls-threshold-signatures","common-coin","cryptography","distributed-key-generation","dkg","elliptic-curves","joint-feldman","skale","skale-network","solidity","threshold-cryptography","threshold-encryption","threshold-signatures"],"latest_commit_sha":null,"homepage":"https://skale.space","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skalenetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-28T14:02:07.000Z","updated_at":"2024-08-09T03:31:12.000Z","dependencies_parsed_at":"2024-01-02T03:23:58.879Z","dependency_job_id":"58137e71-bdaa-4242-8453-6bf0f207fb87","html_url":"https://github.com/skalenetwork/libBLS","commit_stats":{"total_commits":834,"total_committers":17,"mean_commits":49.05882352941177,"dds":0.2745803357314148,"last_synced_commit":"f9fcfd07842ce88c5f8942a8338021b79d8f3218"},"previous_names":[],"tags_count":79,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skalenetwork%2FlibBLS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skalenetwork%2FlibBLS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skalenetwork%2FlibBLS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skalenetwork%2FlibBLS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skalenetwork","download_url":"https://codeload.github.com/skalenetwork/libBLS/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223751558,"owners_count":17196663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bls","bls-signature","bls-signatures","bls-threshold-signatures","common-coin","cryptography","distributed-key-generation","dkg","elliptic-curves","joint-feldman","skale","skale-network","solidity","threshold-cryptography","threshold-encryption","threshold-signatures"],"created_at":"2024-08-01T22:01:20.765Z","updated_at":"2025-04-17T09:36:38.680Z","avatar_url":"https://github.com/skalenetwork.png","language":"C++","funding_links":[],"categories":["C++","TSS list"],"sub_categories":[],"readme":"# libBLS: a C++ library for BLS Threshold Signatures\n\n[![Build and test libBLS](https://github.com/skalenetwork/libBLS/actions/workflows/test.yml/badge.svg)](https://github.com/skalenetwork/libBLS/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/skalenetwork/libBLS/branch/develop/graph/badge.svg)](https://codecov.io/gh/skalenetwork/libBLS)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3745/badge)](https://bestpractices.coreinfrastructure.org/projects/3745)\n[![Discord](https://img.shields.io/discord/534485763354787851.svg)](https://discord.com/invite/gM5XBy6)\n\nA mathematical library written in C++ that supports BLS threshold signatures, Distributed Key Generation (DKG) and Threshold Encryption (TE).\n\nThis libBLS library is developed by SKALE Labs and uses SCIPR-LAB's libff (see Libraries below).\n\n## An important note about production readiness\n\nThis 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](SECURITY.md) for reporting policies.\n\n## Overview\n\nlibBLS is a C++ library for [BLS signatures](https://doi.org/10.1007%2F3-540-45682-1_30) and [DKG](https://doi.org/10.1007%2F3-540-48910-X_21) that supports both threshold signatures and multi-signatures. Also it supports [Threshold Encryption](https://doi.org/10.1109/GLOCOM.2003.1258486).\n\nThe signature process proceeds in 4 steps:\n\n1.  Key generation\n2.  Hashing\n3.  Signing\n4.  Verification\n\nlibBLS uses the alt_bn128 (Barreto-Naehrig curve) elliptic curve to be compatible with [Ethereum's cryptography](https://ethereum.github.io/yellowpaper/paper.pdf) and provides 128 bits of security. Also, it provides opportunity to generate secret keys with DKG algorithm that supports the same curve.\n\nlibBLS for the most part corresponds to [BLS signature standard](https://tools.ietf.org/html/draft-boneh-bls-signature-00). This work is still in progress and is going to be improved in the next couple of months.\n\nEncryption process is running as follows:\n\n1.  Key generation\n2.  Encryption\n3.  Decryption\n4.  Verifying and combining shares\n\nlibBls uses the same alt_bn128 curve for threshold encryption as for BLS signatures. \n\n## Performance Specifications\n\nlibBLS 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.\n\n## Installation Requirements\n\nlibBLS has been built and tested on Ubuntu and Mac.\n\nGitHub is used to maintain this source code. Clone this repository by:\n\n```shell\ngit clone https://github.com/skalenetwork/libBLS.git\ncd libBLS\n```\n\n## Building Dependencies\n\nEnsure that required packages listed below are installed.\n\nBuild libBLS's dependencies by:\n\n```shell\ncd deps\nbash ./build.sh\ncd ..\n```\n\n## Building from source on Mac\n\n```shell\nbrew install libtool automake cmake pkg-config yasm\n# Configure the project and create a build directory.\ncmake -H. -Bbuild\n\n# Build all default targets using all cores.\ncmake --build build -- -j$(sysctl -n hw.ncpu)\n```\n\n## Building from source on Ubuntu\n\nEnsure that the required packages are installed by executing:\n\n```shell\nsudo apt-get update\nsudo apt-get install -y automake cmake build-essential libgnutls28-dev libtool\\\n                        pkg-config yasm texinfo autoconf clang-format-14\n```\n\nConfigure the project build with the following commands.\n\n```shell\n# Configure the project and create a build directory.\ncmake -H. -Bbuild\n\n# Build all default targets using all cores.\ncmake --build build -- -j$(nproc)\n```\n\n### Include the library\n\n```cpp\n#include \u003clibBLS.h\u003e\n```\n\n### Documentation\n\nSee [docs](docs) for libBLS documentation.\n\n## Libraries\n\n-   [libff by SCIPR-LAB](http://www.scipr-lab.org/)\n\n## Contributing\n\n**If you have any questions please ask the development community on [Discord](https://discord.gg/vvUtWJB).**\n\n[![Discord](https://img.shields.io/discord/534485763354787851.svg)](https://discord.gg/vvUtWJB)\n\nOtherwise see our [CONTRIBUTING.md](.github/CONTRIBUTING.md) for more information.\n\n## License\n\n[![License](https://img.shields.io/github/license/skalenetwork/libbls.svg)](LICENSE)\n\nCopyright (C) 2018-present SKALE Labs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskalenetwork%2FlibBLS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskalenetwork%2FlibBLS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskalenetwork%2FlibBLS/lists"}