Skip to content
v2.1These docs are for deaddrop 2.1: serve local files, stdin and URLs, allow-listed clients, expiring tickets, resumable fetches and seven new notifiers.What's new in 2.1 →

Encrypting at rest

Every deaddrop transfer is encrypted in transit: iroh connections are QUIC with TLS 1.3, end to end, even through a relay. --encrypt adds a second, optional layer: age encryption at rest.

Terminal window
deaddrop serve --encrypt 'magnet:?xt=urn:btih:...'
# stdout: <ticket> AGE-SECRET-KEY-1...
DEADDROP_KEY=AGE-SECRET-KEY-1... deaddrop fetch <ticket>

Or turn it on for every run in the config file:

[serve]
encrypt = true
Without --encrypt (default) With --encrypt
The ticket alone is enough to download and read the data The ticket gets the ciphertext; the key is needed to read it
Plaintext stays on the server’s disk while it’s served Plaintext is deleted as soon as each file is encrypted
File names and the torrent name are visible to whoever has the ticket Names are hidden in an encrypted manifest
One secret to hand over Two secrets, ideally over different channels

Turn it on when the ticket travels somewhere semi-public (a shared channel, a notifier you don’t fully trust), or when the server’s disk isn’t trusted.

  1. When the torrent finishes, each file is encrypted to a new X25519 key made for that torrent. Each plaintext file is deleted as soon as it’s encrypted (about one extra file’s worth of disk space), and the download folder is deleted afterwards, also if encryption fails.
  2. Only the encrypted files go into the blob store and over iroh. Collection entries are named 0, 1, …; the real names are in deaddrop-manifest.age.
  3. The key lives only in the server’s memory. It’s printed on stderr and stdout and sent to notifiers with include_key. Each reset gets a new key.
  4. fetch detects the encryption and decrypts with DEADDROP_KEY or --key.

Details: Encryption.

With --encrypt, the key normally shows up on the server’s terminal, stdout, and any log those go to. --hide-key (or serve.hide_key = true) keeps it off the server’s output entirely:

  • The key is never printed, on stderr or stdout. stdout gets just <ticket>.
  • It is never sent back to deaddrop reset.
  • The only copies go to notifiers with include_key (+key).
Terminal window
deaddrop serve ./file.torrent --encrypt --hide-key \
--notify discord=https://discord.com/api/webhooks/<id>/<token> \
--notify webhook+key=https://keys.example.com/hook
  • File sizes, file count, and that a transfer happened.
  • The plaintext exists on the server’s disk while the torrent downloads, and deleting a file doesn’t securely erase it (especially on SSDs).
  • Without --hide-key, the key ends up in any persistent log of the server’s output (systemd journal, a log file).

See the threat model.