-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix BLST aggregate verify with proof-of-possession (#118)
In #100 a regression was introduced to BLST `fastAggregateVerify`. Previous code: ``` var aggAffine{.noInit.}: PublicKey aggAffine.point.blst_p1_to_affine(aggregate) return coreVerifyNoGroupCheck(aggAffine, message, signature, DST) ``` New code introducing regression: ``` var aggAffine{.noInit.}: PublicKey aggAffine.finish(aggAffine) return coreVerifyNoGroupCheck(aggAffine, message, signature, DST) ``` This change led to a compilation error when using `fastAggregateVerify` with proof-of-possession. Secondly, `aggregateVerify` with proof-possession also fails to compile. This was never working, ever since BLST support was introduced in #68. Problematic code: ``` if publicKeys.len != proofs.len or publicKeys != messages.len: return false ``` This patch addresses both compilation problems and extends the existing tests to also cover proof-of-possession functionality. Because the Eth2 vectors do not include proof-of-possession data, the test generator was temporarily extended to produce such reference data. A copy of that data is hardcoded in the eth2_vectors tests.
- Loading branch information
Showing
2 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters