[][src]Struct elliptic_curve::weierstrass::point::CompressedPoint

pub struct CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
{ /* fields omitted */ }
This is supported on feature="weierstrass" only.

Compressed elliptic curve points serialized according to the Elliptic-Curve-Point-to-Octet-String algorithm.

See section 2.3.3 of SEC 1: Elliptic Curve Cryptography (Version 2.0):

https://www.secg.org/sec1-v2.pdf

Implementations

impl<C> CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

pub fn from_affine_coords(x: &ElementBytes<C>, y: &ElementBytes<C>) -> Self[src]

This is supported on feature="weierstrass" only.

Compress and serialize an elliptic curve point from its affine coordinates

pub fn from_bytes<B>(into_bytes: B) -> Option<Self> where
    B: Into<GenericArray<u8, CompressedPointSize<C>>>, 
[src]

This is supported on feature="weierstrass" only.

Create a new compressed elliptic curve point

pub fn as_bytes(&self) -> &[u8][src]

This is supported on feature="weierstrass" only.

Borrow byte slice containing compressed curve point

pub fn into_bytes(self) -> GenericArray<u8, CompressedPointSize<C>>[src]

This is supported on feature="weierstrass" only.

Obtain owned array containing compressed curve point

Trait Implementations

impl<C> AsRef<[u8]> for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C> Clone for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C: Curve> Copy for CompressedPoint<C> where
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>,
    <CompressedPointSize<C> as ArrayLength<u8>>::ArrayType: Copy
[src]

impl<C: Eq> Eq for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C> From<CompressedPoint<C>> for PublicKey<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    <C::ElementSize as Add>::Output: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>,
    UncompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C: Hash> Hash for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C: Ord> Ord for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C: PartialEq> PartialEq<CompressedPoint<C>> for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C: PartialOrd> PartialOrd<CompressedPoint<C>> for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C> StructuralEq for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C> StructuralPartialEq for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

impl<C> Zeroize for CompressedPoint<C> where
    C: Curve,
    C::ElementSize: Add<U1>,
    CompressedPointSize<C>: ArrayLength<u8>, 
[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for CompressedPoint<C> where
    <<<C as Curve>::ElementSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe

impl<C> Send for CompressedPoint<C>

impl<C> Sync for CompressedPoint<C>

impl<C> Unpin for CompressedPoint<C> where
    <<<C as Curve>::ElementSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: Unpin

impl<C> UnwindSafe for CompressedPoint<C> where
    <<<C as Curve>::ElementSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe

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.

impl<Z> Zeroize for Z where
    Z: DefaultIsZeroes
[src]