Skip to main content

Module crypto

Module crypto 

Source

Structs§

EpochSealer
Seals under one epoch and opens frames of any epoch it holds. Each frame names its epoch and key id, which the AEAD binds as associated data.
PassthroughEncryptor
WireKey
The wire subkey of one identity key epoch.
XChaChaEncryptor

Traits§

SyncEncryptor

Functions§

default_key_path
frame_epoch
The epoch an epoch-sealed frame names, None for any other frame.
line_epoch
The epoch a sealed wire line names, None when it names none.
load_or_create_key
Load the 32-byte sync key from path, generating and persisting a fresh one if absent. The file is written 0600 because the key grants full read of every synced memory (safety: file perms must be 0600).
open_line
Open one wire line back into the plaintext JSONL record.
read_key_file
Reads a sync.key written by sync protocol 3 or older without ever creating one.
seal_line
Seal one plaintext JSONL record into a single base64 line safe for the line-oriented SSH transport. base64 is required because the AEAD frame is binary and the wire is newline-delimited text.