-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Crypto] Pairing edge case #3977
Conversation
tarakby
commented
Mar 1, 2023
- Relic multi-pairing computation has a bug in a specific edge case, that can be triggered by BLS private keys equal to 1 or -1 during signature verification. This PR introduces a temporary fix in Flow crypto while Relic gets fixed.
- add tests in the crypto lib to check the edge case.
Codecov Report
@@ Coverage Diff @@
## master #3977 +/- ##
=======================================
Coverage 53.26% 53.26%
=======================================
Files 820 820
Lines 76631 76631
=======================================
+ Hits 40815 40816 +1
+ Misses 32513 32512 -1
Partials 3303 3303
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -153,6 +153,10 @@ func testKeyGenSeed(t *testing.T, salg SigningAlgorithm, minLen int, maxLen int) | |||
}) | |||
} | |||
|
|||
var BLS12381Order = []byte{0x73, 0xED, 0xA7, 0x53, 0x29, 0x9D, 0x7D, 0x48, 0x33, 0x39, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var BLS12381Order = []byte{0x73, 0xED, 0xA7, 0x53, 0x29, 0x9D, 0x7D, 0x48, 0x33, 0x39, | |
const BLS12381Order = []byte{0x73, 0xED, 0xA7, 0x53, 0x29, 0x9D, 0x7D, 0x48, 0x33, 0x39, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's possible to declare an array as a constant, an array in Go cannot be immutable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bors merge |
3977: [Crypto] Pairing edge case r=tarakby a=tarakby - Relic multi-pairing computation has a bug in a specific edge case, that can be triggered by BLS private keys equal to 1 or -1 during signature verification. This PR introduces a temporary fix in Flow crypto while Relic gets fixed. - add tests in the crypto lib to check the edge case. Co-authored-by: Tarak Ben Youssef <tarak.benyoussef@dapperlabs.com> Co-authored-by: Tarak Ben Youssef <50252200+tarakby@users.noreply.github.com>
…nto tarak/pairing-edge-case
Canceled. |
bors merge |
4113: [Crypto] update Relic Version r=tarakby a=tarakby - update Relic to a version that fixes a pairing computation bug - remove the temporary fix in BLS verification (introduced in #3977) - integrate Relic's cmake and minor header changes Co-authored-by: Tarak Ben Youssef <tarak.benyoussef@dapperlabs.com> Co-authored-by: Tarak Ben Youssef <50252200+tarakby@users.noreply.github.com>