All Projects → status-im → nim-blscurve

status-im / nim-blscurve

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHEv2 MIT LICENSE-MIT
Nim implementation of BLS signature scheme (Boneh-Lynn-Shacham) over Barreto-Lynn-Scott (BLS) curve BLS12-381

Programming Languages

c
50402 projects - #5 most used programming language
nim
578 projects

Projects that are alternatives of or similar to nim-blscurve

pairing
Optimised bilinear pairings over elliptic curves
Stars: ✭ 44 (+131.58%)
Mutual labels:  elliptic-curves, pairing, pairing-cryptography
EllipticCurve
An elliptic curve library written in Swift 4
Stars: ✭ 18 (-5.26%)
Mutual labels:  elliptic-curves, elliptic-curve-arithmetic
bls-js
BLS signature implementation
Stars: ✭ 15 (-21.05%)
Mutual labels:  elliptic-curves, bls
galois
A performant NumPy extension for Galois fields and their applications
Stars: ✭ 106 (+457.89%)
Mutual labels:  elliptic-curves, elliptic-curve-cryptography
noble-ed25519
Fastest JS implementation of ed25519, x25519 & ristretto255. Independently audited, high-security, 0-dependency EDDSA signatures and ECDH key agreement
Stars: ✭ 220 (+1057.89%)
Mutual labels:  elliptic-curves, elliptic-curve-cryptography
std-curves
Standard curve database.
Stars: ✭ 53 (+178.95%)
Mutual labels:  elliptic-curves, elliptic-curve-cryptography
hazmat-math
Hazmat ECC arithmetic for Cryptography.io
Stars: ✭ 28 (+47.37%)
Mutual labels:  elliptic-curves, elliptic-curve-arithmetic
libgoldilocks
An implementation of Mike Hamburg's Ed448 (Goldilocks) curve - derived from libdecaf. This is a mirror of https://bugs.otr.im/otrv4/libgoldilocks
Stars: ✭ 17 (-10.53%)
Mutual labels:  elliptic-curves
btclib
btclib: a python3 library for 'bitcoin cryptography'
Stars: ✭ 60 (+215.79%)
Mutual labels:  elliptic-curves
keystore-idb
In-browser key management with IndexedDB and the Web Crypto API
Stars: ✭ 37 (+94.74%)
Mutual labels:  elliptic-curves
ECTester
Tests support and behavior of elliptic curve cryptography implementations on JavaCards (TYPE_EC_FP and TYPE_EC_F2M) and in selected software libraries.
Stars: ✭ 51 (+168.42%)
Mutual labels:  elliptic-curves
cryptotools
No description or website provided.
Stars: ✭ 182 (+857.89%)
Mutual labels:  elliptic-curves
py
Elliptic Curve Integrated Encryption Scheme for secp256k1 in Python
Stars: ✭ 97 (+410.53%)
Mutual labels:  elliptic-curve-cryptography
bulletproofs
Bulletproofs and Bulletproofs+ Rust implementation for Aggregated Range Proofs over multiple elliptic curves
Stars: ✭ 62 (+226.32%)
Mutual labels:  elliptic-curves
libeddsa
cryptographic library for ed25519 and curve25519
Stars: ✭ 20 (+5.26%)
Mutual labels:  elliptic-curves
Number-Theory-Python
Python code to implement various number theory, elliptic curve and finite field computations.
Stars: ✭ 85 (+347.37%)
Mutual labels:  elliptic-curves
noble-secp256k1
Fastest JS implementation of secp256k1. Independently audited, high-security, 0-dependency ECDSA & Schnorr signatures.
Stars: ✭ 313 (+1547.37%)
Mutual labels:  elliptic-curve-cryptography
dusk-zerocaf
Zerocaf: A library built for EC operations in Zero Knowledge.
Stars: ✭ 50 (+163.16%)
Mutual labels:  elliptic-curve-cryptography
pairist
Pairing board for the modern era
Stars: ✭ 19 (+0%)
Mutual labels:  pairing
jwt-compact
Compact JWT implementation in Rust
Stars: ✭ 26 (+36.84%)
Mutual labels:  elliptic-curves

BLS Signature Scheme over BLS12-381 pairing-friendly curve

Build Status: Travis Build status Build Status: Azure Github Actions CI

This library implements:

  • The BLS signature scheme (Boneh-Lynn-Shacham)
  • over the BLS12-381 (Barreto-Lynn-Scott) pairing-friendly curve

Cipher suite ID: BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_

Installation

You can install the developement version of the library through nimble with the following command

nimble install https://github.com/status-im/nim-blscurve

Implementation stability

This repo follows Ethereum 2.0 requirements.

Besides the standardization work described below, no changes are planned upstream for the foreseeable future.

Standardization

Currently (Jun 2019) a cross-blockchain working group is working to standardize BLS signatures for the following blockchains:

  • Algorand
  • Chia Network
  • Dfinity
  • Ethereum 2.0
  • Filecoin
  • Zcash Sapling

Signature scheme

Hashing to curve

Note: the implementation was done following Hash-to-curve v7 v9 and v7 are protocol compatible but have cosmetic changes (naming variables, precomputing constants, ...)

Curve implementation

Backend

This library uses:

BLST uses SSSE3 by default, if supported on the host. To disable that, when building binaries destined for older CPUs, pass -d:BLSTuseSSSE3=0 to the Nim compiler.

Keeping track of upstream

To keep track of upstream AMCL:

  • Update the submodule.
  • Execute nim e milagro.nims amcl blscurve/csources
  • Test
  • Commit

Executing the test suite

We recommend working within the nimbus build environment described here: https://github.com/status-im/nim-beacon-chain/

To execute the test suite, just navigate to the root of this repo and execute:

nimble test

Please note that within the nimbus build environment, the repository will be located in nim-beacon-chain/vendor/nim-blscurve.

Executing the fuzzing tests

Before you start, please make sure that the regular test suite executes successfully (see the instructions above). To start a particular fuzzing test, navigate to the root of this repo and execute:

nim tests/fuzzing/run_fuzzing_test.nims <test-name>

You can specify the fuzzing engine being used by passing an additional --fuzzer parameter. The currently supported engines are libFuzzer (used by default) and afl.

All fuzzing tests are located in tests/fuzzing and use the following naming convention:

fuzz_<test-name>.nim

License

Licensed and distributed under either of

at your option. These files may not be copied, modified, or distributed except according to those terms.

Dependencies

  • SupraNational BLST is distributed under the Apache License, Version 2.0
  • MIRACL Core is distributed under the Apache License, Version 2.0
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].