Skip to main content

ark_ed_on_bn254_ext/
lib.rs

1//! This library implements a twisted Edwards curve whose base field is the
2//! scalar field of the curve BN254. This allows defining cryptographic
3//! primitives that use elliptic curves over the scalar field of the latter curve. This curve is also known as [Baby-Jubjub](https://github.com/barryWhiteHat/baby_jubjub).
4//!
5//! Curve information:
6//! * Base field: q =
7//!   21888242871839275222246405745257275088548364400416034343698204186575808495617
8//! * Scalar field: r =
9//!   2736030358979909402780800718157159386076813972158567259200215660948447373041
10//! * Valuation(q - 1, 2) = 28
11//! * Valuation(r - 1, 2) = 4
12//! * Curve equation: ax^2 + y^2 =1 + dx^2y^2, where
13//!    * a = 1
14//!    * d = 168696/168700 mod q =
15//!      9706598848417545097372247223557719406784115219466060233080913168975159366771
16
17#![cfg_attr(not(feature = "std"), no_std)]
18
19pub mod curves;
20
21pub use ark_ed_on_bn254::{fq, fq::*, fr, fr::*};
22pub use curves::*;
23
24#[cfg(feature = "r1cs")]
25pub use ark_ed_on_bn254::constraints;