2019-03-27 16:32:13 +00:00
|
|
|
# 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
|
|
|
|
|
2019-10-28 07:53:10 +00:00
|
|
|
- [Eth2 spec](../../specs/bls_signature.md)
|
2019-03-27 16:32:13 +00:00
|
|
|
- [Finite Field Arithmetic](http://www.springeronline.com/sgw/cda/pageitems/document/cda_downloaddocument/0,11996,0-0-45-110359-0,00.pdf)
|
|
|
|
- Chapter 2 of [Elliptic Curve Cryptography](http://cacr.uwaterloo.ca/ecc/). Darrel Hankerson, Alfred Menezes, and Scott Vanstone
|
|
|
|
- [Zcash BLS parameters](https://github.com/zkcrypto/pairing/tree/master/src/bls12_381)
|
|
|
|
- [Trinity implementation](https://github.com/ethereum/trinity/blob/master/eth2/_utils/bls.py)
|
|
|
|
|
|
|
|
## Comments
|
|
|
|
|
2019-04-03 02:50:56 +00:00
|
|
|
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.
|