d27f2350a2
1. Make sure that BLS -Verify APIs would only return `True` or `False` , no exceptions. 2. Use `eth2spec.utils.bls` instead of py_ecc for test generator 3. Add assertions in test generator 4. Add some special test cases for the -Verify APIs 5. Clean up the test format documents |
||
---|---|---|
.. | ||
README.md | ||
main.py | ||
requirements.txt |
README.md
BLS Test Generator
Explanation of BLS12-381 type hierarchy The base unit is bytes48 of which only 381 bits are used
- FQ: uint381 modulo field modulus
- FQ2: (FQ, FQ)
- G2: (FQ2, FQ2, FQ2)
Resources
- Eth2 spec
- Finite Field Arithmetic
- Chapter 2 of Elliptic Curve Cryptography. Darrel Hankerson, Alfred Menezes, and Scott Vanstone
- Zcash BLS parameters
- Trinity implementation
Comments
Compared to Zcash, Ethereum specs always requires the compressed form (c_flag / most significant bit always set). Also note that pubkeys and privkeys are reversed.