pub enum EceError {
SubscriptionKey(String),
AuthSecret(usize),
AuthSecretEncoding,
ServerKey,
RecordSize(u32),
PayloadTooLarge {
plaintext: usize,
limit: usize,
record_size: u32,
},
Aead,
Random(String),
}Expand description
Encryption refused the inputs. Nothing here carries key material: the
Display of every variant is safe to log.
Variants§
SubscriptionKey(String)
The subscription’s p256dh is not an uncompressed P-256 point.
AuthSecret(usize)
The subscription’s auth is not the 16 octets RFC 8291 §3.2 requires.
AuthSecretEncoding
The subscription’s auth is not base64url at all.
ServerKey
The application server’s own private key is unusable.
RecordSize(u32)
A record size below RFC 8188’s floor.
PayloadTooLarge
The plaintext does not fit one record. Checked before any key is derived and long before any request is built.
Aead
AES-128-GCM refused. Deliberately opaque — an AEAD failure detail is never useful to a caller and can be useful to an attacker.
Random(String)
The platform would not produce random bytes, so no salt and no ephemeral key. Failing is the only safe answer.
Trait Implementations§
Source§impl Error for EceError
impl Error for EceError
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()