Struct ecdsa::VerifyingKey [−][src]
pub struct VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic, { /* fields omitted */ }
verify
only.Expand description
ECDSA verification key (i.e. public key). Generic over elliptic curves.
Requires an elliptic_curve::ProjectiveArithmetic
impl on the curve, and a
VerifyPrimitive
impl on its associated AffinePoint
type.
Implementations
impl<C> VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
impl<C> VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
Initialize VerifyingKey
from a SEC1-encoded public key.
Initialize VerifyingKey
from an EncodedPoint
.
Serialize this VerifyingKey
as a SEC1 EncodedPoint
, optionally
applying point compression.
Trait Implementations
impl<C> DecodePublicKey for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
This is supported on crate feature pkcs8
only.
impl<C> DecodePublicKey for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
pkcs8
only.Deserialize object from ASN.1 DER-encoded SubjectPublicKeyInfo
(binary format). Read more
Deserialize SPKI public key from a PublicKeyDocument
.
Deserialize PEM-encoded SubjectPublicKeyInfo
. Read more
impl<'de, C> Deserialize<'de> for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
This is supported on crate features pem
and serde
only.
impl<'de, C> Deserialize<'de> for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
pem
and serde
only.Deserialize this value from the given Serde deserializer. Read more
impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
D: Digest<OutputSize = FieldSize<C>>,
AffinePoint<C>: VerifyPrimitive<C>,
Scalar<C>: Reduce<C::UInt>,
SignatureSize<C>: ArrayLength<u8>,
impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
D: Digest<OutputSize = FieldSize<C>>,
AffinePoint<C>: VerifyPrimitive<C>,
Scalar<C>: Reduce<C::UInt>,
SignatureSize<C>: ArrayLength<u8>,
Verify the signature against the given [Digest
] output.
Performs the conversion.
impl<C> From<&'_ SigningKey<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
Scalar<C>: Invert<Output = Scalar<C>> + Reduce<C::UInt> + SignPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
impl<C> From<&'_ SigningKey<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
Scalar<C>: Invert<Output = Scalar<C>> + Reduce<C::UInt> + SignPrimitive<C>,
SignatureSize<C>: ArrayLength<u8>,
Performs the conversion.
impl<C> From<&'_ VerifyingKey<C>> for EncodedPoint<C> where
C: PrimeCurve + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
impl<C> From<&'_ VerifyingKey<C>> for EncodedPoint<C> where
C: PrimeCurve + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
impl<C> FromStr for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
This is supported on crate feature pem
only.
impl<C> FromStr for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
pem
only.impl<C> Ord for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
impl<C> Ord for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
impl<C> PartialEq<VerifyingKey<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
impl<C> PartialEq<VerifyingKey<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
impl<C> PartialOrd<VerifyingKey<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
impl<C> PartialOrd<VerifyingKey<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
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
impl<C> Serialize for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
This is supported on crate features pem
and serde
only.
impl<C> Serialize for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
pem
and serde
only.impl<C> TryFrom<&'_ [u8]> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
impl<C> TryFrom<&'_ [u8]> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
impl<C> TryFrom<SubjectPublicKeyInfo<'_>> for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
This is supported on crate feature pkcs8
only.
impl<C> TryFrom<SubjectPublicKeyInfo<'_>> for VerifyingKey<C> where
C: PrimeCurve + AlgorithmParameters + ProjectiveArithmetic + PointCompression,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldSize<C>: ModulusSize,
pkcs8
only.impl<C> Verifier<Signature<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic + DigestPrimitive,
C::Digest: Digest<OutputSize = FieldSize<C>>,
AffinePoint<C>: VerifyPrimitive<C>,
Scalar<C>: Reduce<C::UInt>,
SignatureSize<C>: ArrayLength<u8>,
impl<C> Verifier<Signature<C>> for VerifyingKey<C> where
C: PrimeCurve + ProjectiveArithmetic + DigestPrimitive,
C::Digest: Digest<OutputSize = FieldSize<C>>,
AffinePoint<C>: VerifyPrimitive<C>,
Scalar<C>: Reduce<C::UInt>,
SignatureSize<C>: ArrayLength<u8>,
Auto Trait Implementations
impl<C> RefUnwindSafe for VerifyingKey<C> where
<C as AffineArithmetic>::AffinePoint: RefUnwindSafe,
impl<C> Send for VerifyingKey<C>
impl<C> Sync for VerifyingKey<C>
impl<C> Unpin for VerifyingKey<C> where
<C as AffineArithmetic>::AffinePoint: Unpin,
impl<C> UnwindSafe for VerifyingKey<C> where
<C as AffineArithmetic>::AffinePoint: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more