pub trait KyberKeyFunctions {
// Required methods
fn keypair() -> Result<(Vec<u8>, Vec<u8>), CryptError>;
fn encap(public_key: &[u8]) -> Result<(Vec<u8>, Vec<u8>), CryptError>;
fn decap(
secret_key: &[u8],
ciphertext: &[u8],
) -> Result<Vec<u8>, CryptError>;
}Expand description
Trait for implementing key management functions. This trait provides an interface for key pair generation, encapsulation/decapsulation of secrets, and key manipulation (such as setting and getting key values).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.