pub trait ProjectiveCurve: 'static + CanonicalSerialize + CanonicalDeserialize + Copy + Clone + Debug + Display + Default + FromBytes + Send + Sync + Eq + Hash + Neg<Output = Self> + Uniform + Zero + Add<Self, Output = Self, Output = Self> + Sub<Self, Output = Self, Output = Self> + Mul<Self::ScalarField, Output = Self> + AddAssign<Self> + SubAssign<Self> + MulAssign<Self::ScalarField> + for<'a> Add<&'a Self> + for<'a> Sub<&'a Self> + for<'a> AddAssign<&'a Self> + for<'a> SubAssign<&'a Self> + PartialEq<Self::Affine> + ToBytes + Sum<Self> + From<Self::Affine> {
type Affine: AffineCurve + From<Self> + Into<Self>
where
<Self::Affine as AffineCurve>::Projective == Self,
<Self::Affine as AffineCurve>::ScalarField == Self::ScalarField;
type BaseField: Field;
type ScalarField: PrimeField + SquareRootField + Into<<Self::ScalarField as PrimeField>::BigInteger>;
fn prime_subgroup_generator() -> Self;
fn batch_normalization(v: &mut [Self]);
fn is_normalized(&self) -> bool;
fn add_assign_mixed(&mut self, other: &Self::Affine);
fn double(&self) -> Self;
fn double_in_place(&mut self);
fn to_affine(&self) -> Self::Affine;
fn batch_normalization_into_affine(
v: Vec<Self, Global>
) -> Vec<Self::Affine, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
{ ... }
fn add_mixed(&self, other: &Self::Affine) -> Self { ... }
fn sub_assign_mixed(&mut self, other: &Self::Affine) { ... }
}
Expand description
Projective representation of an elliptic curve point guaranteed to be in the prime order subgroup.
Required Associated Types
sourcetype Affine: AffineCurve + From<Self> + Into<Self>
type Affine: AffineCurve + From<Self> + Into<Self>
where
<Self::Affine as AffineCurve>::Projective == Self,
<Self::Affine as AffineCurve>::ScalarField == Self::ScalarField
source
type ScalarField: PrimeField + SquareRootField + Into<<Self::ScalarField as PrimeField>::BigInteger>
Required Methods
sourcefn prime_subgroup_generator() -> Self
fn prime_subgroup_generator() -> Self
Returns a fixed generator of unknown exponent.
sourcefn batch_normalization(v: &mut [Self])
fn batch_normalization(v: &mut [Self])
Normalizes a slice of projective elements so that conversion to affine is cheap.
sourcefn is_normalized(&self) -> bool
fn is_normalized(&self) -> bool
Checks if the point is already “normalized” so that cheap affine conversion is possible.
sourcefn add_assign_mixed(&mut self, other: &Self::Affine)
fn add_assign_mixed(&mut self, other: &Self::Affine)
Adds an affine element to this element.
sourcefn double_in_place(&mut self)
fn double_in_place(&mut self)
Sets self := self + self
.
Provided Methods
Normalizes a slice of projective elements and outputs a vector containing the affine equivalents.
sourcefn sub_assign_mixed(&mut self, other: &Self::Affine)
fn sub_assign_mixed(&mut self, other: &Self::Affine)
Adds an affine element to this element.