pub struct VerifyingKey<P: ParameterSet> { /* private fields */ }
Expand description
An ML-DSA verification key
Implementations§
Source§impl<P: MlDsaParams> VerifyingKey<P>
impl<P: MlDsaParams> VerifyingKey<P>
Sourcepub fn verify_internal(&self, Mp: &[&[u8]], sigma: &Signature<P>) -> boolwhere
P: MlDsaParams,
pub fn verify_internal(&self, Mp: &[&[u8]], sigma: &Signature<P>) -> boolwhere
P: MlDsaParams,
This algorithm reflects the ML-DSA.Verify_internal algorithm from FIPS 204. It does not include the domain separator that distinguishes between the normal and pre-hashed cases, and it does not separate the context string from the rest of the message.
Sourcepub fn verify_with_context(
&self,
M: &[u8],
ctx: &[u8],
sigma: &Signature<P>,
) -> bool
pub fn verify_with_context( &self, M: &[u8], ctx: &[u8], sigma: &Signature<P>, ) -> bool
This algorithm reflect the ML-DSA.Verify algorithm from FIPS 204.
Sourcepub fn encode(&self) -> EncodedVerifyingKey<P>
pub fn encode(&self) -> EncodedVerifyingKey<P>
Encode the key in a fixed-size byte array.
Sourcepub fn decode(enc: &EncodedVerifyingKey<P>) -> Self
pub fn decode(enc: &EncodedVerifyingKey<P>) -> Self
Decode the key from an appropriately sized byte array.
Trait Implementations§
Source§impl<P: MlDsaParams> AsRef<VerifyingKey<P>> for KeyPair<P>
impl<P: MlDsaParams> AsRef<VerifyingKey<P>> for KeyPair<P>
Source§fn as_ref(&self) -> &VerifyingKey<P>
fn as_ref(&self) -> &VerifyingKey<P>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<P: Clone + ParameterSet> Clone for VerifyingKey<P>
impl<P: Clone + ParameterSet> Clone for VerifyingKey<P>
Source§fn clone(&self) -> VerifyingKey<P>
fn clone(&self) -> VerifyingKey<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<P: Debug + ParameterSet> Debug for VerifyingKey<P>
impl<P: Debug + ParameterSet> Debug for VerifyingKey<P>
Source§impl<P> EncodePublicKey for VerifyingKey<P>
Available on crate feature alloc
only.
impl<P> EncodePublicKey for VerifyingKey<P>
Available on crate feature
alloc
only.Source§impl<P: PartialEq + ParameterSet> PartialEq for VerifyingKey<P>
impl<P: PartialEq + ParameterSet> PartialEq for VerifyingKey<P>
Source§impl<P> SignatureAlgorithmIdentifier for VerifyingKey<P>
Available on crate feature pkcs8
only.
impl<P> SignatureAlgorithmIdentifier for VerifyingKey<P>
Available on crate feature
pkcs8
only.Source§const SIGNATURE_ALGORITHM_IDENTIFIER: AlgorithmIdentifier<Self::Params> = Signature<P>::ALGORITHM_IDENTIFIER
const SIGNATURE_ALGORITHM_IDENTIFIER: AlgorithmIdentifier<Self::Params> = Signature<P>::ALGORITHM_IDENTIFIER
AlgorithmIdentifier
for the corresponding singature system.Source§impl<P> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey<P>
Available on crate feature pkcs8
only.
impl<P> TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for VerifyingKey<P>
Available on crate feature
pkcs8
only.Source§impl<P: MlDsaParams> Verifier<Signature<P>> for VerifyingKey<P>
impl<P: MlDsaParams> Verifier<Signature<P>> for VerifyingKey<P>
impl<P: ParameterSet> StructuralPartialEq for VerifyingKey<P>
Auto Trait Implementations§
impl<P> Freeze for VerifyingKey<P>
impl<P> RefUnwindSafe for VerifyingKey<P>where
<<P as ParameterSet>::K as ArraySize>::ArrayType<Polynomial<BaseField>>: RefUnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttVector<BaseField, <P as ParameterSet>::L>>: RefUnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttPolynomial<BaseField>>: RefUnwindSafe,
impl<P> Send for VerifyingKey<P>
impl<P> Sync for VerifyingKey<P>
impl<P> Unpin for VerifyingKey<P>
impl<P> UnwindSafe for VerifyingKey<P>where
<<P as ParameterSet>::K as ArraySize>::ArrayType<Polynomial<BaseField>>: UnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttVector<BaseField, <P as ParameterSet>::L>>: UnwindSafe,
<<P as ParameterSet>::K as ArraySize>::ArrayType<NttPolynomial<BaseField>>: 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DecodePublicKey for T
impl<T> DecodePublicKey for T
Source§impl<T> DynSignatureAlgorithmIdentifier for Twhere
T: SignatureAlgorithmIdentifier,
impl<T> DynSignatureAlgorithmIdentifier for Twhere
T: SignatureAlgorithmIdentifier,
Source§fn signature_algorithm_identifier(
&self,
) -> Result<AlgorithmIdentifier<Any>, Error>
fn signature_algorithm_identifier( &self, ) -> Result<AlgorithmIdentifier<Any>, Error>
AlgorithmIdentifier
for the corresponding singature system.