Skip to content

fix(eddsa): generate bandersnatch/eddsa on Bandersnatch instead of Ju… - #882

Merged
ivokub merged 1 commit into
Consensys-Incorporated:masterfrom
ZKNoxHQ:fix/bandersnatch-eddsa-curve
Sep 13, 2026
Merged

ivokub merged 1 commit into
Consensys-Incorporated:masterfrom
ZKNoxHQ:fix/bandersnatch-eddsa-curve

Conversation

@rdubois-crypto

@rdubois-crypto rdubois-crypto commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #881


Note

High Risk
Corrects which curve EdDSA uses for Bandersnatch, changing keys and signatures relative to the previous buggy output—security-critical for any consumer of this package.

Overview
Fixes #881: generated ecc/bls12-381/bandersnatch/eddsa was wired to Jubjub (twistededwards) instead of Bandersnatch, so keys and signatures were not on the intended curve.

The EdDSA code generator now keeps conf.Package as the curve name (twistededwards or bandersnatch) for template imports, still emits the eddsa Go package under each curve directory, and templates import ecc/{{.Name}}/{{.Package}} (with a twistededwards alias when the package is bandersnatch). Regenerated Bandersnatch EdDSA sources and docs reflect Bandersnatch.

Adds hand-written TestBandersnatchKAT with fixed public key, coordinates, signature, on-curve check, and verify—locking behavior to Bandersnatch and documenting the old Jubjub public key for the same seed.

Reviewed by Cursor Bugbot for commit 52703b2. Bugbot is set up for automated code reviews on this repo. Configure here.

@ivokub
ivokub merged commit 1d8983d into Consensys-Incorporated:master Sep 13, 2026
14 of 15 checks passed
@ivokub

ivokub commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR!

@rdubois-crypto

Copy link
Copy Markdown
Contributor Author

Np,

It also requires the mirror one
Consensys-Incorporated/gnark#1818

in gnark to be merged as well.

rdubois-crypto added a commit to ZKNoxHQ/gnark that referenced this pull request Sep 14, 2026
…ch EdDSA test

Depends on Consensys-Incorporated/gnark-crypto#882

Signed-off-by: Reno <renaud.dubois.fr@gmail.com>
rdubois-crypto added a commit to ZKNoxHQ/gnark that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ecc/bls12-381/bandersnatch/eddsa signs on Jubjub, not on Bandersnatch

2 participants