pub trait UserSecret: Sealed {
// Required methods
fn num_bundles(&self) -> usize;
fn fetch_keypair(&self) -> (&DHPrivateKey, &DHPublicKey);
fn message_auth_key(&self) -> &MessagePrivateKey;
fn message_auth_pk(&self) -> &MessagePublicKey;
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_key(&self) -> &MessagePrivateKey
fn message_auth_key(&self) -> &MessagePrivateKey
The long-term SD-APKE private key sk^APKE.
Sourcefn message_auth_pk(&self) -> &MessagePublicKey
fn message_auth_pk(&self) -> &MessagePublicKey
The long-term SD-APKE public key pk^APKE.
fn build_message(&self, message: Vec<u8>) -> Plaintext
fn keybundles(&self) -> Vec<&MessageKeyBundle>
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