pub struct LightSaber;Expand description
LightSaber KEM
Trait Implementations§
Source§impl Kem for LightSaber
impl Kem for LightSaber
Source§type PublicKey = SaberPublicKey
type PublicKey = SaberPublicKey
Public key type with appropriate constraints Read more
Source§type SecretKey = SaberSecretKey
type SecretKey = SaberSecretKey
Secret key type with security guarantees Read more
Shared secret type with security guarantees Read more
Source§type Ciphertext = SaberCiphertext
type Ciphertext = SaberCiphertext
Ciphertext type for the encapsulated key Read more
Source§type KeyPair = (<LightSaber as Kem>::PublicKey, <LightSaber as Kem>::SecretKey)
type KeyPair = (<LightSaber as Kem>::PublicKey, <LightSaber as Kem>::SecretKey)
Keypair type for efficient storage of related keys
Source§fn keypair<R: CryptoRng + RngCore>(
rng: &mut R,
) -> Result<(Self::PublicKey, Self::SecretKey)>
fn keypair<R: CryptoRng + RngCore>( rng: &mut R, ) -> Result<(Self::PublicKey, Self::SecretKey)>
Generate a new keypair Read more
Source§fn public_key(keypair: &Self::KeyPair) -> Self::PublicKey
fn public_key(keypair: &Self::KeyPair) -> Self::PublicKey
Extract public key from keypair
Source§fn secret_key(keypair: &Self::KeyPair) -> Self::SecretKey
fn secret_key(keypair: &Self::KeyPair) -> Self::SecretKey
Extract secret key from keypair Read more
Source§fn encapsulate<R: CryptoRng + RngCore>(
_rng: &mut R,
_public_key: &Self::PublicKey,
) -> Result<(Self::Ciphertext, Self::SharedSecret)>
fn encapsulate<R: CryptoRng + RngCore>( _rng: &mut R, _public_key: &Self::PublicKey, ) -> Result<(Self::Ciphertext, Self::SharedSecret)>
Encapsulate a shared secret using the recipient’s public key Read more
Source§fn decapsulate(
_secret_key: &Self::SecretKey,
_ciphertext: &Self::Ciphertext,
) -> Result<Self::SharedSecret>
fn decapsulate( _secret_key: &Self::SecretKey, _ciphertext: &Self::Ciphertext, ) -> Result<Self::SharedSecret>
Decapsulate a shared secret using the private key Read more
Auto Trait Implementations§
impl Freeze for LightSaber
impl RefUnwindSafe for LightSaber
impl Send for LightSaber
impl Sync for LightSaber
impl Unpin for LightSaber
impl UnwindSafe for LightSaber
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