pub struct CubicExtVar<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>>{
pub c0: BF,
pub c1: BF,
pub c2: BF,
/* private fields */
}
Expand description
This struct is the R1CS
equivalent of the cubic extension field type
in ark-ff
, i.e. ark_ff::CubicExtField
.
Fields§
§c0: BF
The zero-th coefficient of this field element.
c1: BF
The first coefficient of this field element.
c2: BF
The second coefficient of this field element.
Implementations§
Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> CubicExtVar<BF, P>
Sourcepub fn new(c0: BF, c1: BF, c2: BF) -> Self
pub fn new(c0: BF, c1: BF, c2: BF) -> Self
Constructs a CubicExtVar
from the underlying coefficients.
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 cubic 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)
.
Source§impl<P: Fp6Config> CubicExtVar<QuadExtVar<FpVar<<<P as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Fp6Config>::Fp2Config>>, Fp6ConfigWrapper<P>>
impl<P: Fp6Config> CubicExtVar<QuadExtVar<FpVar<<<P as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Fp6Config>::Fp2Config>>, Fp6ConfigWrapper<P>>
Sourcepub fn mul_by_0_c1_0(
&self,
c1: &Fp2Var<P::Fp2Config>,
) -> Result<Self, SynthesisError>
pub fn mul_by_0_c1_0( &self, c1: &Fp2Var<P::Fp2Config>, ) -> Result<Self, SynthesisError>
Multiplies self
by a sparse element which has c0 == c2 == zero
.
Sourcepub fn mul_by_c0_c1_0(
&self,
c0: &Fp2Var<P::Fp2Config>,
c1: &Fp2Var<P::Fp2Config>,
) -> Result<Self, SynthesisError>
pub fn mul_by_c0_c1_0( &self, c0: &Fp2Var<P::Fp2Config>, c1: &Fp2Var<P::Fp2Config>, ) -> Result<Self, SynthesisError>
Multiplies self
by a sparse element which has c2 == zero
.
Trait Implementations§
Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
+
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtField<P>> for &'a CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtField<P>> for &'a CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
+
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtField<P>> for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtField<P>> for CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
+
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
+
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add for &'a CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add for &'a CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
+
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add for CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
+
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> AddAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> AddAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
Source§fn add_assign(&mut self, other: &'a CubicExtVar<BF, P>)
fn add_assign(&mut self, other: &'a CubicExtVar<BF, P>)
+=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> AddAssign<CubicExtField<P>> for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> AddAssign<CubicExtField<P>> for CubicExtVar<BF, P>
Source§fn add_assign(&mut self, other: CubicExtField<P>)
fn add_assign(&mut self, other: CubicExtField<P>)
+=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> AddAssign for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> AddAssign for CubicExtVar<BF, P>
Source§fn add_assign(&mut self, other: CubicExtVar<BF, P>)
fn add_assign(&mut self, other: CubicExtVar<BF, P>)
+=
operation. Read moreSource§impl<BF, P> AllocVar<CubicExtField<P>, <P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> AllocVar<CubicExtField<P>, <P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
Source§fn new_variable<T: Borrow<CubicExtField<P>>>(
cs: impl Into<Namespace<P::BasePrimeField>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode,
) -> Result<Self, SynthesisError>
fn new_variable<T: Borrow<CubicExtField<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: CubicExtVarConfig<BF>> Clone for CubicExtVar<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: CubicExtVarConfig<BF>> Clone for CubicExtVar<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 CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> CondSelectGadget<<P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<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<BF, P: CubicExtVarConfig<BF>> Debug for CubicExtVar<BF, P>where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Debug + FieldVar<P::BaseField, P::BasePrimeField>,
impl<BF, P: CubicExtVarConfig<BF>> Debug for CubicExtVar<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 CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> EqGadget<<P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<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<CubicExtField<P>, <P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> FieldVar<CubicExtField<P>, <P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
Source§fn square(&self) -> Result<Self, SynthesisError>
fn square(&self) -> Result<Self, SynthesisError>
Use the Chung-Hasan asymmetric squaring formula.
(Devegili OhEig Scott Dahab — Multiplication and Squaring on Abstract Pairing-Friendly Fields.pdf; Section 4 (CH-SQR2))
Source§fn constant(other: CubicExtField<P>) -> Self
fn constant(other: CubicExtField<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 CubicExtConfig>::BasePrimeField>> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> From<Boolean<<P as CubicExtConfig>::BasePrimeField>> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<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: CubicExtVarConfig<BF>> Mul<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
*
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtField<P>> for &'a CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtField<P>> for &'a CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
*
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtField<P>> for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtField<P>> for CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
*
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
*
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul for &'a CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul for &'a CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
*
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul for CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
*
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> MulAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> MulAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
Source§fn mul_assign(&mut self, other: &'a CubicExtVar<BF, P>)
fn mul_assign(&mut self, other: &'a CubicExtVar<BF, P>)
*=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> MulAssign<CubicExtField<P>> for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> MulAssign<CubicExtField<P>> for CubicExtVar<BF, P>
Source§fn mul_assign(&mut self, other: CubicExtField<P>)
fn mul_assign(&mut self, other: CubicExtField<P>)
*=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> MulAssign for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> MulAssign for CubicExtVar<BF, P>
Source§fn mul_assign(&mut self, other: CubicExtVar<BF, P>)
fn mul_assign(&mut self, other: CubicExtVar<BF, P>)
*=
operation. Read moreSource§impl<P: Fp6Config> QuadExtVarConfig<CubicExtVar<FpVar<<<P as Fp6Config>::Fp3Config as Fp3Config>::Fp>, Fp3ConfigWrapper<<P as Fp6Config>::Fp3Config>>> for Fp6ConfigWrapper<P>
impl<P: Fp6Config> QuadExtVarConfig<CubicExtVar<FpVar<<<P as Fp6Config>::Fp3Config as Fp3Config>::Fp>, Fp3ConfigWrapper<<P as Fp6Config>::Fp3Config>>> for Fp6ConfigWrapper<P>
Source§impl<P: Fp12Config> QuadExtVarConfig<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>>> for Fp12ConfigWrapper<P>
impl<P: Fp12Config> QuadExtVarConfig<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>>> for Fp12ConfigWrapper<P>
Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
-
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtField<P>> for &'a CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtField<P>> for &'a CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
-
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtField<P>> for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtField<P>> for CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
-
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
-
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub for &'a CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub for &'a CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
-
operator.Source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub for CubicExtVar<BF, P>
Source§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
-
operator.Source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> SubAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> SubAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>
Source§fn sub_assign(&mut self, other: &'a CubicExtVar<BF, P>)
fn sub_assign(&mut self, other: &'a CubicExtVar<BF, P>)
-=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> SubAssign<CubicExtField<P>> for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> SubAssign<CubicExtField<P>> for CubicExtVar<BF, P>
Source§fn sub_assign(&mut self, other: CubicExtField<P>)
fn sub_assign(&mut self, other: CubicExtField<P>)
-=
operation. Read moreSource§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> SubAssign for CubicExtVar<BF, P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> SubAssign for CubicExtVar<BF, P>
Source§fn sub_assign(&mut self, other: CubicExtVar<BF, P>)
fn sub_assign(&mut self, other: CubicExtVar<BF, P>)
-=
operation. Read moreSource§impl<BF, P> ThreeBitCondNegLookupGadget<<P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ThreeBitCondNegLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> ThreeBitCondNegLookupGadget<<P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ThreeBitCondNegLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
Source§type TableConstant = CubicExtField<P>
type TableConstant = CubicExtField<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 CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> ToBitsGadget<<P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<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 CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> ToBytesGadget<<P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<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 CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ToConstraintFieldGadget<P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> ToConstraintFieldGadget<<P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ToConstraintFieldGadget<P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<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 CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + TwoBitLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<BF, P> TwoBitLookupGadget<<P as CubicExtConfig>::BasePrimeField> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField> + TwoBitLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
Source§type TableConstant = CubicExtField<P>
type TableConstant = CubicExtField<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, CubicExtField<P>, CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
impl<'a, BF, P> FieldOpsBounds<'a, CubicExtField<P>, CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: CubicExtVarConfig<BF>,
Auto Trait Implementations§
impl<BF, P> Freeze for CubicExtVar<BF, P>
impl<BF, P> RefUnwindSafe for CubicExtVar<BF, P>
impl<BF, P> Send for CubicExtVar<BF, P>
impl<BF, P> Sync for CubicExtVar<BF, P>
impl<BF, P> Unpin for CubicExtVar<BF, P>
impl<BF, P> UnwindSafe for CubicExtVar<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