#[non_exhaustive]pub enum Error {
InvalidInput,
VerificationFailed,
Unsupported,
EntropyFailed,
RngError,
SelfTestFailed(&'static str),
}Expand description
The unified error type of the module boundary.
Rule: attacker-controlled input (network data, certificates, key
files) must never panic — every failure is returned as this error
(AGENTS.md hard rule 4). non_exhaustive: variants may be added as
milestones land.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidInput
Input length or format does not satisfy the algorithm’s requirements.
VerificationFailed
Verification of a key/IV/tag failed (AEAD open, signature verification, etc.). Comparisons are constant-time; the error must not distinguish failure reasons.
Unsupported
The requested algorithm or curve is unavailable in this build (approved mode).
EntropyFailed
Entropy source failure (OS randomness unavailable).
RngError
DRBG failure (health test failed, generation limit exceeded, etc.).
SelfTestFailed(&'static str)
Power-on self-test failed: the module is in an error state and refuses service until re-initialized.
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()