fix: set correct Jubjub curve generator#821
Open
sug0 wants to merge 2 commits intoConsensys:masterfrom
Open
Conversation
Author
|
/cc @ivokub review requested, I would appreciate merging this PR, since it's pretty self contained, and the changes are pretty obvious. cheers! |
Collaborator
Thanks for the PR and I will review the PR soon. What makes it a bit dangerous is that we have to consider backwards compatibility as well (in case someone already uses the current base generator), so not so straightforward to just merge as is. Just in case - perhaps we could define an alternative approach i.e. have another generator getter and mark the current one as deprecated? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #805
This PR fixes the Jubjub curve generator. The linked issue contains a few more details.
Note
Medium Risk
Updates the Jubjub (twisted Edwards over BLS12-381 Fr) base point coordinates; this affects cryptographic correctness and may change derived keys/signatures, but the change is limited to constant parameters.
Overview
Fixes the Jubjub generator by replacing the twisted Edwards base point coordinates for BLS12-381/Fr.
The updated base point is applied consistently in both the generated curve parameters (
ecc/bls12-381/twistededwards/curve.go) and the curve generator config (internal/generator/config/bls12-381.go).Written by Cursor Bugbot for commit 028f330. This will update automatically on new commits. Configure here.