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