Trait fff::PrimeField [−][src]
pub trait PrimeField: Field { type Repr: PrimeFieldRepr + From<Self>; const NUM_BITS: u32; const CAPACITY: u32; const S: u32; fn from_repr(_: Self::Repr) -> Result<Self, PrimeFieldDecodingError>; fn into_repr(&self) -> Self::Repr; fn char() -> Self::Repr; fn multiplicative_generator() -> Self; fn root_of_unity() -> Self; fn from_random_bytes(bytes: &[u8]) -> Option<Self>; fn from_str(s: &str) -> Option<Self> { ... } }
Expand description
This represents an element of a prime field.
Associated Types
type Repr: PrimeFieldRepr + From<Self>
[src]
type Repr: PrimeFieldRepr + From<Self>
[src]The prime field can be converted back and forth into this biginteger representation.
Associated Constants
Required methods
fn from_repr(_: Self::Repr) -> Result<Self, PrimeFieldDecodingError>
[src]
fn from_repr(_: Self::Repr) -> Result<Self, PrimeFieldDecodingError>
[src]Convert this prime field element into a biginteger representation.
fn into_repr(&self) -> Self::Repr
[src]
fn into_repr(&self) -> Self::Repr
[src]Convert a biginteger representation into a prime field element, if the number is an element of the field.
fn multiplicative_generator() -> Self
[src]
fn multiplicative_generator() -> Self
[src]Returns the multiplicative generator of char()
- 1 order. This element
must also be quadratic nonresidue.
fn root_of_unity() -> Self
[src]
fn root_of_unity() -> Self
[src]Returns the 2^s root of unity computed by exponentiating the multiplicative_generator()
by t.