Trait ark_ec::ProjectiveCurve[][src]

pub trait ProjectiveCurve: Eq + 'static + Sized + ToBytes + FromBytes + CanonicalSerialize + CanonicalDeserialize + Copy + Clone + Default + Send + Sync + Hash + Debug + Display + UniformRand + Zeroize + Zero + Neg<Output = Self> + Add<Self, Output = Self> + Sub<Self, Output = Self> + AddAssign<Self> + SubAssign<Self> + MulAssign<Self::ScalarField> + for<'a> Add<&'a Self, Output = Self> + for<'a> Sub<&'a Self, Output = Self> + for<'a> AddAssign<&'a Self> + for<'a> SubAssign<&'a Self> + Sum<Self> + for<'a> Sum<&'a Self> + From<Self::Affine> {
    type ScalarField: PrimeField + SquareRootField;
    type BaseField: Field;
    type Affine: AffineCurve<Projective = Self, ScalarField = Self::ScalarField, BaseField = Self::BaseField> + From<Self> + Into<Self>;

    const COFACTOR: &'static [u64];

#[must_use]    fn prime_subgroup_generator() -> Self;
fn batch_normalization(v: &mut [Self]);
#[must_use] fn is_normalized(&self) -> bool;
fn double_in_place(&mut self) -> &mut Self;
fn add_assign_mixed(&mut self, other: &Self::Affine); fn batch_normalization_into_affine(v: &[Self]) -> Vec<Self::Affine> { ... }
#[must_use] fn double(&self) -> Self { ... }
fn into_affine(&self) -> Self::Affine { ... }
fn add_mixed(self, other: &Self::Affine) -> Self { ... }
fn mul<S: AsRef<[u64]>>(self, other: S) -> Self { ... } }

Projective representation of an elliptic curve point guaranteed to be in the correct prime order subgroup.

Associated Types

type ScalarField: PrimeField + SquareRootField[src]

type BaseField: Field[src]

type Affine: AffineCurve<Projective = Self, ScalarField = Self::ScalarField, BaseField = Self::BaseField> + From<Self> + Into<Self>[src]

Loading content...

Associated Constants

const COFACTOR: &'static [u64][src]

Loading content...

Required methods

#[must_use]fn prime_subgroup_generator() -> Self[src]

Returns a fixed generator of unknown exponent.

fn batch_normalization(v: &mut [Self])[src]

Normalizes a slice of projective elements so that conversion to affine is cheap.

#[must_use]fn is_normalized(&self) -> bool[src]

Checks if the point is already “normalized” so that cheap affine conversion is possible.

fn double_in_place(&mut self) -> &mut Self[src]

Doubles this element in place.

fn add_assign_mixed(&mut self, other: &Self::Affine)[src]

Set self to be self + other, where other: Self::Affine. This is usually faster than adding other in projective form.

Loading content...

Provided methods

fn batch_normalization_into_affine(v: &[Self]) -> Vec<Self::Affine>[src]

Normalizes a slice of projective elements and outputs a vector containing the affine equivalents.

#[must_use]fn double(&self) -> Self[src]

Doubles this element.

fn into_affine(&self) -> Self::Affine[src]

Converts self into the affine representation.

fn add_mixed(self, other: &Self::Affine) -> Self[src]

Set self to be self + other, where other: Self::Affine. This is usually faster than adding other in projective form.

fn mul<S: AsRef<[u64]>>(self, other: S) -> Self[src]

Performs scalar multiplication of this element.

Loading content...

Implementors

impl<P: Parameters> ProjectiveCurve for ark_ec::models::short_weierstrass_jacobian::GroupProjective<P>[src]

type BaseField = P::BaseField

type ScalarField = P::ScalarField

type Affine = GroupAffine<P>

impl<P: Parameters> ProjectiveCurve for ark_ec::models::twisted_edwards_extended::GroupProjective<P>[src]

type BaseField = P::BaseField

type ScalarField = P::ScalarField

type Affine = GroupAffine<P>

Loading content...