ark_bls12_381/
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 BLS12_381 curve generated by [Sean Bowe](https://electriccoin.co/blog/new-snark-curve/).
12//! The name denotes that it is a Barreto--Lynn--Scott curve of embedding degree
13//! 12, defined over a 381-bit (prime) field.
14//! This curve was intended to replace the BN254 curve to provide a higher
15//! security level without incurring a large performance overhead.
16//!
17//!
18//! Curve information:
19//! * Base field: q = 4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787
20//! * Scalar field: r =
21//!   52435875175126190479447740508185965837690552500527637822603658699938581184513
22//! * valuation(q - 1, 2) = 1
23//! * valuation(r - 1, 2) = 32
24//! * G1 curve equation: y^2 = x^3 + 4
25//! * G2 curve equation: y^2 = x^3 + Fq2(4, 4)
26
27#[cfg(feature = "curve")]
28mod curves;
29mod fields;
30
31#[cfg(feature = "curve")]
32pub use curves::*;
33pub use fields::*;