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

Source

fn num_bundles(&self) -> usize

Source

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

Source

fn message_auth_keypair(&self) -> &MessageKeyPair

The long-term SD-APKE keypair (sk^APKE, pk^APKE)

Source

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

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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