Trait ark_ec::AffineCurve[][src]

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

    const COFACTOR: &'static [u64];

#[must_use]    fn prime_subgroup_generator() -> Self;
fn from_random_bytes(bytes: &[u8]) -> Option<Self>;
#[must_use] fn mul<S: Into<<Self::ScalarField as PrimeField>::BigInt>>(
        &self,
        other: S
    ) -> Self::Projective;
#[must_use] fn mul_by_cofactor_to_projective(&self) -> Self::Projective;
#[must_use] fn mul_by_cofactor_inv(&self) -> Self; fn into_projective(&self) -> Self::Projective { ... }
#[must_use] fn mul_by_cofactor(&self) -> Self { ... } }

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

Associated Types

type ScalarField: PrimeField + SquareRootField + Into<<Self::ScalarField as PrimeField>::BigInt>[src]

type BaseField: Field[src]

type Projective: ProjectiveCurve<Affine = Self, ScalarField = Self::ScalarField, BaseField = Self::BaseField> + From<Self> + Into<Self> + MulAssign<Self::ScalarField>[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 from_random_bytes(bytes: &[u8]) -> Option<Self>[src]

Returns a group element if the set of bytes forms a valid group element, otherwise returns None. This function is primarily intended for sampling random group elements from a hash-function or RNG output.

#[must_use]fn mul<S: Into<<Self::ScalarField as PrimeField>::BigInt>>(
    &self,
    other: S
) -> Self::Projective
[src]

Performs scalar multiplication of this element with mixed addition.

#[must_use]fn mul_by_cofactor_to_projective(&self) -> Self::Projective[src]

Multiply this element by the cofactor and output the resulting projective element.

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

Multiply this element by the inverse of the cofactor in Self::ScalarField.

Loading content...

Provided methods

fn into_projective(&self) -> Self::Projective[src]

Converts self into the projective representation.

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

Multiply this element by the cofactor.

Loading content...

Implementors

impl<P: Parameters> AffineCurve for ark_ec::models::short_weierstrass_jacobian::GroupAffine<P>[src]

type BaseField = P::BaseField

type ScalarField = P::ScalarField

type Projective = GroupProjective<P>

impl<P: Parameters> AffineCurve for ark_ec::models::twisted_edwards_extended::GroupAffine<P>[src]

type BaseField = P::BaseField

type ScalarField = P::ScalarField

type Projective = GroupProjective<P>

Loading content...