pub struct QuadExtVar<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>>{
pub c0: BF,
pub c1: BF,
/* private fields */
}
Expand description
This struct is the R1CS
equivalent of the quadratic extension field type
in ark-ff
, i.e. ark_ff::QuadExtField
.
Fields§
§c0: BF
The zero-th coefficient of this field element.
c1: BF
The first coefficient of this field element.
Implementations§
Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> QuadExtVar<BF, P>
Sourcepub fn mul_base_field_by_nonresidue(fe: &BF) -> Result<BF, SynthesisError>
pub fn mul_base_field_by_nonresidue(fe: &BF) -> Result<BF, SynthesisError>
Multiplies a variable of the base field by the quadratic nonresidue
P::NONRESIDUE
that is used to construct the extension field.
Sourcepub fn mul_by_base_field_constant(&self, fe: P::BaseField) -> Self
pub fn mul_by_base_field_constant(&self, fe: P::BaseField) -> Self
Multiplies self
by a constant from the base field.
Sourcepub fn mul_assign_by_base_field_constant(&mut self, fe: P::BaseField)
pub fn mul_assign_by_base_field_constant(&mut self, fe: P::BaseField)
Sets self = self.mul_by_base_field_constant(fe)
.
Sourcepub fn unitary_inverse(&self) -> Result<Self, SynthesisError>
pub fn unitary_inverse(&self) -> Result<Self, SynthesisError>
This is only to be used when the element is known to be in the cyclotomic subgroup.
Sourcepub fn cyclotomic_exp(
&self,
exponent: impl AsRef<[u64]>,
) -> Result<Self, SynthesisError>
pub fn cyclotomic_exp( &self, exponent: impl AsRef<[u64]>, ) -> Result<Self, SynthesisError>
This is only to be used when the element is known to be in the cyclotomic subgroup.
Source§impl<P: Fp12Config> QuadExtVar<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>>, Fp12ConfigWrapper<P>>
impl<P: Fp12Config> QuadExtVar<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>>, Fp12ConfigWrapper<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.
Trait Implementations§
Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
+
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<QuadExtField<P>> for &'a QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<QuadExtField<P>> for &'a QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
+
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<QuadExtField<P>> for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<QuadExtField<P>> for QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
+
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
+
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add for &'a QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add for &'a QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
+
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add for QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
+
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> AddAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> AddAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
Source§fn add_assign(&mut self, other: &'a QuadExtVar<BF, P>)
fn add_assign(&mut self, other: &'a QuadExtVar<BF, P>)
+=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> AddAssign<QuadExtField<P>> for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> AddAssign<QuadExtField<P>> for QuadExtVar<BF, P>
Source§fn add_assign(&mut self, other: QuadExtField<P>)
fn add_assign(&mut self, other: QuadExtField<P>)
+=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> AddAssign for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> AddAssign for QuadExtVar<BF, P>
Source§fn add_assign(&mut self, other: QuadExtVar<BF, P>)
fn add_assign(&mut self, other: QuadExtVar<BF, P>)
+=
operation. Read moreSource§impl<BF, P> AllocVar<QuadExtField<P>, <P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> AllocVar<QuadExtField<P>, <P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§fn new_variable<T: Borrow<QuadExtField<P>>>(
cs: impl Into<Namespace<P::BasePrimeField>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode,
) -> Result<Self, SynthesisError>
fn new_variable<T: Borrow<QuadExtField<P>>>( cs: impl Into<Namespace<P::BasePrimeField>>, f: impl FnOnce() -> Result<T, SynthesisError>, mode: AllocationMode, ) -> Result<Self, SynthesisError>
Self
in the ConstraintSystem
cs
.
The mode of allocation is decided by mode
.Source§fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>,
) -> Result<Self, SynthesisError>
fn new_constant( cs: impl Into<Namespace<F>>, t: impl Borrow<V>, ) -> Result<Self, SynthesisError>
Source§fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>
fn new_input<T: Borrow<V>>( cs: impl Into<Namespace<F>>, f: impl FnOnce() -> Result<T, SynthesisError>, ) -> Result<Self, SynthesisError>
Self
in the ConstraintSystem
cs
.Source§fn new_witness<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>
fn new_witness<T: Borrow<V>>( cs: impl Into<Namespace<F>>, f: impl FnOnce() -> Result<T, SynthesisError>, ) -> Result<Self, SynthesisError>
Self
in the ConstraintSystem
cs
.Source§fn new_variable_with_inferred_mode<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>
fn new_variable_with_inferred_mode<T: Borrow<V>>( cs: impl Into<Namespace<F>>, f: impl FnOnce() -> Result<T, SynthesisError>, ) -> Result<Self, SynthesisError>
Self
in the
ConstraintSystem
cs
with the allocation mode inferred from cs
.
A constant is allocated if cs
is None
, and a private witness is
allocated otherwise. Read moreSource§impl<BF, P: QuadExtVarConfig<BF>> Clone for QuadExtVar<BF, P>where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Clone + FieldVar<P::BaseField, P::BasePrimeField>,
PhantomData<P>: Clone,
impl<BF, P: QuadExtVarConfig<BF>> Clone for QuadExtVar<BF, P>where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Clone + FieldVar<P::BaseField, P::BasePrimeField>,
PhantomData<P>: Clone,
Source§impl<BF, P> CondSelectGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> CondSelectGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§fn conditionally_select(
cond: &Boolean<P::BasePrimeField>,
true_value: &Self,
false_value: &Self,
) -> Result<Self, SynthesisError>
fn conditionally_select( cond: &Boolean<P::BasePrimeField>, true_value: &Self, false_value: &Self, ) -> Result<Self, SynthesisError>
Source§fn conditionally_select_power_of_two_vector(
position: &[Boolean<ConstraintF>],
values: &[Self],
) -> Result<Self, SynthesisError>
fn conditionally_select_power_of_two_vector( position: &[Boolean<ConstraintF>], values: &[Self], ) -> Result<Self, SynthesisError>
values
whose index in represented by position
.
position
is an array of boolean that represents an unsigned integer in
big endian order. Read moreSource§impl<P: Fp6Config> CubicExtVarConfig<QuadExtVar<FpVar<<<P as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Fp6Config>::Fp2Config>>> for Fp6ConfigWrapper<P>
impl<P: Fp6Config> CubicExtVarConfig<QuadExtVar<FpVar<<<P as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Fp6Config>::Fp2Config>>> for Fp6ConfigWrapper<P>
Source§impl<BF, P: QuadExtVarConfig<BF>> Debug for QuadExtVar<BF, P>where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Debug + FieldVar<P::BaseField, P::BasePrimeField>,
impl<BF, P: QuadExtVarConfig<BF>> Debug for QuadExtVar<BF, P>where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Debug + FieldVar<P::BaseField, P::BasePrimeField>,
Source§impl<BF, P> EqGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> EqGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§fn is_eq(
&self,
other: &Self,
) -> Result<Boolean<P::BasePrimeField>, SynthesisError>
fn is_eq( &self, other: &Self, ) -> Result<Boolean<P::BasePrimeField>, SynthesisError>
Boolean
value representing whether self.value() == other.value()
.Source§fn conditional_enforce_equal(
&self,
other: &Self,
condition: &Boolean<P::BasePrimeField>,
) -> Result<(), SynthesisError>
fn conditional_enforce_equal( &self, other: &Self, condition: &Boolean<P::BasePrimeField>, ) -> Result<(), SynthesisError>
should_enforce == true
, enforce that self
and other
are equal;
else, enforce a vacuously true statement. Read moreSource§fn conditional_enforce_not_equal(
&self,
other: &Self,
condition: &Boolean<P::BasePrimeField>,
) -> Result<(), SynthesisError>
fn conditional_enforce_not_equal( &self, other: &Self, condition: &Boolean<P::BasePrimeField>, ) -> Result<(), SynthesisError>
should_enforce == true
, enforce that self
and other
are not
equal; else, enforce a vacuously true statement. Read moreSource§fn enforce_equal(&self, other: &Self) -> Result<(), SynthesisError>
fn enforce_equal(&self, other: &Self) -> Result<(), SynthesisError>
Source§fn enforce_not_equal(&self, other: &Self) -> Result<(), SynthesisError>
fn enforce_not_equal(&self, other: &Self) -> Result<(), SynthesisError>
Source§impl<BF, P> FieldVar<QuadExtField<P>, <P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> FieldVar<QuadExtField<P>, <P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§fn constant(other: QuadExtField<P>) -> Self
fn constant(other: QuadExtField<P>) -> Self
v
. Read moreSource§fn double(&self) -> Result<Self, SynthesisError>
fn double(&self) -> Result<Self, SynthesisError>
self + self
.Source§fn negate(&self) -> Result<Self, SynthesisError>
fn negate(&self) -> Result<Self, SynthesisError>
-self
.Source§fn mul_equals(&self, other: &Self, result: &Self) -> Result<(), SynthesisError>
fn mul_equals(&self, other: &Self, result: &Self) -> Result<(), SynthesisError>
self * other == result
.Source§fn frobenius_map(&self, power: usize) -> Result<Self, SynthesisError>
fn frobenius_map(&self, power: usize) -> Result<Self, SynthesisError>
self
.Source§fn inverse(&self) -> Result<Self, SynthesisError>
fn inverse(&self) -> Result<Self, SynthesisError>
result
such that self * result == Self::one()
.Source§fn is_zero(&self) -> Result<Boolean<ConstraintF>, SynthesisError>
fn is_zero(&self) -> Result<Boolean<ConstraintF>, SynthesisError>
Boolean
representing whether self == Self::zero()
.Source§fn is_one(&self) -> Result<Boolean<ConstraintF>, SynthesisError>
fn is_one(&self) -> Result<Boolean<ConstraintF>, SynthesisError>
Boolean
representing whether self == Self::one()
.Source§fn double_in_place(&mut self) -> Result<&mut Self, SynthesisError>
fn double_in_place(&mut self) -> Result<&mut Self, SynthesisError>
self = self + self
.Source§fn negate_in_place(&mut self) -> Result<&mut Self, SynthesisError>
fn negate_in_place(&mut self) -> Result<&mut Self, SynthesisError>
self = -self
.Source§fn square_in_place(&mut self) -> Result<&mut Self, SynthesisError>
fn square_in_place(&mut self) -> Result<&mut Self, SynthesisError>
self = self.square()
.Source§fn square_equals(&self, result: &Self) -> Result<(), SynthesisError>
fn square_equals(&self, result: &Self) -> Result<(), SynthesisError>
self * self == result
.Source§fn mul_by_inverse(&self, d: &Self) -> Result<Self, SynthesisError>
fn mul_by_inverse(&self, d: &Self) -> Result<Self, SynthesisError>
(self / d)
.
The constraint system will be unsatisfiable when d = 0
.Source§fn mul_by_inverse_unchecked(&self, d: &Self) -> Result<Self, SynthesisError>
fn mul_by_inverse_unchecked(&self, d: &Self) -> Result<Self, SynthesisError>
(self / d)
. Read moreSource§fn frobenius_map_in_place(
&mut self,
power: usize,
) -> Result<&mut Self, SynthesisError>
fn frobenius_map_in_place( &mut self, power: usize, ) -> Result<&mut Self, SynthesisError>
self = self.frobenius_map()
.Source§fn pow_le(&self, bits: &[Boolean<ConstraintF>]) -> Result<Self, SynthesisError>
fn pow_le(&self, bits: &[Boolean<ConstraintF>]) -> Result<Self, SynthesisError>
self^bits
, where bits
is a little-endian bit-wise
decomposition of the exponent.Source§fn pow_by_constant<S: AsRef<[u64]>>(
&self,
exp: S,
) -> Result<Self, SynthesisError>
fn pow_by_constant<S: AsRef<[u64]>>( &self, exp: S, ) -> Result<Self, SynthesisError>
self^S
, where S is interpreted as an little-endian
u64-decomposition of an integer.Source§impl<BF, P> From<Boolean<<P as QuadExtConfig>::BasePrimeField>> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> From<Boolean<<P as QuadExtConfig>::BasePrimeField>> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§fn from(other: Boolean<P::BasePrimeField>) -> Self
fn from(other: Boolean<P::BasePrimeField>) -> Self
Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
*
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<QuadExtField<P>> for &'a QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<QuadExtField<P>> for &'a QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
*
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<QuadExtField<P>> for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<QuadExtField<P>> for QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
*
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
*
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul for &'a QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul for &'a QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
*
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul for QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
*
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> MulAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> MulAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
Source§fn mul_assign(&mut self, other: &'a QuadExtVar<BF, P>)
fn mul_assign(&mut self, other: &'a QuadExtVar<BF, P>)
*=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> MulAssign<QuadExtField<P>> for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> MulAssign<QuadExtField<P>> for QuadExtVar<BF, P>
Source§fn mul_assign(&mut self, other: QuadExtField<P>)
fn mul_assign(&mut self, other: QuadExtField<P>)
*=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> MulAssign for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> MulAssign for QuadExtVar<BF, P>
Source§fn mul_assign(&mut self, other: QuadExtVar<BF, P>)
fn mul_assign(&mut self, other: QuadExtVar<BF, P>)
*=
operation. Read moreSource§impl<P: Fp4Config> QuadExtVarConfig<QuadExtVar<FpVar<<<P as Fp4Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Fp4Config>::Fp2Config>>> for Fp4ConfigWrapper<P>
impl<P: Fp4Config> QuadExtVarConfig<QuadExtVar<FpVar<<<P as Fp4Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Fp4Config>::Fp2Config>>> for Fp4ConfigWrapper<P>
Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
-
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<QuadExtField<P>> for &'a QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<QuadExtField<P>> for &'a QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
-
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<QuadExtField<P>> for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<QuadExtField<P>> for QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
-
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
-
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub for &'a QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub for &'a QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
-
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub for QuadExtVar<BF, P>
Source§type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
-
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> SubAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> SubAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
Source§fn sub_assign(&mut self, other: &'a QuadExtVar<BF, P>)
fn sub_assign(&mut self, other: &'a QuadExtVar<BF, P>)
-=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> SubAssign<QuadExtField<P>> for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> SubAssign<QuadExtField<P>> for QuadExtVar<BF, P>
Source§fn sub_assign(&mut self, other: QuadExtField<P>)
fn sub_assign(&mut self, other: QuadExtField<P>)
-=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> SubAssign for QuadExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> SubAssign for QuadExtVar<BF, P>
Source§fn sub_assign(&mut self, other: QuadExtVar<BF, P>)
fn sub_assign(&mut self, other: QuadExtVar<BF, P>)
-=
operation. Read moreSource§impl<BF, P> ThreeBitCondNegLookupGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ThreeBitCondNegLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> ThreeBitCondNegLookupGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ThreeBitCondNegLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§type TableConstant = QuadExtField<P>
type TableConstant = QuadExtField<P>
Source§fn three_bit_cond_neg_lookup(
b: &[Boolean<P::BasePrimeField>],
b0b1: &Boolean<P::BasePrimeField>,
c: &[Self::TableConstant],
) -> Result<Self, SynthesisError>
fn three_bit_cond_neg_lookup( b: &[Boolean<P::BasePrimeField>], b0b1: &Boolean<P::BasePrimeField>, c: &[Self::TableConstant], ) -> Result<Self, SynthesisError>
bits
as a two-bit integer b = bits[0] + (bits[1] << 1)
, and then outputs constants[b] * c
, where c = if bits[2] { -1 } else { 1 };
. Read moreSource§impl<BF, P> ToBitsGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> ToBitsGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§fn to_bits_le(&self) -> Result<Vec<Boolean<P::BasePrimeField>>, SynthesisError>
fn to_bits_le(&self) -> Result<Vec<Boolean<P::BasePrimeField>>, SynthesisError>
self
. Read moreSource§fn to_non_unique_bits_le(
&self,
) -> Result<Vec<Boolean<P::BasePrimeField>>, SynthesisError>
fn to_non_unique_bits_le( &self, ) -> Result<Vec<Boolean<P::BasePrimeField>>, SynthesisError>
self
. Read moreSource§fn to_bits_be(&self) -> Result<Vec<Boolean<F>>, SynthesisError>
fn to_bits_be(&self) -> Result<Vec<Boolean<F>>, SynthesisError>
self
.Source§fn to_non_unique_bits_be(&self) -> Result<Vec<Boolean<F>>, SynthesisError>
fn to_non_unique_bits_be(&self) -> Result<Vec<Boolean<F>>, SynthesisError>
self
.Source§impl<BF, P> ToBytesGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> ToBytesGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§fn to_bytes_le(&self) -> Result<Vec<UInt8<P::BasePrimeField>>, SynthesisError>
fn to_bytes_le(&self) -> Result<Vec<UInt8<P::BasePrimeField>>, SynthesisError>
self
. Read moreSource§fn to_non_unique_bytes_le(
&self,
) -> Result<Vec<UInt8<P::BasePrimeField>>, SynthesisError>
fn to_non_unique_bytes_le( &self, ) -> Result<Vec<UInt8<P::BasePrimeField>>, SynthesisError>
self
. Read moreSource§impl<BF, P> ToConstraintFieldGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ToConstraintFieldGadget<P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> ToConstraintFieldGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ToConstraintFieldGadget<P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§fn to_constraint_field(
&self,
) -> Result<Vec<FpVar<P::BasePrimeField>>, SynthesisError>
fn to_constraint_field( &self, ) -> Result<Vec<FpVar<P::BasePrimeField>>, SynthesisError>
self
to FpVar<ConstraintF>
variables.Source§impl<BF, P> TwoBitLookupGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + TwoBitLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<BF, P> TwoBitLookupGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + TwoBitLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Source§type TableConstant = QuadExtField<P>
type TableConstant = QuadExtField<P>
Source§fn two_bit_lookup(
b: &[Boolean<P::BasePrimeField>],
c: &[Self::TableConstant],
) -> Result<Self, SynthesisError>
fn two_bit_lookup( b: &[Boolean<P::BasePrimeField>], c: &[Self::TableConstant], ) -> Result<Self, SynthesisError>
bits
as a two-bit integer b = bits[0] + (bits[1] << 1)
, and then outputs constants[b]
. Read moreimpl<'a, BF, P> FieldOpsBounds<'a, QuadExtField<P>, QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
impl<'a, BF, P> FieldOpsBounds<'a, QuadExtField<P>, QuadExtVar<BF, P>> for QuadExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarConfig<BF>,
Auto Trait Implementations§
impl<BF, P> Freeze for QuadExtVar<BF, P>
impl<BF, P> RefUnwindSafe for QuadExtVar<BF, P>
impl<BF, P> Send for QuadExtVar<BF, P>
impl<BF, P> Sync for QuadExtVar<BF, P>
impl<BF, P> Unpin for QuadExtVar<BF, P>
impl<BF, P> UnwindSafe for QuadExtVar<BF, 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
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)
clone_to_uninit
)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>
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>
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