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