pub trait AffineRepr: Eq + 'static + Sized + CanonicalSerialize + CanonicalDeserialize + Copy + Clone + Default + UniformRand + Send + Sync + Hash + Debug + Display + Zeroize + From<Self::Group> + Into<Self::Group> + Add<Self, Output = Self::Group> + for<'a> Add<&'a Self, Output = Self::Group> + Add<Self::Group, Output = Self::Group> + for<'a> Add<&'a Self::Group, Output = Self::Group> + Mul<Self::ScalarField, Output = Self::Group> + for<'a> Mul<&'a Self::ScalarField, Output = Self::Group> {
    type Config: CurveConfig<ScalarField = Self::ScalarField, BaseField = Self::BaseField>;
    type ScalarField: PrimeField + Into<<Self::ScalarField as PrimeField>::BigInt>;
    type BaseField: Field;
    type Group: CurveGroup<Config = Self::Config, Affine = Self, ScalarField = Self::ScalarField, BaseField = Self::BaseField> + From<Self> + Into<Self> + MulAssign<Self::ScalarField>;

Show 13 methods fn xy(&self) -> Option<(&Self::BaseField, &Self::BaseField)>; fn zero() -> Self; fn generator() -> Self; fn from_random_bytes(bytes: &[u8]) -> Option<Self>; fn mul_bigint(&self, by: impl AsRef<[u64]>) -> Self::Group; fn clear_cofactor(&self) -> Self; fn mul_by_cofactor_to_group(&self) -> Self::Group; fn x(&self) -> Option<&Self::BaseField> { ... } fn y(&self) -> Option<&Self::BaseField> { ... } fn is_zero(&self) -> bool { ... } fn into_group(self) -> Self::Group { ... } fn mul_by_cofactor(&self) -> Self { ... } fn mul_by_cofactor_inv(&self) -> Self { ... }
}
Expand description

The canonical representation of an elliptic curve group element. This should represent the affine coordinates of the point corresponding to this group element.

The point is guaranteed to be in the correct prime order subgroup.

Required Associated Types

The finite field over which this curve is defined.

The projective representation of points on this curve.

Required Methods

Returns the x and y coordinates of this affine point.

Returns the point at infinity.

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.

Performs cofactor clearing. The default method is simply to multiply by the cofactor. For some curve families more efficient methods exist.

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

Provided Methods

Returns the x coordinate of this affine point.

Returns the y coordinate of this affine point.

Is self the point at infinity?

Converts self into the projective representation.

Multiplies this element by the cofactor.

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

Implementors