Struct ark_r1cs_std::fields::cubic_extension::CubicExtVar [−][src]
pub struct CubicExtVar<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<BF>> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>, { pub c0: BF, pub c1: BF, pub c2: BF, // some fields omitted }
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
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<BF>> CubicExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<BF>> CubicExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
Constructs a CubicExtVar
from the underlying coefficients.
Multiplies a variable of the base field by the cubic nonresidue
P::NONRESIDUE
that is used to construct the extension field.
Multiplies self
by a constant from the base field.
Sets self = self.mul_by_base_field_constant(fe)
.
impl<P: Fp6Parameters> CubicExtVar<QuadExtVar<FpVar<<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<P as Fp6Parameters>::Fp2Params>>, Fp6ParamsWrapper<P>>
impl<P: Fp6Parameters> CubicExtVar<QuadExtVar<FpVar<<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<P as Fp6Parameters>::Fp2Params>>, Fp6ParamsWrapper<P>>
Multiplies self
by a sparse element which has c0 == c2 == zero
.
pub fn mul_by_c0_c1_0(
&self,
c0: &Fp2Var<P::Fp2Params>,
c1: &Fp2Var<P::Fp2Params>
) -> Result<Self, SynthesisError>
pub fn mul_by_c0_c1_0(
&self,
c0: &Fp2Var<P::Fp2Params>,
c1: &Fp2Var<P::Fp2Params>
) -> Result<Self, SynthesisError>
Multiplies self
by a sparse element which has c2 == zero
.
Trait Implementations
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<BF>> AddAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the +=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<BF>> AddAssign<CubicExtField<P>> for CubicExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the +=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<BF>> AddAssign<CubicExtVar<BF, P>> for CubicExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the +=
operation. Read more
impl<BF, P> AllocVar<CubicExtField<P>, <P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> AllocVar<CubicExtField<P>, <P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
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>
Allocates a new variable of type Self
in the ConstraintSystem
cs
.
The mode of allocation is decided by mode
. Read more
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>
Allocates a new constant of type Self
in the ConstraintSystem
cs
. Read more
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>
Allocates a new public input of type Self
in the ConstraintSystem
cs
. Read more
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>
Allocates a new private witness of type Self
in the ConstraintSystem
cs
. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<BF>> Clone for CubicExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Clone,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<BF>> Clone for CubicExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Clone,
impl<BF, P> CondSelectGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> CondSelectGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
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>
If cond == &Boolean::TRUE
, then this returns true_value
; else,
returns false_value
. Read more
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>
Returns an element of values
whose index in represented by position
.
position
is an array of boolean that represents an unsigned integer in big endian order. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<BF>> Debug for CubicExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Debug,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<BF>> Debug for CubicExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Debug,
impl<BF, P> EqGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> EqGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
Output a Boolean
value representing whether self.value() == other.value()
. Read more
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>
If should_enforce == true
, enforce that self
and other
are equal;
else, enforce a vacuously true statement. Read more
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>
If should_enforce == true
, enforce that self
and other
are not
equal; else, enforce a vacuously true statement. Read more
Output a Boolean
value representing whether self.value() != other.value()
. Read more
Enforce that self
and other
are equal. Read more
Enforce that self
and other
are not equal. Read more
impl<BF, P> FieldVar<CubicExtField<P>, <P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> FieldVar<CubicExtField<P>, <P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
Use the Chung-Hasan asymmetric squaring formula.
(Devegili OhEig Scott Dahab — Multiplication and Squaring on Abstract Pairing-Friendly Fields.pdf; Section 4 (CH-SQR2))
Returns a constant with value v
. Read more
Computes self + self
.
Coputes -self
.
Enforces that self * other == result
.
Computes the frobenius map over self
.
Computes result
such that self * result == Self::one()
.
Returns a Boolean
representing whether self == Self::zero()
.
Returns a Boolean
representing whether self == Self::one()
.
Sets self = self + self
.
Sets self = -self
.
Sets self = self.square()
.
Enforces that self * self == result
.
Returns (self / d)
.
The constraint system will be unsatisfiable when d = 0
. Read more
Sets self = self.frobenius_map()
.
Comptues self^bits
, where bits
is a little-endian bit-wise
decomposition of the exponent. Read more
Computes self^S
, where S is interpreted as an little-endian
u64-decomposition of an integer. Read more
impl<BF, P> From<Boolean<<P as CubicExtParameters>::BasePrimeField>> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> From<Boolean<<P as CubicExtParameters>::BasePrimeField>> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
Performs the conversion.
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<BF>> MulAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the *=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<BF>> MulAssign<CubicExtField<P>> for CubicExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the *=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<BF>> MulAssign<CubicExtVar<BF, P>> for CubicExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the *=
operation. Read more
impl<P: Fp6Parameters> QuadExtVarParams<CubicExtVar<FpVar<<<P as Fp6Parameters>::Fp3Params as Fp3Parameters>::Fp>, Fp3ParamsWrapper<<P as Fp6Parameters>::Fp3Params>>> for Fp6ParamsWrapper<P>
impl<P: Fp6Parameters> QuadExtVarParams<CubicExtVar<FpVar<<<P as Fp6Parameters>::Fp3Params as Fp3Parameters>::Fp>, Fp3ParamsWrapper<<P as Fp6Parameters>::Fp3Params>>> for Fp6ParamsWrapper<P>
impl<P: Fp12Parameters> QuadExtVarParams<CubicExtVar<QuadExtVar<FpVar<<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>>, Fp6ParamsWrapper<<P as Fp12Parameters>::Fp6Params>>> for Fp12ParamsWrapper<P>
impl<P: Fp12Parameters> QuadExtVarParams<CubicExtVar<QuadExtVar<FpVar<<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>>, Fp6ParamsWrapper<<P as Fp12Parameters>::Fp6Params>>> for Fp12ParamsWrapper<P>
impl<BF, P> R1CSVar<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> R1CSVar<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
type Value = CubicExtField<P>
type Value = CubicExtField<P>
The type of the “native” value that Self
represents in the constraint
system. Read more
Returns the underlying ConstraintSystemRef
. Read more
Returns the value that is assigned to self
in the underlying
ConstraintSystem
. Read more
Returns true
if self
is a circuit-generation-time constant.
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<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>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<BF>> SubAssign<&'a CubicExtVar<BF, P>> for CubicExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the -=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<BF>> SubAssign<CubicExtField<P>> for CubicExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the -=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: CubicExtVarParams<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: CubicExtVarParams<BF>> SubAssign<CubicExtVar<BF, P>> for CubicExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the -=
operation. Read more
impl<BF, P> ThreeBitCondNegLookupGadget<<P as CubicExtParameters>::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: CubicExtVarParams<BF>,
impl<BF, P> ThreeBitCondNegLookupGadget<<P as CubicExtParameters>::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: CubicExtVarParams<BF>,
type TableConstant = CubicExtField<P>
type TableConstant = CubicExtField<P>
The type of values being looked up.
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>
Interprets the slice 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 more
impl<BF, P> ToBitsGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> ToBitsGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
Outputs the canonical little-endian bit-wise representation of self
. Read more
Outputs a possibly non-unique little-endian bit-wise representation of
self
. Read more
Outputs the canonical big-endian bit-wise representation of self
.
Outputs a possibly non-unique big-endian bit-wise representation of
self
. Read more
impl<BF, P> ToBytesGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> ToBytesGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> ToConstraintFieldGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
BF: ToConstraintFieldGadget<P::BasePrimeField>,
impl<BF, P> ToConstraintFieldGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
BF: ToConstraintFieldGadget<P::BasePrimeField>,
Converts self
to FpVar<ConstraintF>
variables.
impl<BF, P> TwoBitLookupGadget<<P as CubicExtParameters>::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: CubicExtVarParams<BF>,
impl<BF, P> TwoBitLookupGadget<<P as CubicExtParameters>::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: CubicExtVarParams<BF>,
type TableConstant = CubicExtField<P>
type TableConstant = CubicExtField<P>
The type of values being looked up.
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>
Interprets the slice bits
as a two-bit integer b = bits[0] + (bits[1] << 1)
, and then outputs constants[b]
. Read more
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: CubicExtVarParams<BF>,
impl<'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: CubicExtVarParams<BF>,
Auto Trait Implementations
impl<BF, P> RefUnwindSafe for CubicExtVar<BF, P> where
BF: RefUnwindSafe,
P: RefUnwindSafe,
impl<BF, P> Send for CubicExtVar<BF, P> where
BF: Send,
impl<BF, P> Sync for CubicExtVar<BF, P> where
BF: Sync,
impl<BF, P> Unpin for CubicExtVar<BF, P> where
BF: Unpin,
P: Unpin,
impl<BF, P> UnwindSafe for CubicExtVar<BF, P> where
BF: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V