ark_r1cs_std::groups::curves::twisted_edwards

Struct AffineVar

Source
pub struct AffineVar<P: TECurveConfig, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>>
where for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
{ pub x: F, pub y: F, /* private fields */ }
Expand description

An implementation of arithmetic for Twisted Edwards curves that relies on the complete formulae for the affine model, as outlined in the EFD.

Fields§

§x: F

The x-coordinate.

§y: F

The y-coordinate.

Implementations§

Source§

impl<P: TECurveConfig, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> AffineVar<P, F>
where for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,

Source

pub fn new(x: F, y: F) -> Self

Constructs Self from an (x, y) coordinate triple.

Source

pub fn new_variable_omit_on_curve_check<T: Into<TEAffine<P>>>( cs: impl Into<Namespace<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, f: impl FnOnce() -> Result<T, SynthesisError>, mode: AllocationMode, ) -> Result<Self, SynthesisError>

Allocates a new variable without performing an on-curve check, which is useful if the variable is known to be on the curve (eg., if the point is a constant or is a public input).

Source§

impl<P, F> AffineVar<P, F>

Source

pub fn precomputed_base_3_bit_signed_digit_scalar_mul<J>( bases: &[impl Borrow<[TEProjective<P>]>], scalars: &[impl Borrow<[J]>], ) -> Result<Self, SynthesisError>

Compute a scalar multiplication of bases with respect to scalars, where the elements of scalars are length-three slices of bits, and which such that the first two bits are use to select one of the bases, while the third bit is used to conditionally negate the selection.

Trait Implementations§

Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Add<&'a AffineVar<P, F>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Add<AffineVar<P, F>> for &'a AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Add<Projective<P>> for &'a AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Add<Projective<P>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Add for &'a AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Add for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> AddAssign<&'a AffineVar<P, F>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

fn add_assign(&mut self, other: &'a AffineVar<P, F>)

Performs the += operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> AddAssign<Projective<P>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

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

Performs the += operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> AddAssign for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

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

Performs the += operation. Read more
Source§

impl<P, F> AllocVar<Affine<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>

Source§

fn new_variable<Point: Borrow<TEAffine<P>>>( cs: impl Into<Namespace<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, f: impl FnOnce() -> Result<Point, 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<P, F> AllocVar<Projective<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>

Source§

fn new_variable<Point: Borrow<TEProjective<P>>>( cs: impl Into<Namespace<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, f: impl FnOnce() -> Result<Point, 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<P: TECurveConfig, F> Clone for AffineVar<P, F>

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<P, F> CondSelectGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>

Source§

fn conditionally_select( cond: &Boolean<<<P as CurveConfig>::BaseField as Field>::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, F> CurveVar<Projective<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>

Source§

fn enforce_prime_order(&self) -> Result<(), SynthesisError>

Enforce that self is in the prime-order subgroup.

Does so by multiplying by the prime order, and checking that the result is unchanged.

Source§

fn constant(g: TEProjective<P>) -> Self

Returns a constant with value v. Read more
Source§

fn zero() -> Self

Returns the constant F::zero(). This is the identity of the group.
Source§

fn is_zero( &self, ) -> Result<Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>, SynthesisError>

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

fn new_variable_omit_prime_order_check( cs: impl Into<Namespace<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, f: impl FnOnce() -> Result<TEProjective<P>, SynthesisError>, mode: AllocationMode, ) -> Result<Self, SynthesisError>

Allocates a variable in the subgroup without checking if it’s in the prime-order subgroup.
Source§

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

Sets self = self + self.
Source§

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

Coputes -self.
Source§

fn precomputed_base_scalar_mul_le<'a, I, B>( &mut self, scalar_bits_with_base_multiples: I, ) -> Result<(), SynthesisError>
where I: Iterator<Item = (B, &'a TEProjective<P>)>, B: Borrow<Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>,

Computes a I * self in place, where I is a Boolean little-endian representation of the scalar. Read more
Source§

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

Computes self + self.
Source§

fn scalar_mul_le<'a>( &self, bits: impl Iterator<Item = &'a Boolean<ConstraintF>>, ) -> Result<Self, SynthesisError>

Computes bits * self, where bits is a little-endian Boolean representation of a scalar.
Source§

fn precomputed_base_multiscalar_mul_le<'a, T, I, B>( bases: &[B], scalars: I, ) -> Result<Self, SynthesisError>
where T: 'a + ToBitsGadget<ConstraintF> + ?Sized, I: Iterator<Item = &'a T>, B: Borrow<[C]>,

Computes Σⱼ(scalarⱼ * baseⱼ) for all j, where scalarⱼ is a Boolean little-endian representation of the j-th scalar.
Source§

impl<P: TECurveConfig, F> Debug for AffineVar<P, F>
where for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>, F: Debug + FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<P, F> EqGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>

Source§

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

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

fn conditional_enforce_equal( &self, other: &Self, condition: &Boolean<<<P as CurveConfig>::BaseField as Field>::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 as CurveConfig>::BaseField as Field>::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<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Mul<&'a EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for &'a AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the * operator.
Source§

fn mul( self, other: &'a EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, ) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Mul<&'a EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the * operator.
Source§

fn mul( self, other: &'a EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, ) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Mul<EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for &'a AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the * operator.
Source§

fn mul( self, other: EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, ) -> Self::Output

Performs the * operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Mul<EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the * operator.
Source§

fn mul( self, other: EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, ) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> MulAssign<&'a EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

fn mul_assign( &mut self, other: &'a EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, )

Performs the *= operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> MulAssign<EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

fn mul_assign( &mut self, other: EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, )

Performs the *= operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Sub<&'a AffineVar<P, F>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Sub<AffineVar<P, F>> for &'a AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Sub<Projective<P>> for &'a AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Sub<Projective<P>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Sub for &'a AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> Sub for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

type Output = AffineVar<P, F>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> SubAssign<&'a AffineVar<P, F>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

fn sub_assign(&mut self, other: &'a AffineVar<P, F>)

Performs the -= operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> SubAssign<Projective<P>> for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

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

Performs the -= operation. Read more
Source§

impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TECurveConfig> SubAssign for AffineVar<P, F>
where for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,

Source§

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

Performs the -= operation. Read more
Source§

impl<P, F> ToBitsGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>

Source§

fn to_bits_le( &self, ) -> Result<Vec<Boolean<<<P as CurveConfig>::BaseField as Field>::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 as CurveConfig>::BaseField as Field>::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<P, F> ToBytesGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>

Source§

fn to_bytes_le( &self, ) -> Result<Vec<UInt8<<<P as CurveConfig>::BaseField as Field>::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 as CurveConfig>::BaseField as Field>::BasePrimeField>>, SynthesisError>

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

impl<P, F> ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>

Source§

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

Converts self to FpVar<ConstraintF> variables.
Source§

impl<'a, P, F> GroupOpsBounds<'a, Projective<P>, AffineVar<P, F>> for &'a AffineVar<P, F>

Source§

impl<'a, P, F> GroupOpsBounds<'a, Projective<P>, AffineVar<P, F>> for AffineVar<P, F>

Auto Trait Implementations§

§

impl<P, F> Freeze for AffineVar<P, F>
where &'a F: for<'a> Sized, F: Freeze,

§

impl<P, F> RefUnwindSafe for AffineVar<P, F>
where &'a F: for<'a> Sized, F: RefUnwindSafe, P: RefUnwindSafe,

§

impl<P, F> Send for AffineVar<P, F>
where &'a F: for<'a> Sized, F: Send,

§

impl<P, F> Sync for AffineVar<P, F>
where &'a F: for<'a> Sized, F: Sync,

§

impl<P, F> Unpin for AffineVar<P, F>
where &'a F: for<'a> Sized, F: Unpin, P: Unpin,

§

impl<P, F> UnwindSafe for AffineVar<P, F>
where &'a F: for<'a> Sized, F: 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