Trait ark_ec::models::bn::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 ATE_LOOP_COUNT: &'static [i8];
    const TWIST_TYPE: TwistType;
    const TWIST_MUL_BY_Q_X: Fp2<Self::Fp2Config>;
    const TWIST_MUL_BY_Q_Y: Fp2<Self::Fp2Config>;

    // Provided methods
    fn multi_miller_loop(
        a: impl IntoIterator<Item = impl Into<G1Prepared<Self>>>,
        b: impl IntoIterator<Item = impl Into<G2Prepared<Self>>>
    ) -> MillerLoopOutput<Bn<Self>> { ... }
    fn final_exponentiation(
        f: MillerLoopOutput<Bn<Self>>
    ) -> Option<PairingOutput<Bn<Self>>> { ... }
}

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 Associated Constants§

source

const X: &'static [u64]

The absolute value of the BN curve parameter X (as in q = 36 X^4 + 36 X^3 + 24 X^2 + 6 X + 1).

source

const X_IS_NEGATIVE: bool

Whether or not X is negative.

source

const ATE_LOOP_COUNT: &'static [i8]

The absolute value of 6X + 2.

source

const TWIST_TYPE: TwistType

source

const TWIST_MUL_BY_Q_X: Fp2<Self::Fp2Config>

source

const TWIST_MUL_BY_Q_Y: Fp2<Self::Fp2Config>

Provided Methods§

source

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

source

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

Implementors§