pub trait UserSecret: Sealed {
// Required methods
fn num_bundles(&self) -> usize;
fn fetch_keypair(&self) -> (&DHPrivateKey, &DHPublicKey);
fn message_auth_keypair(&self) -> &MessageKeyPair;
fn build_message(&self, message: Vec<u8>) -> Plaintext;
fn keybundles(&self) -> Vec<&MessageKeyBundle>;
}Expand description
Users have the following (secret traits) in common: They have a fetching keypair used to retrieve messages; They have a message authentication keypair used to implicitly authenticate their messages (via DH-AKEM); They can index a KeyBundle (tuple) and use it to attempt to decrypt a message.
Required Methods§
fn num_bundles(&self) -> usize
fn fetch_keypair(&self) -> (&DHPrivateKey, &DHPublicKey)
Sourcefn message_auth_keypair(&self) -> &MessageKeyPair
fn message_auth_keypair(&self) -> &MessageKeyPair
The long-term SD-APKE keypair (sk^APKE, pk^APKE)
fn build_message(&self, message: Vec<u8>) -> Plaintext
fn keybundles(&self) -> Vec<&MessageKeyBundle>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl UserSecret for Journalist
Private, common to all users, implemented for Journalists
impl UserSecret for Source
Private, common to all users, implemented for sources