Trait snarkvm_models::curves::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;
#[must_use]    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)>
;
#[must_use] fn final_exponentiation(_: &Self::Fqk) -> Option<Self::Fqk>; #[must_use] 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)>
, { ... }
#[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 + Into<<Self::Fr as PrimeField>::BigInteger>[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>[src]

The projective representation of an element in G1.

type G1Affine: AffineCurve<BaseField = Self::Fq, ScalarField = Self::Fr, Projective = Self::G1Projective> + PairingCurve<PairWith = Self::G2Affine, PairingResult = Self::Fqk> + From<Self::G1Projective>[src]

The affine representation of an element in G1.

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

The projective representation of an element in G2.

type G2Affine: AffineCurve<BaseField = Self::Fqe, ScalarField = Self::Fr, Projective = Self::G2Projective> + PairingCurve<PairWith = Self::G1Affine, PairingResult = Self::Fqk> + From<Self::G2Projective>[src]

The affine representation of an element in G2.

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: Iterator<Item = (&'a <Self::G1Affine as PairingCurve>::Prepared, &'a <Self::G2Affine as PairingCurve>::Prepared)>, 
[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: Iterator<Item = (&'a <Self::G1Affine as PairingCurve>::Prepared, &'a <Self::G2Affine as PairingCurve>::Prepared)>, 
[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

Loading content...