Struct ark_r1cs_std::pairing::bls12::PairingVar
source · pub struct PairingVar<P: Bls12Config>(_);
Expand description
Specifies the constraints for computing a pairing in a BLS12 bilinear group.
Trait Implementations§
source§impl<P: Bls12Config> PairingVar<Bls12<P>, <P as Bls12Config>::Fp> for PairingVar<P>
impl<P: Bls12Config> PairingVar<Bls12<P>, <P as Bls12Config>::Fp> for PairingVar<P>
§type G1Var = ProjectiveVar<<P as Bls12Config>::G1Config, FpVar<<P as Bls12Config>::Fp>>
type G1Var = ProjectiveVar<<P as Bls12Config>::G1Config, FpVar<<P as Bls12Config>::Fp>>
An variable representing an element of
G1
.
This is the R1CS equivalent of E::G1Projective
.§type G2Var = ProjectiveVar<<P as Bls12Config>::G2Config, QuadExtVar<FpVar<<<P as Bls12Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Bls12Config>::Fp2Config>>>
type G2Var = ProjectiveVar<<P as Bls12Config>::G2Config, QuadExtVar<FpVar<<<P as Bls12Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Bls12Config>::Fp2Config>>>
An variable representing an element of
G2
.
This is the R1CS equivalent of E::G2Projective
.§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
.§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
.§type GTVar = QuadExtVar<CubicExtVar<QuadExtVar<FpVar<<<<<P as Bls12Config>::Fp12Config as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<<<P as Bls12Config>::Fp12Config as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>>, Fp6ConfigWrapper<<<P as Bls12Config>::Fp12Config as Fp12Config>::Fp6Config>>, Fp12ConfigWrapper<<P as Bls12Config>::Fp12Config>>
type GTVar = QuadExtVar<CubicExtVar<QuadExtVar<FpVar<<<<<P as Bls12Config>::Fp12Config as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<<<P as Bls12Config>::Fp12Config as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>>, Fp6ConfigWrapper<<<P as Bls12Config>::Fp12Config as Fp12Config>::Fp6Config>>, Fp12ConfigWrapper<<P as Bls12Config>::Fp12Config>>
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(f: &Self::GTVar) -> Result<Self::GTVar, SynthesisError>
fn final_exponentiation(f: &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
.