pub enum PqcError {
Show 21 variants
KeyGenerationFailed(String),
EncapsulationFailed(String),
DecapsulationFailed(String),
SigningFailed(String),
VerificationFailed,
SerializationError(String),
InvalidInput(String),
RngError(String),
UnsupportedVariant(String),
InvalidKeySize {
expected: usize,
got: usize,
},
InvalidSignatureSize {
expected: usize,
got: usize,
},
InvalidCiphertextSize {
expected: usize,
got: usize,
},
ContextTooLong {
max: usize,
got: usize,
},
EncryptionFailed(String),
DecryptionFailed(String),
FeatureNotAvailable,
InvalidNonceLength,
InvalidKeyLength,
InvalidSignature,
EncryptionError,
DecryptionError,
}Expand description
Comprehensive error type for all PQC operations
Variants§
KeyGenerationFailed(String)
Key generation failed
EncapsulationFailed(String)
Encapsulation failed
DecapsulationFailed(String)
Decapsulation failed
SigningFailed(String)
Signing failed
VerificationFailed
Verification failed (signature invalid)
SerializationError(String)
Serialization/deserialization error
InvalidInput(String)
Invalid parameter or input
RngError(String)
RNG error
UnsupportedVariant(String)
Unsupported algorithm variant
InvalidKeySize
Invalid key size
InvalidSignatureSize
Invalid signature size
InvalidCiphertextSize
Invalid ciphertext size
ContextTooLong
Context too long (for ML-DSA)
EncryptionFailed(String)
Encryption failed
DecryptionFailed(String)
Decryption failed
FeatureNotAvailable
Feature not available
InvalidNonceLength
Invalid nonce length
InvalidKeyLength
Invalid key length
InvalidSignature
Invalid signature (for HMAC/MAC verification)
EncryptionError
Generic encryption error (for AEAD)
DecryptionError
Generic decryption error (for AEAD)
Trait Implementations§
Source§impl Error for PqcError
impl Error for PqcError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PqcError
impl RefUnwindSafe for PqcError
impl Send for PqcError
impl Sync for PqcError
impl Unpin for PqcError
impl UnwindSafe for PqcError
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