Add ERC-2494 compliant Baby Jubjub curve (continues #926) - #1123
Open
luksgrin wants to merge 9 commits into
Open
Add ERC-2494 compliant Baby Jubjub curve (continues #926)#1123luksgrin wants to merge 9 commits into
luksgrin wants to merge 9 commits into
Conversation
The `MontConfig` derive now emits a `cfg(feature = "asm")` gate; without the feature declared, `#![deny(warnings)]` turns the unexpected-cfg lint into a hard error. Mirror the `asm` feature from `ark-ed-on-bn254`.
Pin the implementation to the concrete worked examples from EIP-2494 (https://eips.ethereum.org/EIPS/eip-2494): point addition, point doubling, curve membership, the base point being 8*G, and the base point having order l. Complements the generated property-based `test_group!` tests.
…s README Addresses review feedback on arkworks-rs#926: link the new crate from the curves README and explain that ark-ed-on-bn254 and ark-babyjubjub are two representations of the same curve (arkworks-normalized a=1 form vs. the exact ERC-2494 parameters and base point).
luksgrin
requested review from
WizardOfMenlo,
weikengchen and
z-tech
and removed request for
a team
July 9, 2026 08:37
Author
luksgrin
added a commit
to luksgrin/pedersen-py
that referenced
this pull request
Jul 9, 2026
Core library + PyO3 binding members. ark-babyjubjub is pinned to the arkworks-rs/algebra#1123 commit (ERC-2494 Baby Jubjub) until it is published, with a [patch.crates-io] block unifying the arkworks graph on that revision.
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
This PR adds a Circom-compatible Baby Jubjub Twisted Edwards curve (
ark-babyjubjub) as specified in ERC-2494, and carries a stalled-but-accepted contribution across the finish line.Lineage / credit (authorship preserved in the commit history):
arkworks-rs/curvesrepo (seearkworks-rs/curves#177 for the design discussion).
arkworks-rs/algebraby @vasemkin in Add ERC-2494 compliant BabyJubJub #926 (their commits are included here unchanged).This PR supersedes #926: it rebases @vasemkin's work onto current
masterand resolves the three items @Pratyush requested:ark-babyjubjubis now listed incurves/README.md, with an explanation of how it differs fromark-ed-on-bn254: they are two representations of the same curve, related by an isomorphism, butark-ed-on-bn254uses the arkworks-normalizeda = 1form and its own generator, whereasark-babyjubjubuses the exact ERC-2494 parameters (A = 168700,D = 168696) and standard base point (circom/iden3compatible).l), complementing the generatedtest_group!tests.asmfeature (mirroringark-ed-on-bn254) so the crate builds on currentmaster, where theMontConfigderive now emits acfg(feature = "asm")gate that otherwise trips#![deny(warnings)].cargo test -p ark-babyjubjub --all-featurespasses (61 tests).Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why.
Pendingsection inCHANGELOG.md(entry currently links to Add ERC-2494 compliant BabyJubJub #926; can be updated to this PR's number)Files changedin the GitHub PR explorer