pub struct SecretKey1024 { /* private fields */ }Expand description
ML-KEM-1024 decapsulation key (secret key).
Implementations§
Source§impl SecretKey1024
impl SecretKey1024
pub fn from_bytes(bytes: &[u8; 3168]) -> Self
pub fn to_bytes(&self) -> [u8; 3168]
pub fn generate() -> (Self, PublicKey1024)
pub fn decapsulate( &self, ciphertext: &[u8; 1568], ) -> Result<[u8; 32], MlKemError>
pub fn public_key(&self) -> PublicKey1024
Trait Implementations§
Source§impl Clone for SecretKey1024
impl Clone for SecretKey1024
Source§fn clone(&self) -> SecretKey1024
fn clone(&self) -> SecretKey1024
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 moreSource§impl Debug for SecretKey1024
impl Debug for SecretKey1024
Source§impl Drop for SecretKey1024
impl Drop for SecretKey1024
impl Eq for SecretKey1024
Source§impl PartialEq for SecretKey1024
impl PartialEq for SecretKey1024
Source§fn eq(&self, other: &SecretKey1024) -> bool
fn eq(&self, other: &SecretKey1024) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SecretKey1024
Source§impl TryFrom<&[u8]> for SecretKey1024
impl TryFrom<&[u8]> for SecretKey1024
Auto Trait Implementations§
impl Freeze for SecretKey1024
impl RefUnwindSafe for SecretKey1024
impl Send for SecretKey1024
impl Sync for SecretKey1024
impl Unpin for SecretKey1024
impl UnsafeUnpin for SecretKey1024
impl UnwindSafe for SecretKey1024
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