pub trait Encapsulator {
// Required method
fn encapsulate(
&self,
recipient_public_key: &ThresholdPublicKey,
) -> Result<(EncapsulatedKey, SharedSecret), EncapsulateError>;
}Expand description
Trait for algorithm implementations of threshold KEM encapsulation.
Required Methods§
Sourcefn encapsulate(
&self,
recipient_public_key: &ThresholdPublicKey,
) -> Result<(EncapsulatedKey, SharedSecret), EncapsulateError>
fn encapsulate( &self, recipient_public_key: &ThresholdPublicKey, ) -> Result<(EncapsulatedKey, SharedSecret), EncapsulateError>
Encapsulate a fresh shared secret to recipient_public_key.
Returns (encapsulated_key, shared_secret) — the encryptor keeps
the shared secret for AEAD encryption, the encapsulated key
travels with the ciphertext.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".