[go: up one dir, main page]

Trait ff::PrimeField [] [src]

pub trait PrimeField: SqrtField {
    type Repr: PrimeFieldRepr;
    fn from_repr(_: Self::Repr) -> Result<Self, ()>;
    fn into_repr(&self) -> Self::Repr;
    fn char() -> Self::Repr;
    fn num_bits() -> usize;
    fn capacity() -> usize;
}

This represents an element of a prime field.

Associated Types

The prime field can be converted back and forth into this biginteger representation.

Required Methods

Convert this prime field element into a biginteger representation.

Convert a biginteger reprensentation into a prime field element, if the number is an element of the field.

Returns the field characteristic; the modulus.

Returns how many bits are needed to represent an element of this field.

Returns how many bits of information can be reliably stored in the field element.

Implementors