arnaucube
arnaucube/ark-curves-cherry-pickedPublic Self-hosted repository
ark-curves-cherry-picked/ed_on_mnt4_298/src/lib.rs
ed_on_mnt4_298/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 scalar field of the
12//! curve MNT4-298. This allows defining cryptographic primitives that use elliptic curves over
13//! the scalar field of the latter curve.
14//!
15//! Curve information:
16//! * Base field: q = 475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137
17//! * Scalar field: r = 118980571542315331438337312413262112886281219744507561120271964887686106682370032123932631
18//! * Valuation(q - 1, 2) = 30
19//! * Valuation(r - 1, 2) = 1
20//! * Curve equation: ax^2 + y^2 =1 + dx^2y^2, where
21//!    * a = -1
22//!    * d = 4212 mod q
23
24#[cfg(feature = "r1cs")]
25pub mod constraints;
26mod curves;
27mod fields;
28
29pub use curves::*;
30pub use fields::*;