pub struct Bn<P>(/* private fields */)
where
P: BnConfig;
Trait Implementations§
Source§impl<P> Pairing for Bn<P>where
P: BnConfig,
impl<P> Pairing for Bn<P>where
P: BnConfig,
Source§type BaseField = <<P as BnConfig>::G1Config as CurveConfig>::BaseField
type BaseField = <<P as BnConfig>::G1Config as CurveConfig>::BaseField
This is the base field of the G1 group and base prime field of G2.
Source§type ScalarField = <<P as BnConfig>::G1Config as CurveConfig>::ScalarField
type ScalarField = <<P as BnConfig>::G1Config as CurveConfig>::ScalarField
This is the scalar field of the G1/G2 groups.
type G1Affine = Affine<<P as BnConfig>::G1Config>
Source§type G1Prepared = G1Prepared<P>
type G1Prepared = G1Prepared<P>
A G1 element that has been preprocessed for use in a pairing.
Source§type G2Affine = Affine<<P as BnConfig>::G2Config>
type G2Affine = Affine<<P as BnConfig>::G2Config>
The affine representation of an element in G2.
Source§type G2Prepared = G2Prepared<P>
type G2Prepared = G2Prepared<P>
A G2 element that has been preprocessed for use in a pairing.
Source§type TargetField = QuadExtField<Fp12ConfigWrapper<<P as BnConfig>::Fp12Config>>
type TargetField = QuadExtField<Fp12ConfigWrapper<<P as BnConfig>::Fp12Config>>
The extension field that hosts the target group of the pairing.
Source§fn multi_miller_loop(
a: impl IntoIterator<Item = impl Into<<Bn<P> as Pairing>::G1Prepared>>,
b: impl IntoIterator<Item = impl Into<<Bn<P> as Pairing>::G2Prepared>>,
) -> MillerLoopOutput<Bn<P>>
fn multi_miller_loop( a: impl IntoIterator<Item = impl Into<<Bn<P> as Pairing>::G1Prepared>>, b: impl IntoIterator<Item = impl Into<<Bn<P> as Pairing>::G2Prepared>>, ) -> MillerLoopOutput<Bn<P>>
Computes the product of Miller loops for some number of (G1, G2) pairs.
Source§fn final_exponentiation(
f: MillerLoopOutput<Bn<P>>,
) -> Option<PairingOutput<Bn<P>>>
fn final_exponentiation( f: MillerLoopOutput<Bn<P>>, ) -> Option<PairingOutput<Bn<P>>>
Performs final exponentiation of the result of a
Self::multi_miller_loop
.Source§fn miller_loop(
a: impl Into<Self::G1Prepared>,
b: impl Into<Self::G2Prepared>,
) -> MillerLoopOutput<Self>
fn miller_loop( a: impl Into<Self::G1Prepared>, b: impl Into<Self::G2Prepared>, ) -> MillerLoopOutput<Self>
Computes the Miller loop over
a
and b
.Source§fn multi_pairing(
a: impl IntoIterator<Item = impl Into<Self::G1Prepared>>,
b: impl IntoIterator<Item = impl Into<Self::G2Prepared>>,
) -> PairingOutput<Self>
fn multi_pairing( a: impl IntoIterator<Item = impl Into<Self::G1Prepared>>, b: impl IntoIterator<Item = impl Into<Self::G2Prepared>>, ) -> PairingOutput<Self>
Computes a “product” of pairings.
Source§fn pairing(
p: impl Into<Self::G1Prepared>,
q: impl Into<Self::G2Prepared>,
) -> PairingOutput<Self>
fn pairing( p: impl Into<Self::G1Prepared>, q: impl Into<Self::G2Prepared>, ) -> PairingOutput<Self>
Performs multiple pairing operations
impl<P> Copy for Bn<P>
impl<P> Eq for Bn<P>
Auto Trait Implementations§
impl<P> Freeze for Bn<P>
impl<P> RefUnwindSafe for Bn<P>
impl<P> Send for Bn<P>
impl<P> Sync for Bn<P>
impl<P> Unpin for Bn<P>
impl<P> UnwindSafe for Bn<P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more