Expand description
A framework for finite fields.
Modules§
Structs§
- like
Powers
, but packed intoPackedField
elements - An iterator over the powers of a certain base element
b
:b^0, b^1, b^2, ...
.
Traits§
- A generalization of
Field
which permits things like - An element of a finite field.
- A trait to constrain types that can be packed into a packed value.
- Safety
- Safety
- Safety
- A prime field of order less than
2^32
. - A prime field of order less than
2^64
. - A field which supplies information like the two-adicity of its multiplicative group, and methods for obtaining two-adic generators.
Functions§
x += y * s
, wheres
is a scalar.- 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.
- Expand a product of binomials (x - roots[0])(x - roots[1]).. into polynomial coefficients.
- Computes a coset of a multiplicative subgroup whose order is known in advance.
- Computes a multiplicative subgroup whose order is known in advance.
- Maximally generic dot product.
- Extend a field
AF
elementx
to an array of lengthD
by filling zeros. - Given an element x from a 32 bit field F_P compute x/2.
- Given an element x from a 64 bit field F_P compute x/2.
- Naive polynomial multiplication.
- Given a slice of SF elements, reduce them to a TF element using a 2^32-base decomposition.
- Given an SF element, split it to a vector of TF elements using a 2^64-base decomposition.
- Computes
Z_{sH}(x)
, whereZ_{sH}
is the zerofier of the given coset of a multiplicative subgroup of order2^log_n
. - Computes
Z_H(x)
, whereZ_H
is the zerofier of a multiplicative subgroup of order2^log_n
.