kilic / bls12-381

High-speed BLS12-381 implementation in Go
Apache License 2.0
124 stars 47 forks source link

Outdated and incompatible hash_to_curve #35

Closed mratsim closed 2 years ago

mratsim commented 2 years ago

The library is currently using the hash_to_curve draft 6 scheme.

It is incompatible with what is used in Ethereum Consensus layer (H2C draft 7 minimum), in particular due to the changes in sgn0 introduced in https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/pull/230/files

See vectors: https://github.com/ethereum/bls12-381-tests

There shouldn't be any impact on the execution layer because there is no hash-to-curve precompile (yet) but EIP2537 will be added soon: https://arachnid.github.io/EIPs/EIPS/eip-2537

mratsim commented 2 years ago

Actually scratch that, I read the wrong "sign" function and got confused after reading #30

https://github.com/kilic/bls12-381/blob/3a0f2553a3b9888a7201144592780f2300ad9ffb/field_element.go#L160-L171