pub struct Kopis768SecretKey(/* private fields */);Expand description
A secret key for this KEM
Implementations§
Source§impl Kopis768SecretKey
impl Kopis768SecretKey
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) -> Kopis768PublicKey
pub fn public_key(&self) -> Kopis768PublicKey
Returns the public key corresponding to this secret key
Source§impl Kopis768SecretKey
impl Kopis768SecretKey
Sourcepub fn decapsulate(&self, encapsulated_key: &Kopis768Ciphertext) -> SharedSecret
pub fn decapsulate(&self, encapsulated_key: &Kopis768Ciphertext) -> 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 Kopis768SecretKey
impl RefUnwindSafe for Kopis768SecretKey
impl Send for Kopis768SecretKey
impl Sync for Kopis768SecretKey
impl Unpin for Kopis768SecretKey
impl UnsafeUnpin for Kopis768SecretKey
impl UnwindSafe for Kopis768SecretKey
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