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 + Sum<Self> + for<'a> Sum<&'a Self> + 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 { ... } }
Expand description

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

Associated Types

Associated Constants

Required methods

Returns a fixed generator of unknown exponent.

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.

Performs scalar multiplication of this element with mixed addition.

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

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

Provided methods

Converts self into the projective representation.

Multiply this element by the cofactor.

Implementors