pairing_plus::bls12_381

Struct Bls12

Source
pub struct Bls12;

Trait Implementations§

Source§

impl Clone for Bls12

Source§

fn clone(&self) -> Bls12

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Bls12

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Engine for Bls12

Source§

type G1 = G1

The projective representation of an element in G1.
Source§

type G1Affine = G1Affine

The affine representation of an element in G1.
Source§

type G2 = G2

The projective representation of an element in G2.
Source§

type G2Affine = G2Affine

The affine representation of an element in G2.
Source§

type Fq = Fq

The base field that hosts G1.
Source§

type Fqe = Fq2

The extension field that hosts G2.
Source§

type Fqk = Fq12

The extension field that hosts the target group of the pairing.
Source§

fn miller_loop<'a, I>(i: I) -> Self::Fqk
where I: IntoIterator<Item = &'a (&'a <Self::G1Affine as CurveAffine>::Prepared, &'a <Self::G2Affine as CurveAffine>::Prepared)>,

Perform a miller loop with some number of (G1, G2) pairs.
Source§

fn final_exponentiation(r: &Fq12) -> Option<Fq12>

Perform final exponentiation of the result of a miller loop.
Source§

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

Performs a complete pairing operation (p, q).
Source§

fn pairing_product<G1, G2>(p1: G1, q1: G2, p2: G1, q2: G2) -> Self::Fqk
where G1: Into<Self::G1Affine>, G2: Into<Self::G2Affine>,

performs a pairing product operation with a single “final exponentiation”
Source§

fn pairing_multi_product( p: &[Self::G1Affine], q: &[Self::G2Affine], ) -> Self::Fqk

performs a multi-pairing product operation with a single “final exponentiation”
Source§

impl ScalarEngine for Bls12

Source§

type Fr = Fr

This is the scalar field of the engine’s groups.

Auto Trait Implementations§

§

impl Freeze for Bls12

§

impl RefUnwindSafe for Bls12

§

impl Send for Bls12

§

impl Sync for Bls12

§

impl Unpin for Bls12

§

impl UnwindSafe for Bls12

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.