Expand description
§field-cat
Finite field algebra for the *-cat proof-system ecosystem.
field-cat owns the Field trait, the FieldBytes
transcript-serialization trait, and a small library of concrete
prime fields used by downstream proof-system crates
(plonkish_cat,
proof_cat, and
stark-cat).
Lifting Field out of plonkish-cat lets STARK-flavored
downstreams depend only on the algebra they need, without
inheriting the PLONKish constraint vocabulary
(ConstraintSet, Expression, Wire, CopyConstraint).
§Fields
F101: toy field with modulus101, useful for tests and small inspectable examples.BabyBear: Mersenne prime field with modulus2^31 - 1, used by Plonky3 and SP1.BFieldElement: Goldilocks prime field with modulus2^64 - 2^32 + 1, used by Triton VM, Risc0, and Plonky3 in its wider-field modes.
§Adding a field
Define a newtype, implement the std::ops arithmetic traits
(Add, Sub, Mul, Neg), implement Field (zero,
one, inv), and implement FieldBytes if the element
will be absorbed into a Fiat-Shamir transcript.
Re-exports§
pub use baby_bear::BabyBear;pub use bfield::BFieldElement;pub use bytes::FieldBytes;pub use error::Error;pub use f101::F101;pub use field::Field;
Modules§
- baby_
bear - The
BabyBearprime field: integers modulop = 2^31 - 1. - bfield
- The
BFieldElementprime field: integers modulop = 2^64 - 2^32 + 1(the Goldilocks prime). - bytes
- Byte serialization for field elements.
- error
- Project-wide error type.
- f101
- The
F101toy field: integers modulo101. - field
- The
Fieldtrait: minimal algebraic interface for a finite field.