pub type Fp12Var<P> = QuadExtVar<Fp6Var<<P as Fp12Config>::Fp6Config>, Fp12ConfigWrapper<P>>;
Expand description
A degree-12 extension field constructed as the tower of a
quadratic extension over a cubic extension over a quadratic extension field.
This is the R1CS equivalent of ark_ff::fp12_2over3over2::Fp12<P>
.
Aliased Type§
struct Fp12Var<P> {
pub c0: CubicExtVar<QuadExtVar<FpVar<<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>>, Fp6ConfigWrapper<<P as Fp12Config>::Fp6Config>>,
pub c1: CubicExtVar<QuadExtVar<FpVar<<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>>, Fp6ConfigWrapper<<P as Fp12Config>::Fp6Config>>,
/* private fields */
}
Fields§
§c0: CubicExtVar<QuadExtVar<FpVar<<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>>, Fp6ConfigWrapper<<P as Fp12Config>::Fp6Config>>
The zero-th coefficient of this field element.
c1: CubicExtVar<QuadExtVar<FpVar<<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>>, Fp6ConfigWrapper<<P as Fp12Config>::Fp6Config>>
The first coefficient of this field element.
Implementations§
Source§impl<P: Fp12Config> Fp12Var<P>
impl<P: Fp12Config> Fp12Var<P>
Sourcepub fn mul_by_014(
&self,
c0: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>,
c1: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>,
d1: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>,
) -> Result<Self, SynthesisError>
pub fn mul_by_014( &self, c0: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, c1: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, d1: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, ) -> Result<Self, SynthesisError>
Multiplies by a sparse element of the form (c0 = (c0, c1, 0), c1 = (0, d1, 0))
.
Sourcepub fn mul_by_034(
&self,
c0: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>,
d0: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>,
d1: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>,
) -> Result<Self, SynthesisError>
pub fn mul_by_034( &self, c0: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, d0: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, d1: &Fp2Var<<<P as Fp12Config>::Fp6Config as Fp6Config>::Fp2Config>, ) -> Result<Self, SynthesisError>
Multiplies by a sparse element of the form (c0 = (c0, 0, 0), c1 = (d0, d1, 0))
.
Sourcepub fn cyclotomic_square(&self) -> Result<Self, SynthesisError>
pub fn cyclotomic_square(&self) -> Result<Self, SynthesisError>
Squares self
when self
is in the cyclotomic subgroup.
Sourcepub fn optimized_cyclotomic_exp(
&self,
exponent: impl AsRef<[u64]>,
) -> Result<Self, SynthesisError>
pub fn optimized_cyclotomic_exp( &self, exponent: impl AsRef<[u64]>, ) -> Result<Self, SynthesisError>
Like Self::cyclotomic_exp
, but additionally uses cyclotomic squaring.