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.
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 = trueWhen to use it
Section titled “When to use it”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.
What it does
Section titled “What it does”- 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.
- Only the encrypted files go into the blob store and over iroh. Collection
entries are named
0,1, …; the real names are indeaddrop-manifest.age. - 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. fetchdetects the encryption and decrypts withDEADDROP_KEYor--key.
Details: Encryption.
Hide the key
Section titled “Hide the key”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).
deaddrop serve ./file.torrent --encrypt --hide-key \ --notify discord=https://discord.com/api/webhooks/<id>/<token> \ --notify webhook+key=https://keys.example.com/hook[serve]encrypt = truehide_key = true
[[serve.notify]]type = "discord" # ticket onlyurl = "https://discord.com/api/webhooks/<id>/<token>"
[[serve.notify]]type = "webhook"url = "https://keys.example.com/hook"include_key = true # the only copy of the keyWhat it doesn’t hide
Section titled “What it doesn’t hide”- 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.