pub enum EnvelopeError {
TagMismatch,
CounterNotMonotonic {
expected: u32,
got: u32,
},
AadMismatch,
ChannelBindingMismatch,
SessionExhausted,
KeyDerivation(String),
Cipher(String),
}Expand description
Errors produced by envelope open/seal.
Variants§
TagMismatch
AEAD tag did not verify. Could be a wrong key, wrong nonce, or tampered ciphertext / AAD.
CounterNotMonotonic
Counter in incoming envelope ≤ last-seen counter — replay or out-of-order.
Fields
AadMismatch
AAD fields (session_id / path / counter) disagree between sealer and opener.
ChannelBindingMismatch
The envelope was sealed on a different TLS channel than the one it is being opened on — its RFC 9266 channel binding does not match this session’s. This is the anti-relay rejection: a proof captured on one TLS connection and replayed onto another is refused here.
SessionExhausted
Session has reached the message cap; must renegotiate a fresh
TransportKey.
KeyDerivation(String)
HKDF-expand of the envelope key failed.
Cipher(String)
Provider-layer AEAD error that is not a tag mismatch (e.g. invalid key length).
Trait Implementations§
Source§impl Debug for EnvelopeError
impl Debug for EnvelopeError
Source§impl Display for EnvelopeError
impl Display for EnvelopeError
Source§impl Error for EnvelopeError
impl Error for EnvelopeError
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()