Trait pairing::Engine[][src]

pub trait Engine: Sized + 'static + Clone + Sync + Send + Debug {
    type Fr: PrimeField;
    type G1: PrimeCurve<Scalar = Self::Fr, Affine = Self::G1Affine> + From<Self::G1Affine> + GroupOps<Self::G1Affine> + GroupOpsOwned<Self::G1Affine> + ScalarMul<Self::Fr> + ScalarMulOwned<Self::Fr>;
    type G1Affine: PairingCurveAffine<Scalar = Self::Fr, Curve = Self::G1, Pair = Self::G2Affine, PairingResult = Self::Gt> + From<Self::G1> + Mul<Self::Fr, Output = Self::G1> + for<'a> Mul<&'a Self::Fr, Output = Self::G1>;
    type G2: PrimeCurve<Scalar = Self::Fr, Affine = Self::G2Affine> + From<Self::G2Affine> + GroupOps<Self::G2Affine> + GroupOpsOwned<Self::G2Affine> + ScalarMul<Self::Fr> + ScalarMulOwned<Self::Fr>;
    type G2Affine: PairingCurveAffine<Scalar = Self::Fr, Curve = Self::G2, Pair = Self::G1Affine, PairingResult = Self::Gt> + From<Self::G2> + Mul<Self::Fr, Output = Self::G2> + for<'a> Mul<&'a Self::Fr, Output = Self::G2>;
    type Gt: Group<Scalar = Self::Fr> + ScalarMul<Self::Fr> + ScalarMulOwned<Self::Fr>;
    fn pairing(p: &Self::G1Affine, q: &Self::G2Affine) -> Self::Gt;
}
Expand description

An “engine” is a collection of types (fields, elliptic curve groups, etc.) with well-defined relationships. In particular, the G1/G2 curve groups are of prime order r, and are equipped with a bilinear pairing function.

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