pub trait Engine: Sized + 'static + Clone {
    type Scalar: FieldExt;
    type G1: PrimeCurve<Scalar = Self::Scalar, Affine = Self::G1Affine> + From<Self::G1Affine> + GroupOps<Self::G1Affine> + GroupOpsOwned<Self::G1Affine> + ScalarMul<Self::Scalar> + ScalarMulOwned<Self::Scalar> + _Group<Scalar = Self::Scalar>;
    type G1Affine: PairingCurveAffine<ScalarExt = Self::Scalar, CurveExt = Self::G1, Pair = Self::G2Affine, PairingResult = Self::Gt> + From<Self::G1> + Mul<Self::Scalar, Output = Self::G1> + for<'a> Mul<&'a Self::Scalar, Output = Self::G1>;
    type G2: PrimeCurve<Scalar = Self::Scalar, Affine = Self::G2Affine> + From<Self::G2Affine> + GroupOps<Self::G2Affine> + GroupOpsOwned<Self::G2Affine> + ScalarMul<Self::Scalar> + ScalarMulOwned<Self::Scalar>;
    type G2Affine: PairingCurveAffine<ScalarExt = Self::Scalar, CurveExt = Self::G2, Pair = Self::G1Affine, PairingResult = Self::Gt> + From<Self::G2> + Mul<Self::Scalar, Output = Self::G2> + for<'a> Mul<&'a Self::Scalar, Output = Self::G2>;
    type Gt: Group<Scalar = Self::Scalar> + ScalarMul<Self::Scalar> + ScalarMulOwned<Self::Scalar>;

    fn pairing(p: &Self::G1Affine, q: &Self::G2Affine) -> Self::Gt;
}

Required Associated Types

This is the scalar field of the engine’s 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 extension field that hosts the target group of the pairing.

Required Methods

Invoke the pairing function G1 x G2 -> Gt without the use of precomputation and other optimizations.

Implementors