Struct coins_bip32::ecdsa::VerifyingKey
source · [−]pub struct VerifyingKey { /* private fields */ }
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
sourceimpl VerifyingKey
impl VerifyingKey
Re-exported signer traits
sourcepub fn from_sec1_bytes(bytes: &[u8]) -> Result<VerifyingKey, Error>
pub fn from_sec1_bytes(bytes: &[u8]) -> Result<VerifyingKey, Error>
Initialize VerifyingKey
from a SEC1-encoded public key.
sourcepub 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
sourceimpl AsRef<VerifyingKey> for DerivedPubkey
impl AsRef<VerifyingKey> for DerivedPubkey
sourcefn as_ref(&self) -> &VerifyingKey
fn as_ref(&self) -> &VerifyingKey
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl AsRef<VerifyingKey> for DerivedXPub
impl AsRef<VerifyingKey> for DerivedXPub
sourcefn as_ref(&self) -> &VerifyingKey
fn as_ref(&self) -> &VerifyingKey
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl AsRef<VerifyingKey> for XPub
impl AsRef<VerifyingKey> for XPub
sourcefn as_ref(&self) -> &VerifyingKey
fn as_ref(&self) -> &VerifyingKey
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Clone for VerifyingKey
impl Clone for VerifyingKey
sourcefn clone(&self) -> VerifyingKey
fn clone(&self) -> VerifyingKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VerifyingKey
impl Debug for VerifyingKey
sourceimpl DecodePublicKey for VerifyingKey
impl DecodePublicKey for VerifyingKey
fn from_public_key_der(bytes: &[u8]) -> Result<Self, Error>
fn from_public_key_der(bytes: &[u8]) -> Result<Self, Error>
Deserialize object from ASN.1 DER-encoded [SubjectPublicKeyInfo
]
(binary format). Read more
sourceimpl<D> DigestVerifier<D, Signature<Secp256k1>> for VerifyingKey where
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>> + FixedOutput,
impl<D> DigestVerifier<D, Signature<Secp256k1>> for VerifyingKey where
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>> + FixedOutput,
sourceimpl<D> DigestVerifier<D, Signature> for VerifyingKey where
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>> + FixedOutput,
impl<D> DigestVerifier<D, Signature> for VerifyingKey where
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>> + FixedOutput,
sourceimpl From<&PublicKey<Secp256k1>> for VerifyingKey
impl From<&PublicKey<Secp256k1>> for VerifyingKey
sourcefn from(public_key: &PublicKey<Secp256k1>) -> VerifyingKey
fn from(public_key: &PublicKey<Secp256k1>) -> VerifyingKey
Converts to this type from the input type.
sourceimpl From<&SigningKey> for VerifyingKey
impl From<&SigningKey> for VerifyingKey
sourcefn from(signing_key: &SigningKey) -> VerifyingKey
fn from(signing_key: &SigningKey) -> VerifyingKey
Converts to this type from the input type.
sourceimpl From<PublicKey<Secp256k1>> for VerifyingKey
impl From<PublicKey<Secp256k1>> for VerifyingKey
sourcefn from(public_key: PublicKey<Secp256k1>) -> VerifyingKey
fn from(public_key: PublicKey<Secp256k1>) -> VerifyingKey
Converts to this type from the input type.
sourceimpl From<SigningKey> for VerifyingKey
impl From<SigningKey> for VerifyingKey
sourcefn from(signing_key: SigningKey) -> VerifyingKey
fn from(signing_key: SigningKey) -> VerifyingKey
Converts to this type from the input type.
sourceimpl From<VerifyingKey<Secp256k1>> for VerifyingKey
impl From<VerifyingKey<Secp256k1>> for VerifyingKey
sourcefn from(verifying_key: VerifyingKey<Secp256k1>) -> VerifyingKey
fn from(verifying_key: VerifyingKey<Secp256k1>) -> VerifyingKey
Converts to this type from the input type.
sourceimpl Ord for VerifyingKey
impl Ord for VerifyingKey
sourceimpl PartialEq<VerifyingKey> for VerifyingKey
impl PartialEq<VerifyingKey> for VerifyingKey
sourcefn eq(&self, other: &VerifyingKey) -> bool
fn eq(&self, other: &VerifyingKey) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VerifyingKey) -> bool
fn ne(&self, other: &VerifyingKey) -> bool
This method tests for !=
.
sourceimpl PartialOrd<VerifyingKey> for VerifyingKey
impl PartialOrd<VerifyingKey> for VerifyingKey
sourcefn partial_cmp(&self, other: &VerifyingKey) -> Option<Ordering>
fn partial_cmp(&self, other: &VerifyingKey) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl ToEncodedPoint<Secp256k1> for VerifyingKey
impl ToEncodedPoint<Secp256k1> for VerifyingKey
sourcefn to_encoded_point(
&self,
compress: bool
) -> EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>
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
sourceimpl TryFrom<&AffinePoint> for VerifyingKey
impl TryFrom<&AffinePoint> for VerifyingKey
sourcefn try_from(affine_point: &AffinePoint) -> Result<VerifyingKey, Error>
fn try_from(affine_point: &AffinePoint) -> Result<VerifyingKey, Error>
Performs the conversion.
sourceimpl TryFrom<&EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>> for VerifyingKey
impl TryFrom<&EncodedPoint<<<Secp256k1 as Curve>::UInt as ArrayEncoding>::ByteSize>> for VerifyingKey
sourceimpl TryFrom<&ProjectivePoint> for VerifyingKey
impl TryFrom<&ProjectivePoint> for VerifyingKey
sourcefn try_from(point: &ProjectivePoint) -> Result<VerifyingKey, Error>
fn try_from(point: &ProjectivePoint) -> Result<VerifyingKey, Error>
Performs the conversion.
sourceimpl TryFrom<AffinePoint> for VerifyingKey
impl TryFrom<AffinePoint> for VerifyingKey
sourcefn try_from(affine_point: AffinePoint) -> Result<VerifyingKey, Error>
fn try_from(affine_point: AffinePoint) -> Result<VerifyingKey, Error>
Performs the conversion.
sourceimpl TryFrom<ProjectivePoint> for VerifyingKey
impl TryFrom<ProjectivePoint> for VerifyingKey
sourcefn try_from(point: ProjectivePoint) -> Result<VerifyingKey, Error>
fn try_from(point: ProjectivePoint) -> Result<VerifyingKey, Error>
Performs the conversion.
sourceimpl TryFrom<SubjectPublicKeyInfo<'_>> for VerifyingKey
impl TryFrom<SubjectPublicKeyInfo<'_>> for VerifyingKey
type Error = Error
type Error = Error
The type returned in the event of a conversion error.
sourcefn try_from(spki: SubjectPublicKeyInfo<'_>) -> Result<VerifyingKey, Error>
fn try_from(spki: SubjectPublicKeyInfo<'_>) -> Result<VerifyingKey, Error>
Performs the conversion.
sourceimpl<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>,
impl Copy for VerifyingKey
impl Eq for VerifyingKey
impl StructuralEq for VerifyingKey
impl StructuralPartialEq for VerifyingKey
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more