ark_starkcurve/lib.rs
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 [the Stark curve](https://docs.starknet.io/architecture/cryptography/#the_stark_curve)
12//! An elliptic curve defined over the STARK field by equation y² ≡ x³ + α·x + β (mod q)
13//!
14//! Where:
15//! * α = 1
16//! * β = 3141592653589793238462643383279502884197169399375105820974944592307816406665
17//! * q = 3618502788666131213697322783095070105623107215331596699973092056135872020481
18//! * or, q = 2^251 + 17 * 2^192 + 1
19//!
20//! Generator point:
21//! * x = 0x1ef15c18599971b7beced415a40f0c7deacfd9b0d1819e03d723d8bc943cfca
22//! * y = 0x5668060aa49730b7be4801df46ec62de53ecd11abe43a32873000c36e8dc1f
23//!
24//! Curve information:
25//! StarkCurve:
26//! * Base field: q =
27//! 3618502788666131213697322783095070105623107215331596699973092056135872020481
28//! * Scalar field: r =
29//! 3618502788666131213697322783095070105526743751716087489154079457884512865583
30//! * Curve equation: y^2 = x^3 + x + β (mod q)
31
32#[cfg(feature = "r1cs")]
33pub mod constraints;
34mod curves;
35mod fields;
36
37pub use curves::*;
38pub use fields::*;