Trait snarkvm_curves::traits::pairing_engine::PairingEngine[][src]

pub trait PairingEngine: Sized + 'static + Copy + Debug + Sync + Send {
    type Fr: PrimeField + SquareRootField + Into<<Self::Fr as PrimeField>::BigInteger>;
    type G1Projective: ProjectiveCurve<BaseField = Self::Fq, ScalarField = Self::Fr, Affine = Self::G1Affine> + From<Self::G1Affine>;
    type G1Affine: AffineCurve<BaseField = Self::Fq, ScalarField = Self::Fr, Projective = Self::G1Projective> + PairingCurve<PairWith = Self::G2Affine, PairingResult = Self::Fqk> + From<Self::G1Projective>;
    type G2Projective: ProjectiveCurve<BaseField = Self::Fqe, ScalarField = Self::Fr, Affine = Self::G2Affine> + From<Self::G2Affine>;
    type G2Affine: AffineCurve<BaseField = Self::Fqe, ScalarField = Self::Fr, Projective = Self::G2Projective> + PairingCurve<PairWith = Self::G1Affine, PairingResult = Self::Fqk> + From<Self::G2Projective>;
    type Fq: PrimeField + SquareRootField;
    type Fqe: SquareRootField;
    type Fqk: Field;
    fn miller_loop<'a, I>(i: I) -> Self::Fqk
    where
        I: Iterator<Item = (&'a <Self::G1Affine as PairingCurve>::Prepared, &'a <Self::G2Affine as PairingCurve>::Prepared)>
;
fn final_exponentiation(_: &Self::Fqk) -> Option<Self::Fqk>; fn product_of_pairings<'a, I>(i: I) -> Self::Fqk
    where
        I: Iterator<Item = (&'a <Self::G1Affine as PairingCurve>::Prepared, &'a <Self::G2Affine as PairingCurve>::Prepared)>
, { ... }
fn pairing<G1, G2>(p: G1, q: G2) -> Self::Fqk
    where
        G1: Into<Self::G1Affine>,
        G2: Into<Self::G2Affine>
, { ... } }

Associated Types

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

The projective representation of an element in G1.

The affine representation of an element in G1.

The projective representation of an element in G2.

The affine representation of an element in G2.

The base field that hosts G1.

The extension field that hosts G2.

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

Required methods

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

Perform final exponentiation of the result of a miller loop.

Provided methods

Computes a product of pairings.

Performs multiple pairing operations

Implementors