[][src]Struct k256::arithmetic::AffinePoint

pub struct AffinePoint { /* fields omitted */ }
This is supported on feature="arithmetic" only.

A point on the secp256k1 curve in affine coordinates.

Implementations

impl AffinePoint[src]

pub fn generator() -> AffinePoint[src]

This is supported on feature="arithmetic" only.

Returns the base point of SECP256k1.

pub fn from_pubkey(pubkey: &PublicKey) -> CtOption<Self>[src]

This is supported on feature="arithmetic" only.

Attempts to parse the given PublicKey as an SEC-1-encoded AffinePoint.

Returns

None value if pubkey is not on the secp256k1 curve.

pub fn to_compressed_pubkey(&self) -> CompressedCurvePoint<Secp256k1>[src]

This is supported on feature="arithmetic" only.

Returns the SEC-1 compressed encoding of this point.

pub fn to_uncompressed_pubkey(&self) -> UncompressedCurvePoint<Secp256k1>[src]

This is supported on feature="arithmetic" only.

Returns the SEC-1 uncompressed encoding of this point.

Trait Implementations

impl<'_, '_> Add<&'_ AffinePoint> for &'_ ProjectivePoint[src]

type Output = ProjectivePoint

The resulting type after applying the + operator.

impl<'_> Add<&'_ AffinePoint> for ProjectivePoint[src]

type Output = ProjectivePoint

The resulting type after applying the + operator.

impl AddAssign<AffinePoint> for ProjectivePoint[src]

impl Clone for AffinePoint[src]

impl ConditionallySelectable for AffinePoint[src]

impl ConstantTimeEq for AffinePoint[src]

impl Copy for AffinePoint[src]

impl Debug for AffinePoint[src]

impl Eq for AffinePoint[src]

impl From<AffinePoint> for ProjectivePoint[src]

impl Neg for AffinePoint[src]

type Output = AffinePoint

The resulting type after applying the - operator.

impl PartialEq<AffinePoint> for AffinePoint[src]

impl<'_, '_> Sub<&'_ AffinePoint> for &'_ ProjectivePoint[src]

type Output = ProjectivePoint

The resulting type after applying the - operator.

impl<'_> Sub<&'_ AffinePoint> for ProjectivePoint[src]

type Output = ProjectivePoint

The resulting type after applying the - operator.

impl SubAssign<AffinePoint> for ProjectivePoint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.