pub struct Kopis1024SecretKey(/* private fields */);Expand description
A secret key for this KEM
Implementations§
Source§impl Kopis1024SecretKey
impl Kopis1024SecretKey
Sourcepub fn expand_from_seed(bytes: &[u8; 32]) -> Self
pub fn expand_from_seed(bytes: &[u8; 32]) -> Self
Deserializes a secret key from a 32-byte seed
Sourcepub fn public_key(&self) -> Kopis1024PublicKey
pub fn public_key(&self) -> Kopis1024PublicKey
Returns the public key corresponding to this secret key
Source§impl Kopis1024SecretKey
impl Kopis1024SecretKey
Sourcepub fn decapsulate(
&self,
encapsulated_key: &Kopis1024Ciphertext,
) -> SharedSecret
pub fn decapsulate( &self, encapsulated_key: &Kopis1024Ciphertext, ) -> SharedSecret
Decapsulates an encapsulated key and returns the resulting shared secret. If the encapsulated key is invalid, then the shared secret will be pseudorandom garbage.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Kopis1024SecretKey
impl RefUnwindSafe for Kopis1024SecretKey
impl Send for Kopis1024SecretKey
impl Sync for Kopis1024SecretKey
impl Unpin for Kopis1024SecretKey
impl UnsafeUnpin for Kopis1024SecretKey
impl UnwindSafe for Kopis1024SecretKey
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