Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

FromEncodedPoint

Trait FromEncodedPoint 

Source
pub trait FromEncodedPoint<C>: Sized{
    // Required method
    fn from_encoded_point(
        point: &EncodedPoint<<C as Curve>::FieldBytesSize>,
    ) -> CtOption<Self>;
}
Expand description

Trait for deserializing a value from a SEC1 encoded curve point.

This is intended for use with the AffinePoint type for a given elliptic curve.

Required Methods§

Source

fn from_encoded_point( point: &EncodedPoint<<C as Curve>::FieldBytesSize>, ) -> CtOption<Self>

Deserialize the type this trait is impl’d on from an EncodedPoint.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<C> FromEncodedPoint<C> for AffinePoint<C>

Source§

fn from_encoded_point( encoded_point: &EncodedPoint<<C as Curve>::FieldBytesSize>, ) -> CtOption<AffinePoint<C>>

Attempts to parse the given EncodedPoint as an SEC1-encoded AffinePoint.

§Returns

None value if encoded_point is not on the secp384r1 curve.

Source§

impl<C> FromEncodedPoint<C> for ProjectivePoint<C>

Implementors§

Source§

impl<C> FromEncodedPoint<C> for PublicKey<C>

Available on crate feature sec1 only.