ark_r1cs_std::fields::quadratic_extension

Struct QuadExtVar

Source
pub struct QuadExtVar<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>>
where for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, 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>
where for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,

Source

pub fn new(c0: BF, c1: BF) -> Self

Constructs a QuadExtVar from the underlying coefficients.

Source

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.

Source

pub fn mul_by_base_field_constant(&self, fe: P::BaseField) -> Self

Multiplies self by a constant from the base field.

Source

pub fn mul_assign_by_base_field_constant(&mut self, fe: P::BaseField)

Sets self = self.mul_by_base_field_constant(fe).

Source

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.

Source

pub fn cyclotomic_exp( &self, exponent: impl AsRef<[u64]>, ) -> Result<Self, SynthesisError>
where Self: FieldVar<QuadExtField<P>, P::BasePrimeField>,

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>>

Source

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)).

Source

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)).

Source

pub fn cyclotomic_square(&self) -> Result<Self, SynthesisError>

Squares self when self is in the cyclotomic subgroup.

Source

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>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a QuadExtVar<BF, P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<QuadExtField<P>> for &'a QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the + operator.
Source§

fn add(self, other: QuadExtField<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<QuadExtField<P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the + operator.
Source§

fn add(self, other: QuadExtField<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the + operator.
Source§

fn add(self, other: QuadExtVar<BF, P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add for &'a QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a QuadExtVar<BF, P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Add for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the + operator.
Source§

fn add(self, other: QuadExtVar<BF, P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> AddAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

fn add_assign(&mut self, other: &'a QuadExtVar<BF, P>)

Performs the += operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> AddAssign<QuadExtField<P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

fn add_assign(&mut self, other: QuadExtField<P>)

Performs the += operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> AddAssign for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

fn add_assign(&mut self, other: QuadExtVar<BF, P>)

Performs the += operation. Read more
Source§

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>

Allocates a new variable of type 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>

Allocates a new constant of type Self in the ConstraintSystem cs. Read more
Source§

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.
Source§

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.
Source§

fn new_variable_with_inferred_mode<T: Borrow<V>>( cs: impl Into<Namespace<F>>, f: impl FnOnce() -> Result<T, SynthesisError>, ) -> Result<Self, SynthesisError>

Allocates a new constant or private witness of type 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 more
Source§

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§

fn clone(&self) -> Self

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
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>,

Source§

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
Source§

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
Source§

impl<P: Fp6Config> CubicExtVarConfig<QuadExtVar<FpVar<<<P as Fp6Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Fp6Config>::Fp2Config>>> for Fp6ConfigWrapper<P>

Source§

fn mul_base_field_vars_by_frob_coeff( c1: &mut Fp2Var<P::Fp2Config>, c2: &mut Fp2Var<P::Fp2Config>, power: usize, )

Multiply the base field of the CubicExtVar by the appropriate Frobenius coefficient. This is equivalent to Self::mul_base_field_by_frob_coeff(c1, c2, power).
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>,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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>,

Source§

fn is_eq( &self, other: &Self, ) -> Result<Boolean<P::BasePrimeField>, SynthesisError>

Output a Boolean value representing whether self.value() == other.value().
Source§

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
Source§

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
Source§

fn is_neq(&self, other: &Self) -> Result<Boolean<F>, SynthesisError>

Output a Boolean value representing whether self.value() != other.value(). Read more
Source§

fn enforce_equal(&self, other: &Self) -> Result<(), SynthesisError>

Enforce that self and other are equal. Read more
Source§

fn enforce_not_equal(&self, other: &Self) -> Result<(), SynthesisError>

Enforce that self and other are not equal. Read more
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>,

Source§

fn constant(other: QuadExtField<P>) -> Self

Returns a constant with value v. Read more
Source§

fn zero() -> Self

Returns the constant F::zero().
Source§

fn one() -> Self

Returns the constant F::one().
Source§

fn double(&self) -> Result<Self, SynthesisError>

Computes self + self.
Source§

fn negate(&self) -> Result<Self, SynthesisError>

Coputes -self.
Source§

fn square(&self) -> Result<Self, SynthesisError>

Computes self * self. Read more
Source§

fn mul_equals(&self, other: &Self, result: &Self) -> Result<(), SynthesisError>

Enforces that self * other == result.
Source§

fn frobenius_map(&self, power: usize) -> Result<Self, SynthesisError>

Computes the frobenius map over self.
Source§

fn inverse(&self) -> Result<Self, SynthesisError>

Computes result such that self * result == Self::one().
Source§

fn is_zero(&self) -> Result<Boolean<ConstraintF>, SynthesisError>

Returns a Boolean representing whether self == Self::zero().
Source§

fn is_one(&self) -> Result<Boolean<ConstraintF>, SynthesisError>

Returns a Boolean representing whether self == Self::one().
Source§

fn double_in_place(&mut self) -> Result<&mut Self, SynthesisError>

Sets self = self + self.
Source§

fn negate_in_place(&mut self) -> Result<&mut Self, SynthesisError>

Sets self = -self.
Source§

fn square_in_place(&mut self) -> Result<&mut Self, SynthesisError>

Sets self = self.square().
Source§

fn square_equals(&self, result: &Self) -> Result<(), SynthesisError>

Enforces that self * self == result.
Source§

fn mul_by_inverse(&self, d: &Self) -> Result<Self, SynthesisError>

Returns (self / d). The constraint system will be unsatisfiable when d = 0.
Source§

fn mul_by_inverse_unchecked(&self, d: &Self) -> Result<Self, SynthesisError>

Returns (self / d). Read more
Source§

fn frobenius_map_in_place( &mut self, power: usize, ) -> Result<&mut Self, SynthesisError>

Sets self = self.frobenius_map().
Source§

fn pow_le(&self, bits: &[Boolean<ConstraintF>]) -> Result<Self, SynthesisError>

Comptues 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>

Computes 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>,

Source§

fn from(other: Boolean<P::BasePrimeField>) -> Self

Converts to this type from the input type.
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a QuadExtVar<BF, P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<QuadExtField<P>> for &'a QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: QuadExtField<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<QuadExtField<P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: QuadExtField<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: QuadExtVar<BF, P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul for &'a QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a QuadExtVar<BF, P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Mul for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: QuadExtVar<BF, P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> MulAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

fn mul_assign(&mut self, other: &'a QuadExtVar<BF, P>)

Performs the *= operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> MulAssign<QuadExtField<P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

fn mul_assign(&mut self, other: QuadExtField<P>)

Performs the *= operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> MulAssign for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

fn mul_assign(&mut self, other: QuadExtVar<BF, P>)

Performs the *= operation. Read more
Source§

impl<P: Fp4Config> QuadExtVarConfig<QuadExtVar<FpVar<<<P as Fp4Config>::Fp2Config as Fp2Config>::Fp>, Fp2ConfigWrapper<<P as Fp4Config>::Fp2Config>>> for Fp4ConfigWrapper<P>

Source§

fn mul_base_field_var_by_frob_coeff(fe: &mut Fp2Var<P::Fp2Config>, power: usize)

Multiply the base field of the QuadExtVar by the appropriate Frobenius coefficient. This is equivalent to Self::mul_base_field_by_frob_coeff(power).
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a QuadExtVar<BF, P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<QuadExtField<P>> for &'a QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: QuadExtField<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<QuadExtField<P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: QuadExtField<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: QuadExtVar<BF, P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub for &'a QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a QuadExtVar<BF, P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> Sub for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

type Output = QuadExtVar<BF, P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: QuadExtVar<BF, P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> SubAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

fn sub_assign(&mut self, other: &'a QuadExtVar<BF, P>)

Performs the -= operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> SubAssign<QuadExtField<P>> for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

fn sub_assign(&mut self, other: QuadExtField<P>)

Performs the -= operation. Read more
Source§

impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarConfig<BF>> SubAssign for QuadExtVar<BF, P>
where for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,

Source§

fn sub_assign(&mut self, other: QuadExtVar<BF, P>)

Performs the -= operation. Read more
Source§

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>

The type of values being looked up.
Source§

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
Source§

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>

Outputs the canonical little-endian bit-wise representation of self. Read more
Source§

fn to_non_unique_bits_le( &self, ) -> Result<Vec<Boolean<P::BasePrimeField>>, SynthesisError>

Outputs a possibly non-unique little-endian bit-wise representation of self. Read more
Source§

fn to_bits_be(&self) -> Result<Vec<Boolean<F>>, SynthesisError>

Outputs the canonical big-endian bit-wise representation of self.
Source§

fn to_non_unique_bits_be(&self) -> Result<Vec<Boolean<F>>, SynthesisError>

Outputs a possibly non-unique big-endian bit-wise representation of 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>,

Source§

fn to_bytes_le(&self) -> Result<Vec<UInt8<P::BasePrimeField>>, SynthesisError>

Outputs a canonical, little-endian, byte decomposition of self. Read more
Source§

fn to_non_unique_bytes_le( &self, ) -> Result<Vec<UInt8<P::BasePrimeField>>, SynthesisError>

Outputs a possibly non-unique byte decomposition of self. Read more
Source§

impl<BF, P> ToConstraintFieldGadget<<P as QuadExtConfig>::BasePrimeField> for QuadExtVar<BF, P>

Source§

fn to_constraint_field( &self, ) -> Result<Vec<FpVar<P::BasePrimeField>>, SynthesisError>

Converts 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>,

Source§

type TableConstant = QuadExtField<P>

The type of values being looked up.
Source§

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
Source§

impl<'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>,

Source§

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>
where &'a BF: for<'a> Sized, BF: Freeze,

§

impl<BF, P> RefUnwindSafe for QuadExtVar<BF, P>
where &'a BF: for<'a> Sized, BF: RefUnwindSafe, P: RefUnwindSafe,

§

impl<BF, P> Send for QuadExtVar<BF, P>
where &'a BF: for<'a> Sized, BF: Send,

§

impl<BF, P> Sync for QuadExtVar<BF, P>
where &'a BF: for<'a> Sized, BF: Sync,

§

impl<BF, P> Unpin for QuadExtVar<BF, P>
where &'a BF: for<'a> Sized, BF: Unpin, P: Unpin,

§

impl<BF, P> UnwindSafe for QuadExtVar<BF, P>
where &'a BF: for<'a> Sized, BF: UnwindSafe, P: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more