pub trait VerifyingKey {
// Required methods
fn verifies_sha256(&self, signature: &[u8], message: &[u8]) -> bool;
fn verifies_sha384(&self, signature: &[u8], message: &[u8]) -> bool;
fn verifies_sha512(&self, signature: &[u8], message: &[u8]) -> bool;
fn x(&self) -> Vec<u8> ⓘ;
fn y(&self) -> Vec<u8> ⓘ;
fn curve_oid(&self) -> ObjectIdentifier;
fn from_coordinates(x: &[u8], y: &[u8]) -> Option<Self>
where Self: Sized;
fn from_encoded_coordinates(coordinates: &[u8]) -> Option<Self>
where Self: Sized;
fn from_spki_der(der: &[u8]) -> Option<Self>
where Self: Sized;
}Expand description
A verifying key using ECDSA
Required Methods§
Sourcefn verifies_sha256(&self, signature: &[u8], message: &[u8]) -> bool
fn verifies_sha256(&self, signature: &[u8], message: &[u8]) -> bool
Verify the message using the SHA-256 digest
Sourcefn verifies_sha384(&self, signature: &[u8], message: &[u8]) -> bool
fn verifies_sha384(&self, signature: &[u8], message: &[u8]) -> bool
Verify the message using the SHA-384 digest
Sourcefn verifies_sha512(&self, signature: &[u8], message: &[u8]) -> bool
fn verifies_sha512(&self, signature: &[u8], message: &[u8]) -> bool
Verify the message using the SHA-512 digest
Sourcefn curve_oid(&self) -> ObjectIdentifier
fn curve_oid(&self) -> ObjectIdentifier
Get the object identifier of the curve.
Sourcefn from_coordinates(x: &[u8], y: &[u8]) -> Option<Self>where
Self: Sized,
fn from_coordinates(x: &[u8], y: &[u8]) -> Option<Self>where
Self: Sized,
Create a verifying key from the coordinates.
Sourcefn from_encoded_coordinates(coordinates: &[u8]) -> Option<Self>where
Self: Sized,
fn from_encoded_coordinates(coordinates: &[u8]) -> Option<Self>where
Self: Sized,
Create a verifying key from the sec1 encoded coordinates
Sourcefn from_spki_der(der: &[u8]) -> Option<Self>where
Self: Sized,
fn from_spki_der(der: &[u8]) -> Option<Self>where
Self: Sized,
Create a new key from a subject public key info der.
Implementations on Foreign Types§
Source§impl<C> VerifyingKey for VerifyingKey<C>where
C: EcdsaCurve + CurveArithmetic + AssociatedOid,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
SignatureSize<C>: ArraySize,
SigningKey<C>: RandomizedPrehashSigner<Signature<C>> + DecodePrivateKey,
Self: DecodePublicKey,
impl<C> VerifyingKey for VerifyingKey<C>where
C: EcdsaCurve + CurveArithmetic + AssociatedOid,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
SignatureSize<C>: ArraySize,
SigningKey<C>: RandomizedPrehashSigner<Signature<C>> + DecodePrivateKey,
Self: DecodePublicKey,
Source§fn verifies_sha256(&self, signature: &[u8], message: &[u8]) -> bool
fn verifies_sha256(&self, signature: &[u8], message: &[u8]) -> bool
Verify the message using the SHA-256 digest
Source§fn verifies_sha384(&self, signature: &[u8], message: &[u8]) -> bool
fn verifies_sha384(&self, signature: &[u8], message: &[u8]) -> bool
Verify the message using the SHA-384 digest
Source§fn verifies_sha512(&self, signature: &[u8], message: &[u8]) -> bool
fn verifies_sha512(&self, signature: &[u8], message: &[u8]) -> bool
Verify the message using the SHA-512 digest