pub enum KemError {
EncapsulationKeyLength {
len: usize,
},
EncapsulationKeyNotReduced,
DecapsulationKeyLength {
len: usize,
},
DecapsulationKeyCorrupt,
CiphertextLength {
len: usize,
},
}Variants§
EncapsulationKeyLength
The encapsulation key is not EK_BYTES bytes (the ek type check).
EncapsulationKeyNotReduced
A 12-bit coefficient of the encapsulation key is q or more (the ek modulus check).
DecapsulationKeyLength
The decapsulation key is not DK_BYTES bytes (the dk type check).
DecapsulationKeyCorrupt
The H(ek) inside the decapsulation key is not the hash of the ek beside it (the hash check).
CiphertextLength
The ciphertext is not CT_BYTES bytes (the ciphertext type check).
Trait Implementations§
Source§impl Error for KemError
impl Error for KemError
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()
impl Copy for KemError
impl Eq for KemError
impl StructuralPartialEq for KemError
Auto Trait Implementations§
impl Freeze for KemError
impl RefUnwindSafe for KemError
impl Send for KemError
impl Sync for KemError
impl Unpin for KemError
impl UnsafeUnpin for KemError
impl UnwindSafe for KemError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.