pub enum MlDsaError {
RngFailure,
InvalidPublicKey,
InvalidSecretKey,
InvalidSignature,
ContextTooLong,
VerificationFailed,
}Expand description
Error types for ML-DSA operations.
Each variant corresponds to a specific failure mode that can occur during key generation, signing, or verification.
Variants§
RngFailure
Random number generation failed.
Returned when the underlying RNG (e.g., /dev/urandom) cannot provide bytes.
InvalidPublicKey
Invalid public key (wrong length or format).
The provided public key does not have the expected byte length for the chosen parameter set.
InvalidSecretKey
Invalid secret key (wrong length or format).
The provided secret key does not have the expected byte length for the chosen parameter set.
InvalidSignature
Invalid signature (wrong length or format).
The provided signature does not have the expected byte length for the chosen parameter set, or its internal encoding is malformed.
ContextTooLong
Context string too long (> 255 bytes).
FIPS 204 limits the optional context string to at most 255 bytes.
VerificationFailed
Signature verification failed.
Trait Implementations§
Source§impl Clone for MlDsaError
impl Clone for MlDsaError
Source§fn clone(&self) -> MlDsaError
fn clone(&self) -> MlDsaError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MlDsaError
impl Debug for MlDsaError
Source§impl Display for MlDsaError
impl Display for MlDsaError
Source§impl Error for MlDsaError
Available on crate feature std only.
impl Error for MlDsaError
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()