Type Alias mas_jose::jwa::Es384VerifyingKey
source · pub type Es384VerifyingKey = VerifyingKey<NistP384>;
Aliased Type§
struct Es384VerifyingKey { /* private fields */ }
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> 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,
§type Params = ObjectIdentifier
type Params = ObjectIdentifier
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>
impl<C> Clone for VerifyingKey<C>
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>
impl<C> Debug for VerifyingKey<C>
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.source§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§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>
source§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> 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> 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.