Trait paired::Engine [−][src]
pub trait Engine: ScalarEngine { type G1: CurveProjective<Engine = Self, Base = Self::Fq, Scalar = Self::Fr, Affine = Self::G1Affine> + From<Self::G1Affine>; type G1Affine: PairingCurveAffine<Engine = Self, Base = Self::Fq, Scalar = Self::Fr, Projective = Self::G1, Pair = Self::G2Affine, PairingResult = Self::Fqk> + From<Self::G1>; type G2: CurveProjective<Engine = Self, Base = Self::Fqe, Scalar = Self::Fr, Affine = Self::G2Affine> + From<Self::G2Affine>; type G2Affine: PairingCurveAffine<Engine = Self, Base = Self::Fqe, Scalar = Self::Fr, Projective = Self::G2, Pair = Self::G1Affine, PairingResult = Self::Fqk> + 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
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
type G1: CurveProjective<Engine = Self, Base = Self::Fq, Scalar = Self::Fr, Affine = Self::G1Affine> + From<Self::G1Affine>
[src]
type G1: CurveProjective<Engine = Self, Base = Self::Fq, Scalar = Self::Fr, Affine = Self::G1Affine> + From<Self::G1Affine>
[src]The projective representation of an element in G1.
type G1Affine: PairingCurveAffine<Engine = Self, Base = Self::Fq, Scalar = Self::Fr, Projective = Self::G1, Pair = Self::G2Affine, PairingResult = Self::Fqk> + From<Self::G1>
[src]
type G1Affine: PairingCurveAffine<Engine = Self, Base = Self::Fq, Scalar = Self::Fr, Projective = Self::G1, Pair = Self::G2Affine, PairingResult = Self::Fqk> + From<Self::G1>
[src]The affine representation of an element in G1.
type G2: CurveProjective<Engine = Self, Base = Self::Fqe, Scalar = Self::Fr, Affine = Self::G2Affine> + From<Self::G2Affine>
[src]
type G2: CurveProjective<Engine = Self, Base = Self::Fqe, Scalar = Self::Fr, Affine = Self::G2Affine> + From<Self::G2Affine>
[src]The projective representation of an element in G2.
type G2Affine: PairingCurveAffine<Engine = Self, Base = Self::Fqe, Scalar = Self::Fr, Projective = Self::G2, Pair = Self::G1Affine, PairingResult = Self::Fqk> + From<Self::G2>
[src]
type G2Affine: PairingCurveAffine<Engine = Self, Base = Self::Fqe, Scalar = Self::Fr, Projective = Self::G2, Pair = Self::G1Affine, PairingResult = Self::Fqk> + From<Self::G2>
[src]The affine representation of an element in G2.
type Fq: PrimeField + SqrtField
[src]
type Fq: PrimeField + SqrtField
[src]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)>,
[src]
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)>,
[src]Perform a miller loop with some number of (G1, G2) pairs.
fn final_exponentiation(_: &Self::Fqk) -> Option<Self::Fqk>
[src]
fn final_exponentiation(_: &Self::Fqk) -> Option<Self::Fqk>
[src]Perform final exponentiation of the result of a miller loop.
Provided methods
Implementors
impl Engine for Bls12
[src]
impl Engine for Bls12
[src]type G1 = G1
type G1Affine = G1Affine
type G2 = G2
type G2Affine = G2Affine
type Fq = Fq
type Fqe = Fq2
type Fqk = Fq12
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)>,
[src]
I: IntoIterator<Item = &'a (&'a <Self::G1Affine as PairingCurveAffine>::Prepared, &'a <Self::G2Affine as PairingCurveAffine>::Prepared)>,