Closed mratsim closed 4 years ago
The library provides both an API that enforces correct use of proof-of-possession (as required by the IETF draft) or an overload that implements the proposed standard API.
Test framework WIP. The failing test is quite strange, we do compute the correct signature especially when serialized to hex but there is a off by one on a byte. Probably a single signature may have multiple valid representations in-memory:
One of the official EF test vectors that tests a forged aggregate signature is buggy, the aggregate signature is actually valid: https://github.com/ethereum/eth2.0-specs/issues/1618
Ready for review.
CI fixes TBD but with no impact of actual code:
Don't merge:
See:
==> We wait for 0.10.2 and clean vectors before merging
@mratsim Let's wait until proper test vectors will be published and tested.
Also closes #35
The official test vectors generator according to the draft v5 has been released yesterday: https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/commit/2500e6c42c16ae719c92c4f60aac4b003662c24f
and can be run with make vectors
(but requires Sagemath on Python 2 AFAIK)
Merging as as discussed on Wednesday call, it's blocking further honest validator development by @tersec
Update our BLS signature scheme to the draft standard:
We use the Proof-of-Possession scheme with Ciphersuite ID: "BLS_SIG_BLS12381G2-SHA256-SSWU-RO-POP"
Implementation is complete:
Tests:
Status:
Things not done:
common.nim
is actual not common but part of the old signature scheme for example the oldhashToG2
. Some cleanup can be done later to remove all that old cruft once we fully switch to 10.1.