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
type ScalarField: PrimeField + SquareRootField + Into<<Self::ScalarField as PrimeField>::BigInt>
[src]type Projective: ProjectiveCurve<Affine = Self, ScalarField = Self::ScalarField, BaseField = Self::BaseField> + From<Self> + Into<Self> + MulAssign<Self::ScalarField>
[src]Associated Constants
Required methods
#[must_use]fn prime_subgroup_generator() -> Self
[src]
#[must_use]fn prime_subgroup_generator() -> Self
[src]Returns a fixed generator of unknown exponent.
fn from_random_bytes(bytes: &[u8]) -> Option<Self>
[src]
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]
#[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]
#[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]
#[must_use]fn mul_by_cofactor_inv(&self) -> Self
[src]Multiply this element by the inverse of the cofactor in
Self::ScalarField
.
Provided methods
fn into_projective(&self) -> Self::Projective
[src]
fn into_projective(&self) -> Self::Projective
[src]Converts self into the projective representation.
#[must_use]fn mul_by_cofactor(&self) -> Self
[src]
#[must_use]fn mul_by_cofactor(&self) -> Self
[src]Multiply this element by the cofactor.
Implementors
type ScalarField = P::ScalarField
type Projective = GroupProjective<P>
fn mul<S: Into<<Self::ScalarField as PrimeField>::BigInt>>(
&self,
by: S
) -> GroupProjective<P>
[src]type ScalarField = P::ScalarField
type Projective = GroupProjective<P>
fn mul<S: Into<<Self::ScalarField as PrimeField>::BigInt>>(
&self,
by: S
) -> GroupProjective<P>
[src]