Expand description
A framework for finite fields.
Modules§
Structs§
- Field
Array - Powers
- An iterator which returns the powers of a base element
b
shifted by currentc
:c, c * b, c * b^2, ...
.
Traits§
- Extension
Field - Field
- An element of a finite field.
- Field
Algebra - A commutative algebra over a finite field.
- Field
Extension Algebra - A commutative algebra over an extension field.
- Packable
- A trait to constrain types that can be packed into a packed value.
- Packed
Field - Safety
- Packed
Field Pow2 - Safety
- Packed
Value - Safety
- Prime
Field - Prime
Field32 - A prime field of order less than
2^32
. - Prime
Field64 - A prime field of order less than
2^64
. - TwoAdic
Field - A field which supplies information like the two-adicity of its multiplicative group, and methods for obtaining two-adic generators.
Functions§
- add_
scaled_ slice_ in_ place x += y * s
, wheres
is a scalar.- add_
vecs - 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.
- binomial_
expand - Expand a product of binomials (x - roots[0])(x - roots[1]).. into polynomial coefficients.
- cyclic_
subgroup_ coset_ known_ order - Computes a coset of a multiplicative subgroup whose order is known in advance.
- cyclic_
subgroup_ known_ order - Computes a multiplicative subgroup whose order is known in advance.
- dot_
product - Maximally generic dot product.
- eval_
poly - exp_
1420470955 - exp_
1717986917 - exp_
1725656503 - exp_
10540996611094048183 - exp_
u64_ by_ squaring - field_
to_ array - Extend a field
FA
elementx
to an array of lengthD
by filling zeros. - halve_
u32 - Given an element x from a 32 bit field F_P compute x/2.
- halve_
u64 - Given an element x from a 64 bit field F_P compute x/2.
- naive_
poly_ mul - Naive polynomial multiplication.
- reduce_
32 - Given a slice of SF elements, reduce them to a TF element using a 2^32-base decomposition.
- scale_
slice_ in_ place - scale_
vec - split_
32 - Given an SF element, split it to a vector of TF elements using a 2^64-base decomposition.
- sum_
vecs - two_
adic_ coset_ zerofier - Computes
Z_{sH}(x)
, whereZ_{sH}
is the zerofier of the given coset of a multiplicative subgroup of order2^log_n
. - two_
adic_ subgroup_ zerofier - Computes
Z_H(x)
, whereZ_H
is the zerofier of a multiplicative subgroup of order2^log_n
.