Trait prio::field::FftFriendlyFieldElement

source ·
pub trait FftFriendlyFieldElement: FieldElementWithInteger {
    // Required methods
    fn generator_order() -> Self::Integer;
    fn generator() -> Self;
    fn root(l: usize) -> Option<Self>;
}
Expand description

Objects with this trait represent an element of GF(p), where p is some prime and the field’s multiplicative group has a subgroup with an order that is a power of 2, and at least 2^20.

Required Methods§

source

fn generator_order() -> Self::Integer

Returns the size of the multiplicative subgroup generated by FftFriendlyFieldElement::generator.

source

fn generator() -> Self

Returns the generator of the multiplicative subgroup of size FftFriendlyFieldElement::generator_order.

source

fn root(l: usize) -> Option<Self>

Returns the 2^l-th principal root of unity for any l <= 20. Note that the 2^0-th prinicpal root of unity is 1 by definition.

Object Safety§

This trait is not object safe.

Implementors§