Skip to main content

BnConfig

Trait BnConfig 

Source
pub trait BnConfig: 'static + Sized {
    type Fp: PrimeField + Into<<Self::Fp as PrimeField>::BigInt>;
    type Fp2Config: Fp2Config<Fp = Self::Fp>;
    type Fp6Config: Fp6Config<Fp2Config = Self::Fp2Config>;
    type Fp12Config: Fp12Config<Fp6Config = Self::Fp6Config>;
    type G1Config: SWCurveConfig<BaseField = Self::Fp>;
    type G2Config: SWCurveConfig<BaseField = Fp2<Self::Fp2Config>, ScalarField = <Self::G1Config as CurveConfig>::ScalarField>;

    const X: &'static [u64];
    const X_IS_NEGATIVE: bool;
    const TWIST_TYPE: TwistType;

    // Required methods
    fn multi_miller_loop(
        a_vec: impl IntoIterator<Item = impl Into<G1Prepared<Self>>>,
        b_vec: impl IntoIterator<Item = impl Into<G2Prepared<Self>>>,
    ) -> MillerLoopOutput<Bn<Self>>;
    fn final_exponentiation(
        f: MillerLoopOutput<Bn<Self>>,
    ) -> Option<PairingOutput<Bn<Self>>>;
}

Required Associated Constants§

Source

const X: &'static [u64]

The absolute value of the BN curve parameter X (as a multiple of six the X used in the paper).

Source

const X_IS_NEGATIVE: bool

Whether or not X is negative.

Source

const TWIST_TYPE: TwistType

What kind of twist is this?

Required Associated Types§

Source

type Fp: PrimeField + Into<<Self::Fp as PrimeField>::BigInt>

Source

type Fp2Config: Fp2Config<Fp = Self::Fp>

Source

type Fp6Config: Fp6Config<Fp2Config = Self::Fp2Config>

Source

type Fp12Config: Fp12Config<Fp6Config = Self::Fp6Config>

Source

type G1Config: SWCurveConfig<BaseField = Self::Fp>

Source

type G2Config: SWCurveConfig<BaseField = Fp2<Self::Fp2Config>, ScalarField = <Self::G1Config as CurveConfig>::ScalarField>

Required Methods§

Source

fn multi_miller_loop( a_vec: impl IntoIterator<Item = impl Into<G1Prepared<Self>>>, b_vec: impl IntoIterator<Item = impl Into<G2Prepared<Self>>>, ) -> MillerLoopOutput<Bn<Self>>

Source

fn final_exponentiation( f: MillerLoopOutput<Bn<Self>>, ) -> Option<PairingOutput<Bn<Self>>>

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§