Struct ark_r1cs_std::groups::curves::short_weierstrass::ProjectiveVar
source · pub struct ProjectiveVar<P: SWModelParameters, 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,
pub z: F,
/* private fields */
}
Expand description
An implementation of arithmetic for Short Weierstrass curves that relies on the complete formulae derived in the paper of [Renes, Costello, Batina 2015].
Fields§
§x: F
The x-coordinate.
y: F
The y-coordinate.
z: F
The z-coordinate.
Implementations§
source§impl<P: SWModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> ProjectiveVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P: SWModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>> ProjectiveVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
sourcepub fn to_affine(&self) -> Result<AffineVar<P, F>, SynthesisError>
pub fn to_affine(&self) -> Result<AffineVar<P, F>, SynthesisError>
Convert this point into affine form.
sourcepub fn new_variable_omit_on_curve_check(
cs: impl Into<Namespace<<P::BaseField as Field>::BasePrimeField>>,
f: impl FnOnce() -> Result<SWProjective<P>, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
pub fn new_variable_omit_on_curve_check(
cs: impl Into<Namespace<<P::BaseField as Field>::BasePrimeField>>,
f: impl FnOnce() -> Result<SWProjective<P>, 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).
Trait Implementations§
source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<&'a ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<&'a ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
+
operator.source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<Projective<P>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<Projective<P>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
+
operator.source§impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<Projective<P>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<Projective<P>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
+
operator.source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
+
operator.source§impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Add<ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
+
operator.source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> AddAssign<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> AddAssign<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
source§fn add_assign(&mut self, other: &'a ProjectiveVar<P, F>)
fn add_assign(&mut self, other: &'a ProjectiveVar<P, F>)
Performs the
+=
operation. Read moresource§impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> AddAssign<Projective<P>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> AddAssign<Projective<P>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
source§fn add_assign(&mut self, other: SWProjective<P>)
fn add_assign(&mut self, other: SWProjective<P>)
Performs the
+=
operation. Read moresource§impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> AddAssign<ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> AddAssign<ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
source§fn add_assign(&mut self, other: ProjectiveVar<P, F>)
fn add_assign(&mut self, other: ProjectiveVar<P, F>)
Performs the
+=
operation. Read moresource§impl<P, F> AllocVar<Affine<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> AllocVar<Affine<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
source§fn new_variable<T: Borrow<SWAffine<P>>>(
cs: impl Into<Namespace<<P::BaseField as Field>::BasePrimeField>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
fn new_variable<T: Borrow<SWAffine<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 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>
fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>
) -> Result<Self, SynthesisError>
source§fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
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>
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§impl<P, F> AllocVar<Projective<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> AllocVar<Projective<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
source§fn new_variable<T: Borrow<SWProjective<P>>>(
cs: impl Into<Namespace<<P::BaseField as Field>::BasePrimeField>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
fn new_variable<T: Borrow<SWProjective<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 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>
fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>
) -> Result<Self, SynthesisError>
source§fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
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>
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§impl<P: SWModelParameters, F> Clone for ProjectiveVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone + FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
impl<P: SWModelParameters, F> Clone for ProjectiveVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone + FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
source§impl<P, F> CondSelectGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> CondSelectGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
source§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>
source§fn conditionally_select_power_of_two_vector(
position: &[Boolean<ConstraintF>],
values: &[Self]
) -> Result<Self, SynthesisError>
fn conditionally_select_power_of_two_vector(
position: &[Boolean<ConstraintF>],
values: &[Self]
) -> Result<Self, SynthesisError>
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 moresource§impl<P, F> CurveVar<Projective<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> CurveVar<Projective<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
source§fn enforce_prime_order(&self) -> Result<(), SynthesisError>
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 scalar_mul_le<'a>(
&self,
bits: impl Iterator<Item = &'a Boolean<<P::BaseField as Field>::BasePrimeField>>
) -> Result<Self, SynthesisError>
fn scalar_mul_le<'a>(
&self,
bits: impl Iterator<Item = &'a Boolean<<P::BaseField as Field>::BasePrimeField>>
) -> Result<Self, SynthesisError>
Computes bits * self
, where bits
is a little-endian
Boolean
representation of a scalar.
source§fn constant(g: SWProjective<P>) -> Self
fn constant(g: SWProjective<P>) -> Self
Returns a constant with value
v
. Read moresource§fn is_zero(
&self
) -> Result<Boolean<<P::BaseField as Field>::BasePrimeField>, SynthesisError>
fn is_zero(
&self
) -> Result<Boolean<<P::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::BaseField as Field>::BasePrimeField>>,
f: impl FnOnce() -> Result<SWProjective<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<SWProjective<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>
fn double_in_place(&mut self) -> Result<(), SynthesisError>
Sets
self = self + self
.source§fn negate(&self) -> Result<Self, SynthesisError>
fn negate(&self) -> Result<Self, SynthesisError>
Coputes
-self
.source§fn precomputed_base_scalar_mul_le<'a, I, B>(
&mut self,
scalar_bits_with_bases: I
) -> Result<(), SynthesisError>where
I: Iterator<Item = (B, &'a SWProjective<P>)>,
B: Borrow<Boolean<<P::BaseField as Field>::BasePrimeField>>,
fn precomputed_base_scalar_mul_le<'a, I, B>(
&mut self,
scalar_bits_with_bases: I
) -> Result<(), SynthesisError>where
I: Iterator<Item = (B, &'a SWProjective<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 moresource§fn double(&self) -> Result<Self, SynthesisError>
fn double(&self) -> Result<Self, SynthesisError>
Computes
self + self
.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]>,
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: SWModelParameters, F> Debug for ProjectiveVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Debug + FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
impl<P: SWModelParameters, F> Debug for ProjectiveVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Debug + FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
source§impl<P, F> EqGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> EqGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
source§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()
.source§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 moresource§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 moresource§fn enforce_equal(&self, other: &Self) -> Result<(), SynthesisError>
fn enforce_equal(&self, other: &Self) -> Result<(), SynthesisError>
source§fn enforce_not_equal(&self, other: &Self) -> Result<(), SynthesisError>
fn enforce_not_equal(&self, other: &Self) -> Result<(), SynthesisError>
source§impl<P, F> R1CSVar<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> R1CSVar<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
§type Value = Projective<P>
type Value = Projective<P>
The type of the “native” value that
Self
represents in the constraint
system.source§fn cs(&self) -> ConstraintSystemRef<<P::BaseField as Field>::BasePrimeField>
fn cs(&self) -> ConstraintSystemRef<<P::BaseField as Field>::BasePrimeField>
Returns the underlying
ConstraintSystemRef
. Read moresource§fn value(&self) -> Result<Self::Value, SynthesisError>
fn value(&self) -> Result<Self::Value, SynthesisError>
Returns the value that is assigned to
self
in the underlying
ConstraintSystem
.source§fn is_constant(&self) -> bool
fn is_constant(&self) -> bool
Returns
true
if self
is a circuit-generation-time constant.source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<&'a ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<&'a ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
-
operator.source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<Projective<P>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<Projective<P>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
-
operator.source§impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<Projective<P>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<Projective<P>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
-
operator.source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
-
operator.source§impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> Sub<ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
-
operator.source§impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> SubAssign<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> SubAssign<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
source§fn sub_assign(&mut self, other: &'a ProjectiveVar<P, F>)
fn sub_assign(&mut self, other: &'a ProjectiveVar<P, F>)
Performs the
-=
operation. Read moresource§impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> SubAssign<Projective<P>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> SubAssign<Projective<P>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
source§fn sub_assign(&mut self, other: SWProjective<P>)
fn sub_assign(&mut self, other: SWProjective<P>)
Performs the
-=
operation. Read moresource§impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> SubAssign<ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>, P: SWModelParameters> SubAssign<ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
source§fn sub_assign(&mut self, other: ProjectiveVar<P, F>)
fn sub_assign(&mut self, other: ProjectiveVar<P, F>)
Performs the
-=
operation. Read moresource§impl<P, F> ToBitsGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> ToBitsGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
source§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 moresource§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 moresource§fn to_bits_be(&self) -> Result<Vec<Boolean<F>>, SynthesisError>
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>
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 ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> ToBytesGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
source§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 moresource§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 moresource§impl<P, F> ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + ToConstraintFieldGadget<<P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + ToConstraintFieldGadget<<P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
source§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.