Skip to content

Encryption

Every share is served over TLS and stored encrypted at rest. That protects it in transit and on disk, but the service holds those keys, so it can read the file.

End-to-end encryption is the stronger claim, and it is opt-in. The file is encrypted on your machine before upload, and the key never reaches the server in a form the server can use. No endpoint in the API can return the plaintext of an end-to-end encrypted share, because nothing on that side has the key.

Terminal window
s2u devices # your signed-in machines
s2u secret.env --device laptop # to one of your own
s2u brief.pdf --contact alex@acme.dev # to someone else, contacts only

The content key is generated on your machine and sealed to the target device’s public key. The server relays a blob it cannot open.

Terminal window
s2u tax-2025.pdf --private

Uploads without sharing it with anyone. Only your account can open it, and passing the link back to s2u on any machine you are signed in on gets the file. It composes with --expires and --password.

When an encrypted share is fetched by link, the key travels in the URL fragment, after the #. Browsers do not send the fragment to the server, so the key stays on the client side. It does mean the link is the secret: anyone you give the complete link to can decrypt the file, and a link with the fragment stripped is useless.

Encrypted content is written as a framed stream: a header, then chunks of at most 64 KiB, each sealed with AES-256-GCM. Two properties are worth knowing about.

The end of the stream is authenticated. A truncated file fails to decrypt rather than quietly producing a short one, so a relay or a server cannot drop the tail without you noticing.

Every stream derives its own key. The header carries a random salt, and the key that encrypts the bytes is derived from your content key and that salt. One content key can therefore encrypt any number of files safely.

The format carries its version, and every version ever written is still readable. The reverse is not true: a file written by a current client will not open in an older one, which reports the format as unsupported. If you see that, update the client that is reading.