pub struct PairingVar<P: MNT4Config>(/* private fields */);
Expand description
Specifies the constraints for computing a pairing in a MNT4 bilinear group.
Trait Implementations§
Source§impl<P: MNT4Config> PairingVar<MNT4<P>> for PairingVar<P>
impl<P: MNT4Config> PairingVar<MNT4<P>> for PairingVar<P>
Source§type G1Var = ProjectiveVar<<P as MNT4Config>::G1Config, FpVar<<P as MNT4Config>::Fp>>
type G1Var = ProjectiveVar<<P as MNT4Config>::G1Config, FpVar<<P as MNT4Config>::Fp>>
An variable representing an element of
G1
.
This is the R1CS equivalent of E::G1Projective
.Source§type G2Var = ProjectiveVar<<P as MNT4Config>::G2Config, QuadExtVar<FpVar<<<P as MNT4Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as MNT4Config>::Fp2Config>>>
type G2Var = ProjectiveVar<<P as MNT4Config>::G2Config, QuadExtVar<FpVar<<<P as MNT4Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as MNT4Config>::Fp2Config>>>
An variable representing an element of
G2
.
This is the R1CS equivalent of E::G2Projective
.Source§type G1PreparedVar = G1PreparedVar<P>
type G1PreparedVar = G1PreparedVar<P>
An variable representing cached precomputation that can speed up
pairings computations. This is the R1CS equivalent of
E::G1Prepared
.Source§type G2PreparedVar = G2PreparedVar<P>
type G2PreparedVar = G2PreparedVar<P>
An variable representing cached precomputation that can speed up
pairings computations. This is the R1CS equivalent of
E::G2Prepared
.Source§type GTVar = QuadExtVar<QuadExtVar<FpVar<<<<P as MNT4Config>::Fp4Config as Fp4Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<<P as MNT4Config>::Fp4Config as Fp4Config>::Fp2Config>>, Fp4ConfigWrapper<<P as MNT4Config>::Fp4Config>>
type GTVar = QuadExtVar<QuadExtVar<FpVar<<<<P as MNT4Config>::Fp4Config as Fp4Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<<P as MNT4Config>::Fp4Config as Fp4Config>::Fp2Config>>, Fp4ConfigWrapper<<P as MNT4Config>::Fp4Config>>
An variable representing an element of
GT
.
This is the R1CS equivalent of E::GT
.Source§fn miller_loop(
ps: &[Self::G1PreparedVar],
qs: &[Self::G2PreparedVar],
) -> Result<Self::GTVar, SynthesisError>
fn miller_loop( ps: &[Self::G1PreparedVar], qs: &[Self::G2PreparedVar], ) -> Result<Self::GTVar, SynthesisError>
Computes a multi-miller loop between elements
of
p
and q
.Source§fn final_exponentiation(r: &Self::GTVar) -> Result<Self::GTVar, SynthesisError>
fn final_exponentiation(r: &Self::GTVar) -> Result<Self::GTVar, SynthesisError>
Computes a final exponentiation over
p
.Source§fn prepare_g1(p: &Self::G1Var) -> Result<Self::G1PreparedVar, SynthesisError>
fn prepare_g1(p: &Self::G1Var) -> Result<Self::G1PreparedVar, SynthesisError>
Performs the precomputation to generate
Self::G1PreparedVar
.Source§fn prepare_g2(q: &Self::G2Var) -> Result<Self::G2PreparedVar, SynthesisError>
fn prepare_g2(q: &Self::G2Var) -> Result<Self::G2PreparedVar, SynthesisError>
Performs the precomputation to generate
Self::G2PreparedVar
.Source§fn pairing(
p: Self::G1PreparedVar,
q: Self::G2PreparedVar,
) -> Result<Self::GTVar, SynthesisError>
fn pairing( p: Self::G1PreparedVar, q: Self::G2PreparedVar, ) -> Result<Self::GTVar, SynthesisError>
Computes a pairing over
p
and q
.Source§fn product_of_pairings(
p: &[Self::G1PreparedVar],
q: &[Self::G2PreparedVar],
) -> Result<Self::GTVar, SynthesisError>
fn product_of_pairings( p: &[Self::G1PreparedVar], q: &[Self::G2PreparedVar], ) -> Result<Self::GTVar, SynthesisError>
Computes a product of pairings over the elements in
p
and q
.Auto Trait Implementations§
impl<P> Freeze for PairingVar<P>
impl<P> RefUnwindSafe for PairingVar<P>where
P: RefUnwindSafe,
impl<P> Send for PairingVar<P>where
P: Send,
impl<P> Sync for PairingVar<P>where
P: Sync,
impl<P> Unpin for PairingVar<P>where
P: Unpin,
impl<P> UnwindSafe for PairingVar<P>where
P: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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