ark_test_curves

Trait Fp3Config

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

    const NONRESIDUE: Self::Fp;
    const FROBENIUS_COEFF_FP3_C1: &'static [Self::Fp];
    const FROBENIUS_COEFF_FP3_C2: &'static [Self::Fp];
    const TWO_ADICITY: u32;
    const TRACE_MINUS_ONE_DIV_TWO: &'static [u64];
    const QUADRATIC_NONRESIDUE_TO_T: CubicExtField<Fp3ConfigWrapper<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: &'static [Self::Fp]

Source

const FROBENIUS_COEFF_FP3_C2: &'static [Self::Fp]

Source

const TWO_ADICITY: u32

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

Source

const TRACE_MINUS_ONE_DIV_TWO: &'static [u64]

Source

const QUADRATIC_NONRESIDUE_TO_T: CubicExtField<Fp3ConfigWrapper<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", so this trait is not object safe.

Implementors§