[][src]Enum signatory::EcdsaPublicKey

pub enum EcdsaPublicKey<C: WeierstrassCurve> {
    Compressed(CompressedCurvePoint<C>),
    Uncompressed(UncompressedCurvePoint<C>),
}

ECDSA public keys

Variants

Compressed Weierstrass elliptic curve point

Uncompressed Weierstrass elliptic curve point

Methods

impl<C> PublicKey<C> where
    C: WeierstrassCurve
[src]

Create an ECDSA public key from an elliptic curve point (compressed or uncompressed) encoded using the Elliptic-Curve-Point-to-Octet-String algorithm described in SEC 1: Elliptic Curve Cryptography (Version 2.0) section 2.3.3 (page 10).

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

Create an ECDSA public key from an compressed elliptic curve point encoded using the Elliptic-Curve-Point-to-Octet-String algorithm described in SEC 1: Elliptic Curve Cryptography (Version 2.0) section 2.3.3 (page 10).

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

Create an ECDSA public key from a raw uncompressed point serialized as a bytestring, without a 0x04-byte tag.

This will be twice the modulus size, or 1-byte smaller than the Elliptic-Curve-Point-to-Octet-String encoding i.e with the leading 0x04 byte in that encoding removed.

Important traits for &'a mut [u8]

Obtain public key as a byte array reference

Trait Implementations

impl<C> Decode for PublicKey<C> where
    C: WeierstrassCurve
[src]

Decode an ECDSA public key from an elliptic curve point (compressed or uncompressed) encoded using given Encoding with the underlying bytes serialized using the Elliptic-Curve-Point-to-Octet-String algorithm described in SEC 1: Elliptic Curve Cryptography (Version 2.0) section 2.3.3 (page 10).

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

Decode the given string-alike type with the provided Encoding, returning the decoded value or a Error. Read more

Decode the data read from the given io::Read type with the provided Encoding, returning the decoded value or a Error. Read more

Read a file at the given path, decoding the data it contains using the provided Encoding, returning the decoded value or a Error. Read more

impl<C> Encode for PublicKey<C> where
    C: WeierstrassCurve
[src]

Important traits for Vec<u8>

Encode this ECDSA public key (compressed or uncompressed) encoded using given Encoding with the underlying bytes serialized using the Elliptic-Curve-Point-to-Octet-String algorithm described in SEC 1: Elliptic Curve Cryptography (Version 2.0) section 2.3.3 (page 10).

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

Encode self to a String using the provided Encoding, returning the encoded value or a Error. Read more

Encode self with the given Encoding, writing the result to the supplied io::Write type, returning the number of bytes written or a Error. Read more

Encode self and write it to a file at the given path, returning the resulting File or a Error. Read more

impl<C: WeierstrassCurve> PublicKey for PublicKey<C>
[src]

impl<C: PartialEq + WeierstrassCurve> PartialEq<PublicKey<C>> for PublicKey<C>
[src]

impl<C: Eq + WeierstrassCurve> Eq for PublicKey<C>
[src]

impl<C> Debug for PublicKey<C> where
    C: WeierstrassCurve
[src]

impl<C: Clone + WeierstrassCurve> Clone for PublicKey<C>
[src]

Performs copy-assignment from source. Read more

impl<C> AsRef<[u8]> for PublicKey<C> where
    C: WeierstrassCurve
[src]

Auto Trait Implementations

Blanket Implementations

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> From for T
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

impl<T> Same for T

Should always be Self