This repository provides a test-suite for the BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_
ciphersuite (following draft 4),
as used in Ethereum 2.0 BLS Signature APIs,
as well as common extensions such as signature-sets (batch aggregate verification) and serialization.
The test suite is generated with python, and can be downloaded via the releases. We suggest the following for integration into your testing pipeline:
mkdir -p destination/bls-tests
TESTS_VERSION=v0.1.0
wget https://github.com/ethereum/bls12-381-tests/releases/download/$(TESTS_VERSION)/bls_tests_json.tar.gz -O - | tar -xz -C destination/bls-tests
# bls_tests_yaml.tar.gz is also available: same tests, formatted as YAML
- IETF BLS Signature Scheme versions
- IETF BLS Signature Scheme draft 4
- Finite Field Arithmetic
- Chapter 2 of Elliptic Curve Cryptography. Darrel Hankerson, Alfred Menezes, and Scott Vanstone
The BLS test suite runner has the following handlers:
aggregate_verify
aggregate
fast_aggregate_verify
batch_verify
sign
verify
hash_to_G2
deserialization_G1
deserialization_G2
# Create a virtual environment
python -m venv venv
# Activate the environment
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create output dir
mkdir out
# Run test generator
python main.py --output-dir=out --encoding=yaml
CC0 1.0 Universal, see LICENSE
file.