pub enum OpenError {
Decode(DecodeError),
RecipientKeyMismatch,
PartyMismatch,
OpenFailed,
Provider {
message: String,
},
}Expand description
Why opening (decrypting) a message failed.
Authentication failures are deliberately opaque: a wrong key, tampered
ciphertext, mismatched external AAD, and a low-order ephemeral all surface
as the single OpenError::OpenFailed arm (no oracle).
Variants§
Decode(DecodeError)
Strict decode rejected the message.
RecipientKeyMismatch
The message is addressed to a different recipient key id.
PartyMismatch
The KDF party identities on the wire do not match the pinned expectation.
OpenFailed
AEAD authentication failed: wrong key, tampered ciphertext or headers, mismatched external AAD, or a degenerate (low-order) ephemeral. Opaque on purpose.
Provider
The backing provider (for example the broker unseal RPC) failed. The message is diagnostic transport/provider detail, never key material.
Trait Implementations§
impl Eq for OpenError
Source§impl Error for OpenError
impl Error for OpenError
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()
Source§impl From<DecodeError> for OpenError
impl From<DecodeError> for OpenError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for OpenError
Auto Trait Implementations§
impl Freeze for OpenError
impl RefUnwindSafe for OpenError
impl Send for OpenError
impl Sync for OpenError
impl Unpin for OpenError
impl UnsafeUnpin for OpenError
impl UnwindSafe for OpenError
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