Skip to main content

seal_commit_log_entry

Function seal_commit_log_entry 

pub fn seal_commit_log_entry(
    keys: &GroupKeys,
    plaintext: &[u8],
) -> Result<SealedCommitLogEntry, SealError>
Expand description

Seal an encoded PlaintextCommitLogEntry for the conversation’s commit log, after the self-check.

The nonce is the first 12 bytes of HMAC-SHA256 under the commit-log nonce key of the topic followed by plaintext. The ciphertext is the ChaCha20-Poly1305 encryption of the same plaintext under the commit-log encryption key, with the topic as associated data. The same entry sealed twice gives the same bytes, so a retry is a duplicate.