Struct stdtx::VerifyingKey [−][src]
pub struct VerifyingKey { /* fields omitted */ }
Expand description
ECDSA/secp256k1 verification key (i.e. public key)
serde
support
When the serde
feature of this crate is enabled, the Serialize
and
Deserialize
traits are impl’d for this type.
The serialization is binary-oriented and supports ASN.1 DER-encoded X.509 Subject Public Key Info (SPKI) as the encoding format.
For a more text-friendly encoding of public keys, use
[elliptic_curve::JwkEcKey
] instead.
Implementations
Initialize VerifyingKey
from a SEC1-encoded public key.
pub fn from_encoded_point(
public_key: &EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>
) -> Result<VerifyingKey, Error>
pub fn from_encoded_point(
public_key: &EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>
) -> Result<VerifyingKey, Error>
Initialize VerifyingKey
from a SEC1 EncodedPoint
.
Trait Implementations
Deserialize object from ASN.1 DER-encoded SubjectPublicKeyInfo
(binary format). Read more
Deserialize SPKI public key from a PublicKeyDocument
.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
pub fn to_encoded_point(
&self,
compress: bool
) -> EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>
pub fn to_encoded_point(
&self,
compress: bool
) -> EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>
Serialize this value as a SEC1 EncodedPoint
, optionally applying
point compression. Read more
impl<'_> TryFrom<&'_ EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>> for VerifyingKey
impl<'_> TryFrom<&'_ EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>> for VerifyingKey
pub fn try_from(
encoded_point: &EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>
) -> Result<VerifyingKey, Error>
pub fn try_from(
encoded_point: &EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>
) -> Result<VerifyingKey, Error>
Performs the conversion.
Performs the conversion.
impl<S> Verifier<S> for VerifyingKey where
S: PrehashSignature,
VerifyingKey: DigestVerifier<<S as PrehashSignature>::Digest, S>,
impl<S> Verifier<S> for VerifyingKey where
S: PrehashSignature,
VerifyingKey: DigestVerifier<<S as PrehashSignature>::Digest, S>,
Auto Trait Implementations
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnwindSafe for VerifyingKey
Blanket Implementations
Mutably borrows from an owned value. Read more