ark-curves-cherry-picked/ed_on_bn254/src/lib.rs
ed_on_bn254/src/lib.rsRaw
1#![cfg_attr(not(feature = "std"), no_std)]
2#![deny(
3 warnings,
4 unused,
5 future_incompatible,
6 nonstandard_style,
7 rust_2018_idioms
8)]
9#![forbid(unsafe_code)]
10
11//! This library implements a twisted Edwards curve whose base field is the
12//! scalar field of the curve BN254. This allows defining cryptographic
13//! 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).
14//!
15//! Curve information:
16//! * Base field: q =
17//! 21888242871839275222246405745257275088548364400416034343698204186575808495617
18//! * Scalar field: r =
19//! 2736030358979909402780800718157159386076813972158567259200215660948447373041
20//! * Valuation(q - 1, 2) = 28
21//! * Valuation(r - 1, 2) = 4
22//! * Curve equation: ax^2 + y^2 =1 + dx^2y^2, where
23//! * a = 1
24//! * d = 168696/168700 mod q =
25//! 9706598848417545097372247223557719406784115219466060233080913168975159366771
26
27#[cfg(feature = "r1cs")]
28pub mod constraints;
29mod curves;
30mod fields;
31
32pub use curves::*;
33pub use fields::*;