pub struct ProjectiveVar<P: SWCurveConfig, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>>{
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: SWCurveConfig, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> ProjectiveVar<P, F>
impl<P: SWCurveConfig, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> ProjectiveVar<P, 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 as CurveConfig>::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 as CurveConfig>::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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>
Source§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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add<Projective<P>> for &'a ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add<Projective<P>> for &'a ProjectiveVar<P, F>
Source§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
+
operator.Source§impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add<Projective<P>> for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add<Projective<P>> for ProjectiveVar<P, F>
Source§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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add<ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add<ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>
Source§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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add for &'a ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add for &'a ProjectiveVar<P, F>
Source§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
+
operator.Source§impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Add for ProjectiveVar<P, F>
Source§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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> AddAssign<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> AddAssign<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, 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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> AddAssign<Projective<P>> for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> AddAssign<Projective<P>> for ProjectiveVar<P, 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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> AddAssign for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> AddAssign for ProjectiveVar<P, 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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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 as CurveConfig>::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 as CurveConfig>::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§fn new_variable_with_inferred_mode<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>
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 moreSource§impl<P, F> AllocVar<Projective<P>, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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 as CurveConfig>::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 as CurveConfig>::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§fn new_variable_with_inferred_mode<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>
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 moreSource§impl<P: SWCurveConfig, F> Clone for ProjectiveVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone + FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
PhantomData<P>: Clone,
impl<P: SWCurveConfig, F> Clone for ProjectiveVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone + FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
PhantomData<P>: Clone,
Source§impl<P, F> CondSelectGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
Source§fn conditionally_select(
cond: &Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
true_value: &Self,
false_value: &Self,
) -> Result<Self, SynthesisError>
fn conditionally_select( cond: &Boolean<<<P as CurveConfig>::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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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 as CurveConfig>::BaseField as Field>::BasePrimeField>>,
) -> Result<Self, SynthesisError>
fn scalar_mul_le<'a>( &self, bits: impl Iterator<Item = &'a Boolean<<<P as CurveConfig>::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 as CurveConfig>::BaseField as Field>::BasePrimeField>, SynthesisError>
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<SWProjective<P>, SynthesisError>,
mode: AllocationMode,
) -> Result<Self, SynthesisError>
fn new_variable_omit_prime_order_check( cs: impl Into<Namespace<<<P as CurveConfig>::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 as CurveConfig>::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 as CurveConfig>::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>
fn precomputed_base_multiscalar_mul_le<'a, T, I, B>( bases: &[B], scalars: I, ) -> Result<Self, SynthesisError>
Computes
Σⱼ(scalarⱼ * baseⱼ)
for all j,
where scalarⱼ
is a Boolean
little-endian
representation of the j-th scalar.Source§impl<P: SWCurveConfig, F> Debug for ProjectiveVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Debug + FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
impl<P: SWCurveConfig, F> Debug for ProjectiveVar<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§impl<P, F> EqGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
Source§fn is_eq(
&self,
other: &Self,
) -> Result<Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>, SynthesisError>
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>
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 moreSource§fn conditional_enforce_not_equal(
&self,
other: &Self,
condition: &Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
) -> Result<(), SynthesisError>
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 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<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Mul<&'a EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for &'a ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Mul<&'a EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for &'a ProjectiveVar<P, F>
Source§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<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
fn mul( self, other: &'a EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, ) -> Self::Output
Performs the
*
operation. Read moreSource§impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Mul<&'a EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Mul<&'a EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for ProjectiveVar<P, F>
Source§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<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
fn mul( self, other: &'a EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, ) -> Self::Output
Performs the
*
operation. Read moreSource§impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Mul<EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for &'a ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Mul<EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for &'a ProjectiveVar<P, F>
Source§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<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
fn mul( self, other: EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, ) -> Self::Output
Performs the
*
operation. Read moreSource§impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Mul<EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Mul<EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for ProjectiveVar<P, F>
Source§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<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
fn mul( self, other: EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, ) -> Self::Output
Performs the
*
operation. Read moreSource§impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> MulAssign<&'a EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> MulAssign<&'a EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for ProjectiveVar<P, F>
Source§fn mul_assign(
&mut self,
other: &'a EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
)
fn mul_assign( &mut self, other: &'a EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, )
Performs the
*=
operation. Read moreSource§impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> MulAssign<EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> MulAssign<EmulatedFpVar<<P as CurveConfig>::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>> for ProjectiveVar<P, F>
Source§fn mul_assign(
&mut self,
other: EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
)
fn mul_assign( &mut self, other: EmulatedFpVar<P::ScalarField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, )
Performs the
*=
operation. Read moreSource§impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>
Source§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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub<Projective<P>> for &'a ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub<Projective<P>> for &'a ProjectiveVar<P, F>
Source§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
-
operator.Source§impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub<Projective<P>> for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub<Projective<P>> for ProjectiveVar<P, F>
Source§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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub<ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub<ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>
Source§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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub for &'a ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub for &'a ProjectiveVar<P, F>
Source§type Output = ProjectiveVar<P, F>
type Output = ProjectiveVar<P, F>
The resulting type after applying the
-
operator.Source§impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> Sub for ProjectiveVar<P, F>
Source§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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> SubAssign<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, F>
impl<'a, F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> SubAssign<&'a ProjectiveVar<P, F>> for ProjectiveVar<P, 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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> SubAssign<Projective<P>> for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> SubAssign<Projective<P>> for ProjectiveVar<P, 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 as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> SubAssign for ProjectiveVar<P, F>
impl<F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>, P: SWCurveConfig> SubAssign for ProjectiveVar<P, 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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
Source§fn to_bits_le(
&self,
) -> Result<Vec<Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, SynthesisError>
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 moreSource§fn to_non_unique_bits_le(
&self,
) -> Result<Vec<Boolean<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, SynthesisError>
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 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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
Source§fn to_bytes_le(
&self,
) -> Result<Vec<UInt8<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, SynthesisError>
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 moreSource§fn to_non_unique_bytes_le(
&self,
) -> Result<Vec<UInt8<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, SynthesisError>
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 moreSource§impl<P, F> ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + ToConstraintFieldGadget<<<P as CurveConfig>::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: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField> + ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
Source§fn to_constraint_field(
&self,
) -> Result<Vec<FpVar<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, SynthesisError>
fn to_constraint_field( &self, ) -> Result<Vec<FpVar<<<P as CurveConfig>::BaseField as Field>::BasePrimeField>>, SynthesisError>
Converts
self
to FpVar<ConstraintF>
variables.impl<'a, P, F> GroupOpsBounds<'a, Projective<P>, ProjectiveVar<P, F>> for &'a ProjectiveVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<'a, P, F> GroupOpsBounds<'a, Projective<P>, ProjectiveVar<P, F>> for ProjectiveVar<P, F>where
P: SWCurveConfig,
F: FieldVar<P::BaseField, <<P as CurveConfig>::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
Auto Trait Implementations§
impl<P, F> Freeze for ProjectiveVar<P, F>
impl<P, F> RefUnwindSafe for ProjectiveVar<P, F>
impl<P, F> Send for ProjectiveVar<P, F>
impl<P, F> Sync for ProjectiveVar<P, F>
impl<P, F> Unpin for ProjectiveVar<P, F>
impl<P, F> UnwindSafe for ProjectiveVar<P, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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