Trait bellperson::bls::Engine [−][src]
pub trait Engine: ScalarEngine { type G1: CurveProjective + From<Self::G1Affine>; type G1Affine: PairingCurveAffine + From<Self::G1>; type G2: CurveProjective + From<Self::G2Affine>; type G2Affine: PairingCurveAffine + From<Self::G2>; type Fq: PrimeField + SqrtField; type Fqe: SqrtField; type Fqk: Field + Compress; fn miller_loop<'a, I>(i: I) -> Self::Fqk
where
I: IntoIterator<Item = &'a (&'a <Self::G1Affine as PairingCurveAffine>::Prepared, &'a <Self::G2Affine as PairingCurveAffine>::Prepared)>; fn final_exponentiation(&Self::Fqk) -> Option<Self::Fqk>; fn pairing<G1, G2>(p: G1, q: G2) -> Self::Fqk
where
G1: Into<Self::G1Affine>,
G2: Into<Self::G2Affine>, { ... } }
Expand description
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
type G1: CurveProjective + From<Self::G1Affine>
type G1: CurveProjective + From<Self::G1Affine>
The projective representation of an element in G1.
type G1Affine: PairingCurveAffine + From<Self::G1>
type G1Affine: PairingCurveAffine + From<Self::G1>
The affine representation of an element in G1.
type G2: CurveProjective + From<Self::G2Affine>
type G2: CurveProjective + From<Self::G2Affine>
The projective representation of an element in G2.
type G2Affine: PairingCurveAffine + From<Self::G2>
type G2Affine: PairingCurveAffine + From<Self::G2>
The affine representation of an element in G2.
type Fq: PrimeField + SqrtField
type Fq: PrimeField + SqrtField
The base field that hosts G1.
Required methods
fn miller_loop<'a, I>(i: I) -> Self::Fqk where
I: IntoIterator<Item = &'a (&'a <Self::G1Affine as PairingCurveAffine>::Prepared, &'a <Self::G2Affine as PairingCurveAffine>::Prepared)>,
fn miller_loop<'a, I>(i: I) -> Self::Fqk where
I: IntoIterator<Item = &'a (&'a <Self::G1Affine as PairingCurveAffine>::Prepared, &'a <Self::G2Affine as PairingCurveAffine>::Prepared)>,
Perform a miller loop with some number of (G1, G2) pairs.
fn final_exponentiation(&Self::Fqk) -> Option<Self::Fqk>
fn final_exponentiation(&Self::Fqk) -> Option<Self::Fqk>
Perform final exponentiation of the result of a miller loop.