Skip to main content

UserSecret

Trait UserSecret 

Source
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§

Source

fn num_bundles(&self) -> usize

Source

fn fetch_keypair(&self) -> (&DHPrivateKey, &DHPublicKey)

Source

fn message_auth_key(&self) -> &MessagePrivateKey

The long-term SD-APKE private key sk^APKE.

Source

fn message_auth_pk(&self) -> &MessagePublicKey

The long-term SD-APKE public key pk^APKE.

Source

fn build_message(&self, message: Vec<u8>) -> Plaintext

Source

fn keybundles(&self) -> Vec<&MessageKeyBundle>

Implementors§

Source§

impl UserSecret for Journalist

Private, common to all users, implemented for Journalists

Source§

impl UserSecret for Source

Private, common to all users, implemented for sources