Type Alias mas_jose::jwa::Es384VerifyingKey

source ·
pub type Es384VerifyingKey = VerifyingKey<NistP384>;

Aliased Type§

struct Es384VerifyingKey { /* private fields */ }

Implementations

source§

impl<C> VerifyingKey<C>

source

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.

source

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.

source

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>

source

pub fn from_sec1_bytes(bytes: &[u8]) -> Result<VerifyingKey<C>, Error>

Initialize VerifyingKey from a SEC1-encoded public key.

source

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).

source

pub fn from_encoded_point( public_key: &EncodedPoint<<C as Curve>::FieldBytesSize>, ) -> Result<VerifyingKey<C>, Error>

Initialize VerifyingKey from an EncodedPoint.

source

pub fn to_encoded_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>

Serialize this VerifyingKey as a SEC1 EncodedPoint, optionally applying point compression.

source

pub fn to_sec1_bytes(&self) -> Box<[u8]>

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).

http://www.secg.org/sec1-v2.pdf

source

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>

source§

fn as_ref(&self) -> &<C as CurveArithmetic>::AffinePoint

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<C> AssociatedAlgorithmIdentifier for VerifyingKey<C>

§

type Params = ObjectIdentifier

Algorithm parameters.
source§

const ALGORITHM_IDENTIFIER: AlgorithmIdentifier<ObjectIdentifier> = PublicKey<C>::ALGORITHM_IDENTIFIER

AlgorithmIdentifier for this structure.
source§

impl<C> Clone for VerifyingKey<C>

source§

fn clone(&self) -> VerifyingKey<C>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<C> Debug for VerifyingKey<C>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>

source§

fn verify_digest( &self, msg_digest: D, signature: &Signature<C>, ) -> Result<(), Error>

Verify the signature against the given Digest output.
source§

impl<C, D> DigestVerifier<D, Signature<C>> for VerifyingKey<C>

source§

fn verify_digest( &self, msg_digest: D, signature: &Signature<C>, ) -> Result<(), Error>

Verify the signature against the given Digest output.
source§

impl<C> EncodePublicKey for VerifyingKey<C>

source§

fn to_public_key_der(&self) -> Result<Document, Error>

Serialize a Document containing a SPKI-encoded public key.
source§

fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>

Serialize this public key as PEM-encoded SPKI with the given LineEnding.
source§

fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>

Write ASN.1 DER-encoded public key to the given path
source§

fn write_public_key_pem_file( &self, path: impl AsRef<Path>, line_ending: LineEnding, ) -> Result<(), Error>

Write ASN.1 DER-encoded public key to the given path
source§

impl<C> From<&PublicKey<C>> for VerifyingKey<C>

source§

fn from(public_key: &PublicKey<C>) -> VerifyingKey<C>

Converts to this type from the input type.
source§

impl<C> From<&SigningKey<C>> for VerifyingKey<C>

source§

fn from(signing_key: &SigningKey<C>) -> VerifyingKey<C>

Converts to this type from the input type.
source§

impl<C> From<PublicKey<C>> for VerifyingKey<C>

source§

fn from(public_key: PublicKey<C>) -> VerifyingKey<C>

Converts to this type from the input type.
source§

impl<C> From<SigningKey<C>> for VerifyingKey<C>

source§

fn from(signing_key: SigningKey<C>) -> VerifyingKey<C>

Converts to this type from the input type.
source§

impl<C> FromStr for VerifyingKey<C>

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<VerifyingKey<C>, Error>

Parses a string s to return a value of this type. Read more
source§

impl<C> Ord for VerifyingKey<C>

source§

fn cmp(&self, other: &VerifyingKey<C>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<C> PartialEq for VerifyingKey<C>

source§

fn eq(&self, other: &VerifyingKey<C>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<C> PartialOrd for VerifyingKey<C>

source§

fn partial_cmp(&self, other: &VerifyingKey<C>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>

source§

fn verify_prehash( &self, prehash: &[u8], signature: &Signature<C>, ) -> Result<(), Error>

Use Self to verify that the provided signature for a given message prehash is authentic. Read more
source§

impl<C> PrehashVerifier<Signature<C>> for VerifyingKey<C>

source§

fn verify_prehash( &self, prehash: &[u8], signature: &Signature<C>, ) -> Result<(), Error>

Use Self to verify that the provided signature for a given message prehash is authentic. Read more
source§

impl<C> SignatureAlgorithmIdentifier for VerifyingKey<C>

§

type Params = AnyRef<'static>

Algorithm parameters.
source§

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>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(bytes: &[u8]) -> Result<VerifyingKey<C>, Error>

Performs the conversion.
source§

impl<C> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey<C>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( spki: SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>, ) -> Result<VerifyingKey<C>, Error>

Performs the conversion.
source§

impl<C> Verifier<Signature<C>> for VerifyingKey<C>

source§

fn verify(&self, msg: &[u8], signature: &Signature<C>) -> Result<(), Error>

Use Self to verify that the provided signature for a given message bytestring is authentic. Read more
source§

impl<C> Verifier<Signature<C>> for VerifyingKey<C>

source§

fn verify(&self, msg: &[u8], signature: &Signature<C>) -> Result<(), Error>

Use Self to verify that the provided signature for a given message bytestring is authentic. Read more
source§

impl<C> Copy for VerifyingKey<C>

source§

impl<C> Eq for VerifyingKey<C>