Expand description
A unified Felt for Miden Rust code.
This crate provides a single Felt type that can be used in both:
- On-chain (Wasm +
miden):Feltis backed by a Miden VM felt via compiler intrinsics. - Off-chain (native / non-Miden Wasm):
Feltis backed by Plonky3’s Goldilocks field element.
Re-exports§
pub use word::LexicographicWord;pub use word::Word;pub use word::WordError;
Modules§
Macros§
Structs§
- Binomial
Extension Field - Bounded
Powers - Same as
Powers, but returns a bounded number of powers. - Felt
- A
Feltbacked by Plonky3’s Goldilocks field element. - Felt
From IntError - Powers
- An iterator which returns the powers of a base element
bshifted by currentc:c, c * b, c * b^2, ....
Traits§
- Algebra
- A ring
RimplementsAlgebra<F>if there is an injective homomorphism fromFintoR; in particular onlyF::ZEROmaps toR::ZERO. - Based
Vector Space - A vector space
VoverFwith a fixed basis. Fixing the basis allows elements ofVto be converted to and fromDIMENSIONmany elements ofFwhich are interpreted as basis coefficients. - Binomially
Extendable - Trait for fields that support binomial extension of the form
F[X]/(X^D - W). - Binomially
Extendable Algebra - Trait for algebras which support binomial extensions of the form
A[X]/(X^D - W)withWin the base fieldF. - Extension
Field - A field
EFwhich is also an algebra over a fieldF. - Field
- A field
F. This permits both modular fieldsℤ/palong with their field extensions. - HasTwo
Adic Binomial Extension - Trait for binomial extensions that support a two-adic subgroup generator.
- Injective
Monomial - A ring implements
InjectiveMonomial<N>if the algebraic functionf(x) = x^Nis an injective map on elements of the ring. - Packable
- A trait to constrain types that can be packed into a packed value.
- Permutation
Monomial - A ring implements
PermutationMonomial<N>if the algebraic functionf(x) = x^Nis invertible and thus acts as a permutation on elements of the ring. - Prime
Characteristic Ring - A commutative ring,
R, with prime characteristic,p. - Prime
Field - A field isomorphic to
ℤ/pfor some primep. - Prime
Field64 - A prime field
ℤ/pwith order,p < 2^64. - Quotient
Map - Implementation of the quotient map
ℤ -> ℤ/pwhich sends an integerrto its conjugacy class[r]. - RawData
Serializable - A collection of methods designed to help hash field elements.
- TwoAdic
Field - A field which supplies information like the two-adicity of its multiplicative group, and methods for obtaining two-adic generators.
Functions§
- batch_
multiplicative_ inverse - Batch multiplicative inverses with Montgomery’s trick This is Montgomery’s trick. At a high level, we invert the product of the given field elements, then derive the individual inverses from that via multiplication.