Struct ark_r1cs_std::groups::curves::twisted_edwards::AffineVar [−][src]
pub struct AffineVar<P: TEModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>, { pub x: F, pub y: F, // some fields omitted }
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
impl<P: TEModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> AffineVar<P, F> where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P: TEModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> AffineVar<P, F> where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
pub fn new_variable_omit_on_curve_check<T: Into<TEAffine<P>>>(
cs: impl Into<Namespace<<P::BaseField as Field>::BasePrimeField>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
pub fn new_variable_omit_on_curve_check<T: Into<TEAffine<P>>>(
cs: impl Into<Namespace<<P::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).
impl<P: TEModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField> + ThreeBitCondNegLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P: TEModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField> + ThreeBitCondNegLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
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
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<&'a AffineVar<P, F>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<&'a AffineVar<P, F>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<&'a AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<&'a AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<AffineVar<P, F>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<AffineVar<P, F>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<GroupProjective<P>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<GroupProjective<P>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<GroupProjective<P>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Add<GroupProjective<P>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> AddAssign<&'a AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> AddAssign<&'a AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
Performs the +=
operation. Read more
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> AddAssign<AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> AddAssign<AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
Performs the +=
operation. Read more
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> AddAssign<GroupProjective<P>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> AddAssign<GroupProjective<P>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
Performs the +=
operation. Read more
impl<P, F> AllocVar<GroupAffine<P>, <<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> AllocVar<GroupAffine<P>, <<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
fn new_variable<Point: Borrow<TEAffine<P>>>(
cs: impl Into<Namespace<<P::BaseField as Field>::BasePrimeField>>,
f: impl FnOnce() -> Result<Point, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
fn new_variable<Point: Borrow<TEAffine<P>>>(
cs: impl Into<Namespace<<P::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
. 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<P, F> AllocVar<GroupProjective<P>, <<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> AllocVar<GroupProjective<P>, <<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
fn new_variable<Point: Borrow<TEProjective<P>>>(
cs: impl Into<Namespace<<P::BaseField as Field>::BasePrimeField>>,
f: impl FnOnce() -> Result<Point, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
fn new_variable<Point: Borrow<TEProjective<P>>>(
cs: impl Into<Namespace<<P::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
. 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<P: TEModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> Clone for AffineVar<P, F> where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone,
impl<P: TEModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> Clone for AffineVar<P, F> where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone,
impl<P, F> CondSelectGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<P, F> CondSelectGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
fn conditionally_select(
cond: &Boolean<<P::BaseField as Field>::BasePrimeField>,
true_value: &Self,
false_value: &Self
) -> Result<Self, SynthesisError>
fn conditionally_select(
cond: &Boolean<<P::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
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<P, F> CurveVar<GroupProjective<P>, <<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> CurveVar<GroupProjective<P>, <<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
Enforce that self
is in the prime-order subgroup.
Does so by multiplying by the prime order, and checking that the result is unchanged.
Returns a constant with value v
. Read more
Returns a Boolean
representing whether self == Self::zero()
.
fn new_variable_omit_prime_order_check(
cs: impl Into<Namespace<<P::BaseField as Field>::BasePrimeField>>,
f: impl FnOnce() -> Result<TEProjective<P>, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
fn new_variable_omit_prime_order_check(
cs: impl Into<Namespace<<P::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. Read more
Sets self = self + self
.
Coputes -self
.
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::BaseField as Field>::BasePrimeField>>,
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::BaseField as Field>::BasePrimeField>>,
Computes a I * self
in place, where I
is a Boolean
little-endian
representation of the scalar. Read more
Computes self + self
.
fn scalar_mul_le<'a>(
&self,
bits: impl Iterator<Item = &'a Boolean<ConstraintF>>
) -> Result<Self, SynthesisError>
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. Read more
fn precomputed_base_multiscalar_mul_le<'a, T: ?Sized, I, B>(
bases: &[B],
scalars: I
) -> Result<Self, SynthesisError> where
T: 'a + ToBitsGadget<ConstraintF>,
I: Iterator<Item = &'a T>,
B: Borrow<[C]>,
fn precomputed_base_multiscalar_mul_le<'a, T: ?Sized, I, B>(
bases: &[B],
scalars: I
) -> Result<Self, SynthesisError> where
T: 'a + ToBitsGadget<ConstraintF>,
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. Read more
impl<P: TEModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> Debug for AffineVar<P, F> where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Debug,
impl<P: TEModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> Debug for AffineVar<P, F> where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Debug,
impl<P, F> EqGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<P, F> EqGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
fn is_eq(
&self,
other: &Self
) -> Result<Boolean<<P::BaseField as Field>::BasePrimeField>, SynthesisError>
fn is_eq(
&self,
other: &Self
) -> Result<Boolean<<P::BaseField as Field>::BasePrimeField>, SynthesisError>
Output a Boolean
value representing whether self.value() == other.value()
. Read more
fn conditional_enforce_equal(
&self,
other: &Self,
condition: &Boolean<<P::BaseField as Field>::BasePrimeField>
) -> Result<(), SynthesisError>
fn conditional_enforce_equal(
&self,
other: &Self,
condition: &Boolean<<P::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
fn conditional_enforce_not_equal(
&self,
other: &Self,
condition: &Boolean<<P::BaseField as Field>::BasePrimeField>
) -> Result<(), SynthesisError>
fn conditional_enforce_not_equal(
&self,
other: &Self,
condition: &Boolean<<P::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
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<P, F> R1CSVar<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> R1CSVar<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
type Value = TEProjective<P>
type Value = TEProjective<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, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<&'a AffineVar<P, F>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<&'a AffineVar<P, F>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<&'a AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<&'a AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<AffineVar<P, F>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<AffineVar<P, F>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<GroupProjective<P>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<GroupProjective<P>> for &'a AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<GroupProjective<P>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> Sub<GroupProjective<P>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> SubAssign<&'a AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> SubAssign<&'a AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
Performs the -=
operation. Read more
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> SubAssign<AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> SubAssign<AffineVar<P, F>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
Performs the -=
operation. Read more
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> SubAssign<GroupProjective<P>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>, P: TEModelParameters> SubAssign<GroupProjective<P>> for AffineVar<P, F> where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
Performs the -=
operation. Read more
impl<P, F> ToBitsGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<P, F> ToBitsGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
fn to_bits_le(
&self
) -> Result<Vec<Boolean<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
fn to_bits_le(
&self
) -> Result<Vec<Boolean<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
Outputs the canonical little-endian bit-wise representation of self
. Read more
fn to_non_unique_bits_le(
&self
) -> Result<Vec<Boolean<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
fn to_non_unique_bits_le(
&self
) -> Result<Vec<Boolean<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
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<P, F> ToBytesGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<P, F> ToBytesGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
fn to_bytes(
&self
) -> Result<Vec<UInt8<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
fn to_bytes(
&self
) -> Result<Vec<UInt8<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
Outputs a canonical, little-endian, byte decomposition of self
. Read more
fn to_non_unique_bytes(
&self
) -> Result<Vec<UInt8<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
fn to_non_unique_bytes(
&self
) -> Result<Vec<UInt8<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
Outputs a possibly non-unique byte decomposition of self
. Read more
impl<P, F> ToConstraintFieldGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: ToConstraintFieldGadget<<P::BaseField as Field>::BasePrimeField>,
impl<P, F> ToConstraintFieldGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: ToConstraintFieldGadget<<P::BaseField as Field>::BasePrimeField>,
fn to_constraint_field(
&self
) -> Result<Vec<FpVar<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
fn to_constraint_field(
&self
) -> Result<Vec<FpVar<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
Converts self
to FpVar<ConstraintF>
variables.
impl<'a, P, F> GroupOpsBounds<'a, GroupProjective<P>, AffineVar<P, F>> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, P, F> GroupOpsBounds<'a, GroupProjective<P>, AffineVar<P, F>> for &'a AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + TwoBitLookupGadget<<P::BaseField as Field>::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
Auto Trait Implementations
impl<P, F> RefUnwindSafe for AffineVar<P, F> where
F: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, F> UnwindSafe for AffineVar<P, F> where
F: 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