Struct ecdsa::VerifyingKey
source · pub struct VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,{ /* private fields */ }
verifying
only.Expand description
ECDSA public key used for verifying signatures. Generic over prime order elliptic curves (e.g. NIST P-curves)
Requires an elliptic_curve::CurveArithmetic
impl on the curve, and a
VerifyPrimitive
impl on its associated AffinePoint
type.
Usage
The signature
crate defines the following traits which are the
primary API for verifying:
Verifier
: verify a message against a provided key and signatureDigestVerifier
: verify a messageDigest
against a provided key and signaturePrehashVerifier
: verify the low-level raw output bytes of a message digest
See the p256
crate
for examples of using this type with a concrete elliptic curve.
serde
support
When the serde
feature of this crate is enabled, it provides support for
serializing and deserializing ECDSA signatures using the Serialize
and
Deserialize
traits.
The serialization leverages the encoding used by the PublicKey
type,
which is a binary-oriented ASN.1 DER encoding.
Implementations§
source§impl<C> VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
AffinePoint<C>: DecompressPoint<C> + FromEncodedPoint<C> + ToEncodedPoint<C> + VerifyPrimitive<C>,
FieldBytesSize<C>: ModulusSize,
SignatureSize<C>: ArrayLength<u8>,
impl<C> VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, AffinePoint<C>: DecompressPoint<C> + FromEncodedPoint<C> + ToEncodedPoint<C> + VerifyPrimitive<C>, FieldBytesSize<C>: ModulusSize, SignatureSize<C>: ArrayLength<u8>,
sourcepub fn recover_from_msg(
msg: &[u8],
signature: &Signature<C>,
recovery_id: RecoveryId
) -> Result<Self>where
C: DigestPrimitive,
pub fn recover_from_msg( msg: &[u8], signature: &Signature<C>, recovery_id: RecoveryId ) -> Result<Self>where C: DigestPrimitive,
Recover a VerifyingKey
from the given message, signature, and
RecoveryId
.
The message is first hashed using this curve’s DigestPrimitive
.
sourcepub fn recover_from_digest<D>(
msg_digest: D,
signature: &Signature<C>,
recovery_id: RecoveryId
) -> Result<Self>where
D: Digest,
pub fn recover_from_digest<D>( msg_digest: D, signature: &Signature<C>, recovery_id: RecoveryId ) -> Result<Self>where D: Digest,
Recover a VerifyingKey
from the given message Digest
,
signature, and RecoveryId
.
sourcepub fn recover_from_prehash(
prehash: &[u8],
signature: &Signature<C>,
recovery_id: RecoveryId
) -> Result<Self>
pub fn recover_from_prehash( prehash: &[u8], signature: &Signature<C>, recovery_id: RecoveryId ) -> Result<Self>
Recover a VerifyingKey
from the given prehash
of a message, the
signature over that prehashed message, and a RecoveryId
.
source§impl<C> VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
sourcepub fn from_sec1_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_sec1_bytes(bytes: &[u8]) -> Result<Self>
Initialize VerifyingKey
from a SEC1-encoded public key.
sourcepub fn from_affine(affine: AffinePoint<C>) -> Result<Self>
pub fn from_affine(affine: AffinePoint<C>) -> Result<Self>
Initialize VerifyingKey
from an affine point.
Returns an Error
if the given affine point is the additive identity
(a.k.a. point at infinity).
sourcepub fn from_encoded_point(public_key: &EncodedPoint<C>) -> Result<Self>
pub fn from_encoded_point(public_key: &EncodedPoint<C>) -> Result<Self>
Initialize VerifyingKey
from an EncodedPoint
.
sourcepub fn to_encoded_point(&self, compress: bool) -> EncodedPoint<C>
pub fn to_encoded_point(&self, compress: bool) -> EncodedPoint<C>
Serialize this VerifyingKey
as a SEC1 EncodedPoint
, optionally
applying point compression.
sourcepub fn to_sec1_bytes(&self) -> Box<[u8]>where
C: PointCompression,
Available on crate feature alloc
only.
pub fn to_sec1_bytes(&self) -> Box<[u8]>where C: PointCompression,
alloc
only.Convert this VerifyingKey
into the
Elliptic-Curve-Point-to-Octet-String
encoding described in
SEC 1: Elliptic Curve Cryptography (Version 2.0) section 2.3.3
(page 10).
sourcepub fn as_affine(&self) -> &AffinePoint<C>
pub fn as_affine(&self) -> &AffinePoint<C>
Borrow the inner AffinePoint
for this public key.
Trait Implementations§
source§impl<C> AsRef<<C as CurveArithmetic>::AffinePoint> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> AsRef<<C as CurveArithmetic>::AffinePoint> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
source§fn as_ref(&self) -> &AffinePoint<C>
fn as_ref(&self) -> &AffinePoint<C>
source§impl<C> AsRef<VerifyingKey<C>> for SigningKey<C>where
C: PrimeCurve + CurveArithmetic,
Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + SignPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
Available on crate feature signing
only.
impl<C> AsRef<VerifyingKey<C>> for SigningKey<C>where C: PrimeCurve + CurveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,
signing
only.source§fn as_ref(&self) -> &VerifyingKey<C>
fn as_ref(&self) -> &VerifyingKey<C>
source§impl<C> AssociatedAlgorithmIdentifier for VerifyingKey<C>where
C: AssociatedOid + CurveArithmetic + PrimeCurve,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
Available on crate feature pkcs8
only.
impl<C> AssociatedAlgorithmIdentifier for VerifyingKey<C>where C: AssociatedOid + CurveArithmetic + PrimeCurve, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
pkcs8
only.source§const ALGORITHM_IDENTIFIER: AlgorithmIdentifier<ObjectIdentifier> = PublicKey<C>::ALGORITHM_IDENTIFIER
const ALGORITHM_IDENTIFIER: AlgorithmIdentifier<ObjectIdentifier> = PublicKey<C>::ALGORITHM_IDENTIFIER
AlgorithmIdentifier
for this structure.source§impl<C> Clone for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + Clone,
impl<C> Clone for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + Clone,
source§fn clone(&self) -> VerifyingKey<C>
fn clone(&self) -> VerifyingKey<C>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<C> Debug for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + Debug,
impl<C> Debug for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + Debug,
source§impl<'de, C> Deserialize<'de> for VerifyingKey<C>where
C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
Available on crate features pem
and serde
only.
impl<'de, C> Deserialize<'de> for VerifyingKey<C>where C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
pem
and serde
only.source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
source§impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
D: Digest + FixedOutput<OutputSize = FieldBytesSize<C>>,
AffinePoint<C>: VerifyPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
MaxSize<C>: ArrayLength<u8>,
<FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>,
Available on crate feature der
only.
impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, D: Digest + FixedOutput<OutputSize = FieldBytesSize<C>>, AffinePoint<C>: VerifyPrimitive<C>, SignatureSize<C>: ArrayLength<u8>, MaxSize<C>: ArrayLength<u8>, <FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>,
der
only.source§impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
D: Digest + FixedOutput<OutputSize = FieldBytesSize<C>>,
AffinePoint<C>: VerifyPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, D: Digest + FixedOutput<OutputSize = FieldBytesSize<C>>, AffinePoint<C>: VerifyPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,
source§impl<C> EncodePublicKey for VerifyingKey<C>where
C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
Available on crate feature pem
only.
impl<C> EncodePublicKey for VerifyingKey<C>where C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
pem
only.source§fn to_public_key_der(&self) -> Result<Document>
fn to_public_key_der(&self) -> Result<Document>
Document
containing a SPKI-encoded public key.§fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>
fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>
LineEnding
].source§impl<C> From<&PublicKey<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
impl<C> From<&PublicKey<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic,
source§fn from(public_key: &PublicKey<C>) -> VerifyingKey<C>
fn from(public_key: &PublicKey<C>) -> VerifyingKey<C>
source§impl<C> From<&SigningKey<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + SignPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
Available on crate feature signing
only.
impl<C> From<&SigningKey<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,
signing
only.source§fn from(signing_key: &SigningKey<C>) -> VerifyingKey<C>
fn from(signing_key: &SigningKey<C>) -> VerifyingKey<C>
source§impl<C> From<&VerifyingKey<C>> for CompressedPoint<C>where
C: PrimeCurve + CurveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> From<&VerifyingKey<C>> for CompressedPoint<C>where C: PrimeCurve + CurveArithmetic + PointCompression, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
source§fn from(verifying_key: &VerifyingKey<C>) -> CompressedPoint<C>
fn from(verifying_key: &VerifyingKey<C>) -> CompressedPoint<C>
source§impl<C> From<&VerifyingKey<C>> for EncodedPoint<C>where
C: PrimeCurve + CurveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> From<&VerifyingKey<C>> for EncodedPoint<C>where C: PrimeCurve + CurveArithmetic + PointCompression, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
source§fn from(verifying_key: &VerifyingKey<C>) -> EncodedPoint<C>
fn from(verifying_key: &VerifyingKey<C>) -> EncodedPoint<C>
source§impl<C> From<&VerifyingKey<C>> for PublicKey<C>where
C: PrimeCurve + CurveArithmetic,
impl<C> From<&VerifyingKey<C>> for PublicKey<C>where C: PrimeCurve + CurveArithmetic,
source§fn from(verifying_key: &VerifyingKey<C>) -> PublicKey<C>
fn from(verifying_key: &VerifyingKey<C>) -> PublicKey<C>
source§impl<C> From<PublicKey<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
impl<C> From<PublicKey<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic,
source§fn from(public_key: PublicKey<C>) -> VerifyingKey<C>
fn from(public_key: PublicKey<C>) -> VerifyingKey<C>
source§impl<C> From<SigningKey<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + SignPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
Available on crate feature signing
only.
impl<C> From<SigningKey<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + SignPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,
signing
only.source§fn from(signing_key: SigningKey<C>) -> VerifyingKey<C>
fn from(signing_key: SigningKey<C>) -> VerifyingKey<C>
source§impl<C> From<VerifyingKey<C>> for CompressedPoint<C>where
C: PrimeCurve + CurveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> From<VerifyingKey<C>> for CompressedPoint<C>where C: PrimeCurve + CurveArithmetic + PointCompression, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
source§fn from(verifying_key: VerifyingKey<C>) -> CompressedPoint<C>
fn from(verifying_key: VerifyingKey<C>) -> CompressedPoint<C>
source§impl<C> From<VerifyingKey<C>> for EncodedPoint<C>where
C: PrimeCurve + CurveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> From<VerifyingKey<C>> for EncodedPoint<C>where C: PrimeCurve + CurveArithmetic + PointCompression, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
source§fn from(verifying_key: VerifyingKey<C>) -> EncodedPoint<C>
fn from(verifying_key: VerifyingKey<C>) -> EncodedPoint<C>
source§impl<C> From<VerifyingKey<C>> for PublicKey<C>where
C: PrimeCurve + CurveArithmetic,
impl<C> From<VerifyingKey<C>> for PublicKey<C>where C: PrimeCurve + CurveArithmetic,
source§fn from(verifying_key: VerifyingKey<C>) -> PublicKey<C>
fn from(verifying_key: VerifyingKey<C>) -> PublicKey<C>
source§impl<C> FromStr for VerifyingKey<C>where
C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
Available on crate feature pem
only.
impl<C> FromStr for VerifyingKey<C>where C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
pem
only.source§impl<C> Ord for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> Ord for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
source§impl<C> PartialEq<VerifyingKey<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
impl<C> PartialEq<VerifyingKey<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic,
source§impl<C> PartialOrd<VerifyingKey<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> PartialOrd<VerifyingKey<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + DigestPrimitive,
AffinePoint<C>: VerifyPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
MaxSize<C>: ArrayLength<u8>,
<FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>,
Available on crate feature der
only.
impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + DigestPrimitive, AffinePoint<C>: VerifyPrimitive<C>, SignatureSize<C>: ArrayLength<u8>, MaxSize<C>: ArrayLength<u8>, <FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>,
der
only.source§impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
AffinePoint<C>: VerifyPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, AffinePoint<C>: VerifyPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,
source§impl<C> Serialize for VerifyingKey<C>where
C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
Available on crate features pem
and serde
only.
impl<C> Serialize for VerifyingKey<C>where C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
pem
and serde
only.source§impl<C> SignatureAlgorithmIdentifier for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
Signature<C>: AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
Available on crate feature pkcs8
only.
impl<C> SignatureAlgorithmIdentifier for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize, Signature<C>: AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
pkcs8
only.source§impl<C> TryFrom<&[u8]> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> TryFrom<&[u8]> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
source§impl<C> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey<C>where
C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
Available on crate feature pkcs8
only.
impl<C> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey<C>where C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
pkcs8
only.source§impl<C> Verifier<Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + DigestPrimitive,
AffinePoint<C>: VerifyPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
impl<C> Verifier<Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + DigestPrimitive, AffinePoint<C>: VerifyPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,
source§impl<C> Verifier<Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + DigestPrimitive,
AffinePoint<C>: VerifyPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
MaxSize<C>: ArrayLength<u8>,
<FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>,
Available on crate feature der
only.
impl<C> Verifier<Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + DigestPrimitive, AffinePoint<C>: VerifyPrimitive<C>, SignatureSize<C>: ArrayLength<u8>, MaxSize<C>: ArrayLength<u8>, <FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>,
der
only.source§impl<C> Verifier<SignatureWithOid<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + DigestPrimitive,
AffinePoint<C>: VerifyPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
Available on crate feature sha2
only.
impl<C> Verifier<SignatureWithOid<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + DigestPrimitive, AffinePoint<C>: VerifyPrimitive<C>, SignatureSize<C>: ArrayLength<u8>,
sha2
only.impl<C> Copy for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic,
impl<C> Eq for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic,
Auto Trait Implementations§
impl<C> RefUnwindSafe for VerifyingKey<C>where <C as CurveArithmetic>::AffinePoint: RefUnwindSafe,
impl<C> Send for VerifyingKey<C>
impl<C> Sync for VerifyingKey<C>
impl<C> Unpin for VerifyingKey<C>where <C as CurveArithmetic>::AffinePoint: Unpin,
impl<C> UnwindSafe for VerifyingKey<C>where <C as CurveArithmetic>::AffinePoint: UnwindSafe,
Blanket Implementations§
§impl<T> DecodePublicKey for Twhere
T: for<'a> TryFrom<SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>>, Error = Error>,
impl<T> DecodePublicKey for Twhere T: for<'a> TryFrom<SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>>, Error = Error>,
§fn from_public_key_der(bytes: &[u8]) -> Result<T, Error>
fn from_public_key_der(bytes: &[u8]) -> Result<T, Error>
SubjectPublicKeyInfo
]
(binary format).§fn from_public_key_pem(s: &str) -> Result<Self, Error>
fn from_public_key_pem(s: &str) -> Result<Self, Error>
pem
only.SubjectPublicKeyInfo
]. Read more§fn read_public_key_der_file(path: impl AsRef<Path>) -> Result<Self, Error>
fn read_public_key_der_file(path: impl AsRef<Path>) -> Result<Self, Error>
std
only.§fn read_public_key_pem_file(path: impl AsRef<Path>) -> Result<Self, Error>
fn read_public_key_pem_file(path: impl AsRef<Path>) -> Result<Self, Error>
pem
and std
only.§impl<T> DynAssociatedAlgorithmIdentifier for Twhere
T: AssociatedAlgorithmIdentifier,
impl<T> DynAssociatedAlgorithmIdentifier for Twhere T: AssociatedAlgorithmIdentifier,
§fn algorithm_identifier(&self) -> Result<AlgorithmIdentifier<Any>, Error>
fn algorithm_identifier(&self) -> Result<AlgorithmIdentifier<Any>, Error>
AlgorithmIdentifier
for this structure.§impl<T> DynSignatureAlgorithmIdentifier for Twhere
T: SignatureAlgorithmIdentifier,
impl<T> DynSignatureAlgorithmIdentifier for Twhere T: SignatureAlgorithmIdentifier,
§fn signature_algorithm_identifier(
&self
) -> Result<AlgorithmIdentifier<Any>, Error>
fn signature_algorithm_identifier( &self ) -> Result<AlgorithmIdentifier<Any>, Error>
AlgorithmIdentifier
for the corresponding singature system.