Struct ark_r1cs_std::fields::cubic_extension::CubicExtVar
source · pub struct CubicExtVar<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>>where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, 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: BFThe zero-th coefficient of this field element.
c1: BFThe first coefficient of this field element.
c2: BFThe second coefficient of this field element.
Implementations§
source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> CubicExtVar<BF, P>where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> CubicExtVar<BF, P>where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
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 &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<&'a CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtField<P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtField<P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
+ operator.source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Add<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> AddAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> AddAssign<CubicExtField<P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
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<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> AddAssign<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
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§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>,
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>,
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 &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<&'a CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtField<P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtField<P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
* operator.source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Mul<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> MulAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> MulAssign<CubicExtField<P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
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<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> MulAssign<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
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<BF, P> R1CSVar<<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> R1CSVar<<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>,
§type Value = CubicExtField<P>
type Value = CubicExtField<P>
Self represents in the constraint
system.source§fn cs(&self) -> ConstraintSystemRef<P::BasePrimeField>
fn cs(&self) -> ConstraintSystemRef<P::BasePrimeField>
ConstraintSystemRef. Read moresource§fn value(&self) -> Result<Self::Value, SynthesisError>
fn value(&self) -> Result<Self::Value, SynthesisError>
self in the underlying
ConstraintSystem.source§fn is_constant(&self) -> bool
fn is_constant(&self) -> bool
true if self is a circuit-generation-time constant.source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<&'a CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<&'a CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
source§impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtField<P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtField<P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtVar<BF, P>> for &'a CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§type Output = CubicExtVar<BF, P>
type Output = CubicExtVar<BF, P>
- operator.source§impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> Sub<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
§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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> SubAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
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>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> SubAssign<CubicExtField<P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
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<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarConfig<BF>> SubAssign<CubicExtVar<BF, P>> for CubicExtVar<BF, P>where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
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>,
§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(&self) -> Result<Vec<UInt8<P::BasePrimeField>>, SynthesisError>
fn to_bytes(&self) -> Result<Vec<UInt8<P::BasePrimeField>>, SynthesisError>
self. Read moresource§fn to_non_unique_bytes(
&self
) -> Result<Vec<UInt8<P::BasePrimeField>>, SynthesisError>
fn to_non_unique_bytes(
&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>,
§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 more