Struct jaws::algorithms::ecdsa::VerifyingKey
source · pub struct VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,{ /* private fields */ }
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,
<C as CurveArithmetic>::AffinePoint: DecompressPoint<C> + FromEncodedPoint<C> + ToEncodedPoint<C> + VerifyPrimitive<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
impl<C> VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::AffinePoint: DecompressPoint<C> + FromEncodedPoint<C> + ToEncodedPoint<C> + VerifyPrimitive<C>, <C as Curve>::FieldBytesSize: ModulusSize, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
sourcepub fn recover_from_msg(
msg: &[u8],
signature: &Signature<C>,
recovery_id: RecoveryId
) -> Result<VerifyingKey<C>, Error>where
C: DigestPrimitive,
pub fn recover_from_msg( msg: &[u8], signature: &Signature<C>, recovery_id: RecoveryId ) -> Result<VerifyingKey<C>, Error>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<VerifyingKey<C>, Error>where
D: Digest,
pub fn recover_from_digest<D>( msg_digest: D, signature: &Signature<C>, recovery_id: RecoveryId ) -> Result<VerifyingKey<C>, Error>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<VerifyingKey<C>, Error>
pub fn recover_from_prehash( prehash: &[u8], signature: &Signature<C>, recovery_id: RecoveryId ) -> Result<VerifyingKey<C>, Error>
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,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
sourcepub fn from_sec1_bytes(bytes: &[u8]) -> Result<VerifyingKey<C>, Error>
pub fn from_sec1_bytes(bytes: &[u8]) -> Result<VerifyingKey<C>, Error>
Initialize VerifyingKey
from a SEC1-encoded public key.
sourcepub fn from_affine(
affine: <C as CurveArithmetic>::AffinePoint
) -> Result<VerifyingKey<C>, Error>
pub fn from_affine( affine: <C as CurveArithmetic>::AffinePoint ) -> Result<VerifyingKey<C>, Error>
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 as Curve>::FieldBytesSize>
) -> Result<VerifyingKey<C>, Error>
pub fn from_encoded_point( public_key: &EncodedPoint<<C as Curve>::FieldBytesSize> ) -> Result<VerifyingKey<C>, Error>
Initialize VerifyingKey
from an EncodedPoint
.
sourcepub fn to_encoded_point(
&self,
compress: bool
) -> EncodedPoint<<C as Curve>::FieldBytesSize>
pub fn to_encoded_point( &self, compress: bool ) -> EncodedPoint<<C as Curve>::FieldBytesSize>
Serialize this VerifyingKey
as a SEC1 EncodedPoint
, optionally
applying point compression.
sourcepub fn to_sec1_bytes(&self) -> Box<[u8]>where
C: PointCompression,
pub fn to_sec1_bytes(&self) -> Box<[u8]>where C: PointCompression,
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) -> &<C as CurveArithmetic>::AffinePoint
pub fn as_affine(&self) -> &<C as CurveArithmetic>::AffinePoint
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,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> AsRef<<C as CurveArithmetic>::AffinePoint> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
source§fn as_ref(&self) -> &<C as CurveArithmetic>::AffinePoint
fn as_ref(&self) -> &<C as CurveArithmetic>::AffinePoint
source§impl<C> AsRef<VerifyingKey<C>> for SigningKey<C>where
C: PrimeCurve + CurveArithmetic,
<C as CurveArithmetic>::Scalar: Invert<Output = CtOption<<C as CurveArithmetic>::Scalar>> + SignPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
impl<C> AsRef<VerifyingKey<C>> for SigningKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::Scalar: Invert<Output = CtOption<<C as CurveArithmetic>::Scalar>> + SignPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
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,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> AssociatedAlgorithmIdentifier for VerifyingKey<C>where C: AssociatedOid + CurveArithmetic + PrimeCurve, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
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: Clone + PrimeCurve + CurveArithmetic,
impl<C> Clone for VerifyingKey<C>where C: Clone + PrimeCurve + CurveArithmetic,
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: Debug + PrimeCurve + CurveArithmetic,
impl<C> Debug for VerifyingKey<C>where C: Debug + PrimeCurve + CurveArithmetic,
source§impl DigestVerifier<<NistP256 as DigestPrimitive>::Digest, SignatureBytes> for VerifyingKey<NistP256>
impl DigestVerifier<<NistP256 as DigestPrimitive>::Digest, SignatureBytes> for VerifyingKey<NistP256>
source§fn verify_digest(
&self,
digest: <NistP256 as DigestPrimitive>::Digest,
signature: &SignatureBytes
) -> Result<(), Error>
fn verify_digest( &self, digest: <NistP256 as DigestPrimitive>::Digest, signature: &SignatureBytes ) -> Result<(), Error>
Digest
output.source§impl DigestVerifier<<NistP384 as DigestPrimitive>::Digest, SignatureBytes> for VerifyingKey<NistP384>
impl DigestVerifier<<NistP384 as DigestPrimitive>::Digest, SignatureBytes> for VerifyingKey<NistP384>
source§fn verify_digest(
&self,
digest: <NistP384 as DigestPrimitive>::Digest,
signature: &SignatureBytes
) -> Result<(), Error>
fn verify_digest( &self, digest: <NistP384 as DigestPrimitive>::Digest, signature: &SignatureBytes ) -> Result<(), Error>
Digest
output.source§impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
D: Digest<OutputSize = <C as Curve>::FieldBytesSize> + FixedOutput,
<C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, D: Digest<OutputSize = <C as Curve>::FieldBytesSize> + FixedOutput, <C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
source§impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
D: Digest<OutputSize = <C as Curve>::FieldBytesSize> + FixedOutput,
<C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>,
<<<C as Curve>::FieldBytesSize as Add>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,
impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, D: Digest<OutputSize = <C as Curve>::FieldBytesSize> + FixedOutput, <C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>, <<<C as Curve>::FieldBytesSize as Add>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,
source§impl<C> EncodePublicKey for VerifyingKey<C>where
C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> EncodePublicKey for VerifyingKey<C>where C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
source§fn to_public_key_der(&self) -> Result<Document, Error>
fn to_public_key_der(&self) -> Result<Document, Error>
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
.§fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
§fn write_public_key_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding
) -> Result<(), Error>
fn write_public_key_pem_file( &self, path: impl AsRef<Path>, line_ending: LineEnding ) -> Result<(), Error>
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,
<C as CurveArithmetic>::Scalar: Invert<Output = CtOption<<C as CurveArithmetic>::Scalar>> + SignPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
impl<C> From<&SigningKey<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::Scalar: Invert<Output = CtOption<<C as CurveArithmetic>::Scalar>> + SignPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
source§fn from(signing_key: &SigningKey<C>) -> VerifyingKey<C>
fn from(signing_key: &SigningKey<C>) -> VerifyingKey<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,
<C as CurveArithmetic>::Scalar: Invert<Output = CtOption<<C as CurveArithmetic>::Scalar>> + SignPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
impl<C> From<SigningKey<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::Scalar: Invert<Output = CtOption<<C as CurveArithmetic>::Scalar>> + SignPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
source§fn from(signing_key: SigningKey<C>) -> VerifyingKey<C>
fn from(signing_key: SigningKey<C>) -> VerifyingKey<C>
source§impl<C> FromStr for VerifyingKey<C>where
C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> FromStr for VerifyingKey<C>where C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
source§impl<C> JWKeyType for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + JwkParameters,
impl<C> JWKeyType for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + JwkParameters,
source§impl JoseAlgorithm for VerifyingKey<NistP256>
impl JoseAlgorithm for VerifyingKey<NistP256>
source§const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::ES256
const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::ES256
source§impl JoseAlgorithm for VerifyingKey<NistP384>
impl JoseAlgorithm for VerifyingKey<NistP384>
source§const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::ES384
const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::ES384
source§impl JoseDigestAlgorithm for VerifyingKey<NistP256>
impl JoseDigestAlgorithm for VerifyingKey<NistP256>
§type Digest = <NistP256 as DigestPrimitive>::Digest
type Digest = <NistP256 as DigestPrimitive>::Digest
source§impl JoseDigestAlgorithm for VerifyingKey<NistP384>
impl JoseDigestAlgorithm for VerifyingKey<NistP384>
§type Digest = <NistP384 as DigestPrimitive>::Digest
type Digest = <NistP384 as DigestPrimitive>::Digest
source§impl<C> Ord for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> Ord for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
source§fn cmp(&self, other: &VerifyingKey<C>) -> Ordering
fn cmp(&self, other: &VerifyingKey<C>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl<C> PartialEq for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
impl<C> PartialEq for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic,
source§fn eq(&self, other: &VerifyingKey<C>) -> bool
fn eq(&self, other: &VerifyingKey<C>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<C> PartialOrd for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> PartialOrd for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
source§fn partial_cmp(&self, other: &VerifyingKey<C>) -> Option<Ordering>
fn partial_cmp(&self, other: &VerifyingKey<C>) -> Option<Ordering>
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,
<C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
source§impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + DigestPrimitive,
<C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>,
<<<C as Curve>::FieldBytesSize as Add>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,
impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + DigestPrimitive, <C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>, <<<C as Curve>::FieldBytesSize as Add>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,
source§impl<C> SerializeJWK for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + JwkParameters,
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
FieldBytesSize<C>: ModulusSize,
impl<C> SerializeJWK for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + JwkParameters, AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>, FieldBytesSize<C>: ModulusSize,
source§impl<C> SignatureAlgorithmIdentifier for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
Signature<C>: AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
impl<C> SignatureAlgorithmIdentifier for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize, Signature<C>: AssociatedAlgorithmIdentifier<Params = AnyRef<'static>>,
source§const SIGNATURE_ALGORITHM_IDENTIFIER: AlgorithmIdentifier<<VerifyingKey<C> as SignatureAlgorithmIdentifier>::Params> = Signature<C>::ALGORITHM_IDENTIFIER
const SIGNATURE_ALGORITHM_IDENTIFIER: AlgorithmIdentifier<<VerifyingKey<C> as SignatureAlgorithmIdentifier>::Params> = Signature<C>::ALGORITHM_IDENTIFIER
AlgorithmIdentifier
for the corresponding singature system.source§impl<C> TryFrom<&[u8]> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> TryFrom<&[u8]> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
source§impl<C> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey<C>where
C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
impl<C> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey<C>where C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression, <C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>, <C as Curve>::FieldBytesSize: ModulusSize,
source§impl<C> Verifier<Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + DigestPrimitive,
<C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>,
<<<C as Curve>::FieldBytesSize as Add>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,
impl<C> Verifier<Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + DigestPrimitive, <C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8> + Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>, <<<C as Curve>::FieldBytesSize as Add>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output: ArrayLength<u8>,
source§impl<C> Verifier<Signature<C>> for VerifyingKey<C>where
C: PrimeCurve + CurveArithmetic + DigestPrimitive,
<C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
impl<C> Verifier<Signature<C>> for VerifyingKey<C>where C: PrimeCurve + CurveArithmetic + DigestPrimitive, <C as CurveArithmetic>::AffinePoint: VerifyPrimitive<C>, <<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§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>
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>
§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>
§impl<T> DecodeRsaPublicKey for Twhere
T: for<'a> TryFrom<SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>>, Error = Error>,
impl<T> DecodeRsaPublicKey for Twhere T: for<'a> TryFrom<SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>>, Error = Error>,
§fn from_pkcs1_der(public_key: &[u8]) -> Result<T, Error>
fn from_pkcs1_der(public_key: &[u8]) -> Result<T, Error>
RsaPublicKey
]
(binary format).§fn from_pkcs1_pem(s: &str) -> Result<Self, Error>
fn from_pkcs1_pem(s: &str) -> Result<Self, Error>
RsaPublicKey
]. Read more§fn read_pkcs1_der_file(path: impl AsRef<Path>) -> Result<Self, Error>
fn read_pkcs1_der_file(path: impl AsRef<Path>) -> Result<Self, Error>
RsaPublicKey
] from an ASN.1 DER-encoded file on the local
filesystem (binary format).§fn read_pkcs1_pem_file(path: impl AsRef<Path>) -> Result<Self, Error>
fn read_pkcs1_pem_file(path: impl AsRef<Path>) -> Result<Self, Error>
RsaPublicKey
] from a PEM-encoded file on the local filesystem.§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.source§impl<T> DynJoseAlgorithm for Twhere
T: JoseAlgorithm,
impl<T> DynJoseAlgorithm for Twhere T: JoseAlgorithm,
source§fn identifier(&self) -> AlgorithmIdentifier
fn identifier(&self) -> AlgorithmIdentifier
source§impl<T> DynJwkKeyType for Twhere
T: JWKeyType,
impl<T> DynJwkKeyType for Twhere T: JWKeyType,
§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.§impl<T> EncodeRsaPublicKey for Twhere
T: EncodePublicKey,
impl<T> EncodeRsaPublicKey for Twhere T: EncodePublicKey,
§fn to_pkcs1_der(&self) -> Result<Document, Error>
fn to_pkcs1_der(&self) -> Result<Document, Error>
Document
] containing a PKCS#1-encoded public key.