Skip to main content

Fp3Config

Trait Fp3Config 

Source
pub trait Fp3Config:
    'static
    + Send
    + Sync
    + Sized {
    type Fp: PrimeField;

    const NONRESIDUE: Self::Fp;
    const FROBENIUS_COEFF_FP3_C1: &[Self::Fp];
    const FROBENIUS_COEFF_FP3_C2: &[Self::Fp];
    const TWO_ADICITY: u32;
    const TRACE_MINUS_ONE_DIV_TWO: &[u64];
    const QUADRATIC_NONRESIDUE_TO_T: Fp3<Self>;

    // Provided method
    fn mul_fp_by_nonresidue_in_place(fe: &mut Self::Fp) -> &mut Self::Fp { ... }
}
Expand description

Trait that specifies constants and methods for defining degree-three extension fields.

Required Associated Constants§

Source

const NONRESIDUE: Self::Fp

Cubic non-residue in Self::Fp used to construct the extension field. That is, NONRESIDUE is such that the cubic polynomial f(X) = X^3 - Self::NONRESIDUE in Fp[X] is irreducible in Self::Fp.

Source

const FROBENIUS_COEFF_FP3_C1: &[Self::Fp]

Source

const FROBENIUS_COEFF_FP3_C2: &[Self::Fp]

Source

const TWO_ADICITY: u32

p^3 - 1 = 2^s * t, where t is odd.

Source

const TRACE_MINUS_ONE_DIV_TWO: &[u64]

Source

const QUADRATIC_NONRESIDUE_TO_T: Fp3<Self>

t-th power of a quadratic nonresidue in Fp3.

Required Associated Types§

Source

type Fp: PrimeField

Base prime field underlying this extension.

Provided Methods§

Source

fn mul_fp_by_nonresidue_in_place(fe: &mut Self::Fp) -> &mut Self::Fp

Return fe * Self::NONRESIDUE. The default implementation can be specialized if Self::NONRESIDUE has a special structure that can speed up multiplication

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§