decaf377/
fields.rs

1//! Auto-generated, formally-verified field arithmetic implementations, together
2//! with wrapper types that make the generated code actually usable.
3//!
4//! ## Code Structure
5//!
6//! We have two backends (`u32` and `u64`) and three fields (`Fp`, `Fq`, and
7//! `Fr`), giving six implementations total. This code is organized into submodules:
8//! ```ascii,no_run
9//! fields::{u32, u64}::{fp, fq, fr}::{
10//!     fiat, // generated code goes here
11//!     wrapper, // wrapper types Fp,Fq,Fr, putting a Rust API on the generated code
12//!     arkworks, // impls of arkworks traits for the wrapper types
13//! }
14//! ```
15//! The Fp is a 48-byte field element, while Fq and Fr are 32-byte field elements.
16//! The wrapper code is all copy-pasted and should be kept in sync after any edits.
17//! The different backends should have identical external interfaces, so they can be
18//! used with a cfg-able type alias.
19
20pub mod fp;
21pub mod fq;
22pub mod fr;