Trait bellperson::bls::Engine[][src]

pub trait Engine: ScalarEngine {
    type G1: From<Self::G1Affine> + CurveProjective;
    type G1Affine: PairingCurveAffine + From<Self::G1>;
    type G2: From<Self::G2Affine> + CurveProjective;
    type G2Affine: PairingCurveAffine + From<Self::G2>;
    type Fq: SqrtField + PrimeField;
    type Fqe: SqrtField;
    type Fqk: Field;
    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)>
;
pub fn final_exponentiation(&Self::Fqk) -> Option<Self::Fqk>; pub fn pairing<G1, G2>(p: G1, q: G2) -> Self::Fqk
    where
        G1: Into<Self::G1Affine>,
        G2: Into<Self::G2Affine>
, { ... } }

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.

Loading content...

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]

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.

Loading content...

Provided methods

pub fn pairing<G1, G2>(p: G1, q: G2) -> Self::Fqk where
    G1: Into<Self::G1Affine>,
    G2: Into<Self::G2Affine>, 
[src]

Performs a complete pairing operation (p, q).

Loading content...

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

Loading content...