#twisted-edwards-curve #elliptic-curve #scalar-field #bn254 #circom #jubjub #baby

no-std taceo-ark-babyjubjub

A Twisted Edwards curve defined over the scalar field of the BN254 curve, compatible with the Baby Jubjub impl in Circom

4 releases

Uses new Rust 2024

0.5.3 Dec 19, 2025
0.5.2 Nov 20, 2025
0.5.1 Nov 20, 2025
0.5.0 Oct 29, 2025

#4 in #twisted-edwards-curve

Download history 705/week @ 2025-11-06 792/week @ 2025-11-13 1321/week @ 2025-11-20 962/week @ 2025-11-27 1754/week @ 2025-12-04 962/week @ 2025-12-11 205/week @ 2025-12-18 193/week @ 2025-12-25 467/week @ 2026-01-01 1869/week @ 2026-01-08 3280/week @ 2026-01-15 4294/week @ 2026-01-22 3893/week @ 2026-01-29 4668/week @ 2026-02-05 3838/week @ 2026-02-12 4974/week @ 2026-02-19

18,205 downloads per month
Used in 17 crates (13 directly)

MIT/Apache

24KB
439 lines

This library implements a twisted Edwards curve whose base field is the scalar field of the curve BN254. This allows defining cryptographic primitives that use elliptic curves over the scalar field of the latter curve. This curve is also known as Baby-Jubjub.

Curve information:

  • Base field: q = 21888242871839275222246405745257275088548364400416034343698204186575808495617
  • Scalar field: r = 2736030358979909402780800718157159386076813972158567259200215660948447373041
  • Valuation(q - 1, 2) = 28
  • Valuation(r - 1, 2) = 4
  • Curve equation: ax^2 + y^2 =1 + dx^2y^2, where
    • a = 168700
    • d = 168696

ark-babyjubjub

This is just a quick fork of ark-ed-on-bn254, because that crate actually does not implement the babyjubjub curve as specified to be compatible with Circom.

The original ark-ed-on-bn254 crate is licensed under Apache 2.0 and/or MIT.

Dependencies

~4.5–6.5MB
~113K SLoC