Trait ark_ec::PairingEngine[][src]

pub trait PairingEngine: Sized + 'static + Copy + Debug + Sync + Send + Eq + PartialEq {
    type Fr: PrimeField + SquareRootField;
    type G1Projective: ProjectiveCurve<BaseField = Self::Fq, ScalarField = Self::Fr, Affine = Self::G1Affine> + From<Self::G1Affine> + Into<Self::G1Affine> + MulAssign<Self::Fr>;
    type G1Affine: AffineCurve<BaseField = Self::Fq, ScalarField = Self::Fr, Projective = Self::G1Projective> + From<Self::G1Projective> + Into<Self::G1Projective> + Into<Self::G1Prepared>;
    type G1Prepared: ToBytes + Default + Clone + Send + Sync + Debug + From<Self::G1Affine>;
    type G2Projective: ProjectiveCurve<BaseField = Self::Fqe, ScalarField = Self::Fr, Affine = Self::G2Affine> + From<Self::G2Affine> + Into<Self::G2Affine> + MulAssign<Self::Fr>;
    type G2Affine: AffineCurve<BaseField = Self::Fqe, ScalarField = Self::Fr, Projective = Self::G2Projective> + From<Self::G2Projective> + Into<Self::G2Projective> + Into<Self::G2Prepared>;
    type G2Prepared: ToBytes + Default + Clone + Send + Sync + Debug + From<Self::G2Affine>;
    type Fq: PrimeField + SquareRootField;
    type Fqe: SquareRootField;
    type Fqk: Field;
#[must_use]    fn miller_loop<'a, I>(i: I) -> Self::Fqk
    where
        I: IntoIterator<Item = &'a (Self::G1Prepared, Self::G2Prepared)>
;
#[must_use] fn final_exponentiation(_: &Self::Fqk) -> Option<Self::Fqk>; #[must_use] fn product_of_pairings<'a, I>(i: I) -> Self::Fqk
    where
        I: IntoIterator<Item = &'a (Self::G1Prepared, Self::G2Prepared)>
, { ... }
#[must_use] fn pairing<G1, G2>(p: G1, q: G2) -> Self::Fqk
    where
        G1: Into<Self::G1Affine>,
        G2: Into<Self::G2Affine>
, { ... } }

Associated Types

type Fr: PrimeField + SquareRootField[src]

This is the scalar field of the G1/G2 groups.

type G1Projective: ProjectiveCurve<BaseField = Self::Fq, ScalarField = Self::Fr, Affine = Self::G1Affine> + From<Self::G1Affine> + Into<Self::G1Affine> + MulAssign<Self::Fr>[src]

The projective representation of an element in G1.

type G1Affine: AffineCurve<BaseField = Self::Fq, ScalarField = Self::Fr, Projective = Self::G1Projective> + From<Self::G1Projective> + Into<Self::G1Projective> + Into<Self::G1Prepared>[src]

The affine representation of an element in G1.

type G1Prepared: ToBytes + Default + Clone + Send + Sync + Debug + From<Self::G1Affine>[src]

A G1 element that has been preprocessed for use in a pairing.

type G2Projective: ProjectiveCurve<BaseField = Self::Fqe, ScalarField = Self::Fr, Affine = Self::G2Affine> + From<Self::G2Affine> + Into<Self::G2Affine> + MulAssign<Self::Fr>[src]

The projective representation of an element in G2.

type G2Affine: AffineCurve<BaseField = Self::Fqe, ScalarField = Self::Fr, Projective = Self::G2Projective> + From<Self::G2Projective> + Into<Self::G2Projective> + Into<Self::G2Prepared>[src]

The affine representation of an element in G2.

type G2Prepared: ToBytes + Default + Clone + Send + Sync + Debug + From<Self::G2Affine>[src]

A G2 element that has been preprocessed for use in a pairing.

type Fq: PrimeField + SquareRootField[src]

The base field that hosts G1.

type Fqe: SquareRootField[src]

The extension field that hosts G2.

type Fqk: Field[src]

The extension field that hosts the target group of the pairing.

Loading content...

Required methods

#[must_use]fn miller_loop<'a, I>(i: I) -> Self::Fqk where
    I: IntoIterator<Item = &'a (Self::G1Prepared, Self::G2Prepared)>, 
[src]

Perform a miller loop with some number of (G1, G2) pairs.

#[must_use]fn final_exponentiation(_: &Self::Fqk) -> Option<Self::Fqk>[src]

Perform final exponentiation of the result of a miller loop.

Loading content...

Provided methods

#[must_use]fn product_of_pairings<'a, I>(i: I) -> Self::Fqk where
    I: IntoIterator<Item = &'a (Self::G1Prepared, Self::G2Prepared)>, 
[src]

Computes a product of pairings.

#[must_use]fn pairing<G1, G2>(p: G1, q: G2) -> Self::Fqk where
    G1: Into<Self::G1Affine>,
    G2: Into<Self::G2Affine>, 
[src]

Performs multiple pairing operations

Loading content...

Implementors

impl<P: Bls12Parameters> PairingEngine for Bls12<P>[src]

type Fr = <P::G1Parameters as ModelParameters>::ScalarField

type G1Projective = G1Projective<P>

type G1Affine = G1Affine<P>

type G1Prepared = G1Prepared<P>

type G2Projective = G2Projective<P>

type G2Affine = G2Affine<P>

type G2Prepared = G2Prepared<P>

type Fq = P::Fp

type Fqe = Fp2<P::Fp2Params>

type Fqk = Fp12<P::Fp12Params>

impl<P: BnParameters> PairingEngine for Bn<P>[src]

type Fr = <P::G1Parameters as ModelParameters>::ScalarField

type G1Projective = G1Projective<P>

type G1Affine = G1Affine<P>

type G1Prepared = G1Prepared<P>

type G2Projective = G2Projective<P>

type G2Affine = G2Affine<P>

type G2Prepared = G2Prepared<P>

type Fq = P::Fp

type Fqe = Fp2<P::Fp2Params>

type Fqk = Fp12<P::Fp12Params>

impl<P: BW6Parameters> PairingEngine for BW6<P>[src]

type Fr = <P::G1Parameters as ModelParameters>::ScalarField

type G1Projective = G1Projective<P>

type G1Affine = G1Affine<P>

type G1Prepared = G1Prepared<P>

type G2Projective = G2Projective<P>

type G2Affine = G2Affine<P>

type G2Prepared = G2Prepared<P>

type Fq = P::Fp

type Fqe = P::Fp

type Fqk = Fp6<P::Fp6Params>

impl<P: MNT4Parameters> PairingEngine for MNT4<P>[src]

type Fr = <P::G1Parameters as ModelParameters>::ScalarField

type G1Projective = G1Projective<P>

type G1Affine = G1Affine<P>

type G1Prepared = G1Prepared<P>

type G2Projective = G2Projective<P>

type G2Affine = G2Affine<P>

type G2Prepared = G2Prepared<P>

type Fq = P::Fp

type Fqe = Fp2<P::Fp2Params>

type Fqk = Fp4<P::Fp4Params>

impl<P: MNT6Parameters> PairingEngine for MNT6<P>[src]

type Fr = <P::G1Parameters as ModelParameters>::ScalarField

type G1Projective = G1Projective<P>

type G1Affine = G1Affine<P>

type G1Prepared = G1Prepared<P>

type G2Projective = G2Projective<P>

type G2Affine = G2Affine<P>

type G2Prepared = G2Prepared<P>

type Fq = P::Fp

type Fqe = Fp3<P::Fp3Params>

type Fqk = Fp6<P::Fp6Params>

Loading content...