pub enum ParameterSet {
MlKem512,
MlKem768,
MlKem1024,
}Expand description
ML-KEM parameter sets (FIPS 203).
Variants§
MlKem512
ML-KEM-512 (NIST Level 1 / AES-128 equivalent).
MlKem768
ML-KEM-768 (NIST Level 3 / AES-192 equivalent). Recommended default.
MlKem1024
ML-KEM-1024 (NIST Level 5 / AES-256 equivalent).
Implementations§
Source§impl ParameterSet
impl ParameterSet
Sourcepub fn public_key_size(&self) -> usize
pub fn public_key_size(&self) -> usize
Public key size in bytes for this parameter set.
Sourcepub fn ciphertext_size(&self) -> usize
pub fn ciphertext_size(&self) -> usize
Ciphertext (encapsulated key) size.
Shared secret size (always 32 bytes).
Trait Implementations§
Source§impl Clone for ParameterSet
impl Clone for ParameterSet
Source§fn clone(&self) -> ParameterSet
fn clone(&self) -> ParameterSet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ParameterSet
Source§impl Debug for ParameterSet
impl Debug for ParameterSet
Source§impl<'de> Deserialize<'de> for ParameterSet
impl<'de> Deserialize<'de> for ParameterSet
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ParameterSet
Source§impl PartialEq for ParameterSet
impl PartialEq for ParameterSet
Source§fn eq(&self, other: &ParameterSet) -> bool
fn eq(&self, other: &ParameterSet) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ParameterSet
impl Serialize for ParameterSet
impl StructuralPartialEq for ParameterSet
Auto Trait Implementations§
impl Freeze for ParameterSet
impl RefUnwindSafe for ParameterSet
impl Send for ParameterSet
impl Sync for ParameterSet
impl Unpin for ParameterSet
impl UnsafeUnpin for ParameterSet
impl UnwindSafe for ParameterSet
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