Skip to main content

encrypt

Function encrypt 

Source
pub fn encrypt<R, Sender, Recipient>(
    rng: &mut R,
    sender: &Sender,
    plaintext: &Plaintext,
    recipient: &Recipient,
) -> Envelope
where R: RngCore + CryptoRng, Sender: UserSecret + ?Sized, Recipient: UserPublic + ?Sized,
Expand description

Encrypt a message from a sender to a recipient (step 6).

Produces an Envelope containing:

  • ct^APKE: SD-APKE ciphertext (encrypted message)
  • ct^PKE: SD-PKE ciphertext (encrypted sender APKE public key)
  • (X, Z): hint for privacy-preserving message fetching