Skip to content

Security

How securesend keeps your files private

Files travel directly between two browsers, encrypted twice. This page explains every layer, what our server can and can't see, and the limits of the design.

Last updated 27 November 2026

The short version

  • File data never touches our servers. It goes browser to browser over WebRTC.
  • Two layers of encryption: WebRTC's mandatory DTLS, plus our own AES-256-GCM layer with a key our server never receives.
  • The file list (names, sizes, types) is encrypted the same way. The server can't read it.
  • Every file is checked with SHA-256 when it arrives.
  • The sender approves each receiver. Short codes add a 4-word Safety Check against interception.

1. Making the connection

When you create a link, your browser opens a WebSocket to our signaling server, which hands out a random 128-bit room id. A receiver joins that room, you click Allow, and the two browsers exchange connection offers (SDP) and network candidates (ICE) through the server. The server relays these messages without parsing them.

Browsers then find a direct path using public STUN servers. If both devices are on the same Wi-Fi, they connect over your local network. We don't run a relay by default, so if no direct path exists the transfer can't start and you'll see how to fix it. If an operator enables the optional self-hosted relay, traffic through it is still encrypted end to end; the relay sees only ciphertext.

A share link looks like securesend.cc/r#<room>.<key>. The part after # is the URL fragment. Browsers never send fragments to servers: not in requests, not in our Apache logs, not in Referer headers. The receive page reads it, then immediately removes it from the address bar with history.replaceState.

The key is 256 random bits from crypto.getRandomValues. Both sides run HKDF-SHA-256 over it (salted with the room id) to get separate keys for each direction plus a key-confirmation key. Before the sender reveals anything, the receiver must answer a random challenge with an HMAC under that confirmation key, proving it holds the link. Anyone without the key, including our server, fails this check and receives nothing.

3. Short-code mode: ECDH and the Safety Check

A code like tiger-maple-42 contains no secret; it's only a way to find the room. So the browsers create a fresh key with an Elliptic-curve Diffie-Hellman exchange (P-256) over the encrypted data channel.

On its own, that exchange can't tell whether someone in the middle (for example a compromised signaling server) swapped the keys. So both screens show four words derived from a hash of both public keys. If the words match, the keys weren't swapped. The sender commits to its key before seeing the receiver's, so an attacker gets exactly one guess (about 1 in 241) instead of being able to search for matching words. Nothing is sent until both people confirm.

Codes are low-entropy, so the server limits code attempts to 10 per minute per IP and locks out an address after 20 wrong codes.

4. Encrypting the data

  • Files are split into 64 KiB chunks (smaller if a browser requires it) and encrypted with AES-256-GCM in a Web Worker.
  • Each chunk's 96-bit nonce is the file index (32 bits) plus a 64-bit counter made of an attempt number and the chunk index, so a nonce is never reused under one key, even when a transfer resumes or a file is re-sent.
  • The file index, chunk index and an is-last flag are authenticated as additional data. Chunks can't be reordered, moved between files, or cut off without detection.
  • The file list is encrypted the same way in its own index space, and so are control messages (with replay protection).
  • This all sits inside WebRTC's DTLS encryption, which every browser enforces on data channels.

5. Verifying what arrived

The sender computes a SHA-256 hash of each file while reading it and sends the hash, encrypted, after the last chunk. The receiver hashes what it writes and compares. Matching files get a ✓. A mismatch marks the file as failed and, where the browser allows it, offers to request it again.

Every item is also fingerprinted (SHA-256) on the sender's device as soon as it's added, and that fingerprint travels in the encrypted file list. Both screens show it, so you can compare them out loud or over chat for extra assurance, and the receiver rejects a file whose hash doesn't match it.

Nearby devices

Senders can choose to appear, under a random nickname, to receivers on the same network (the server compares a salted hash of the public IPv4 address or IPv6 /64; it never sees local addresses). Nearby connections carry no secret, so they use the same ECDH key exchange and 4-word Safety Check as short codes, and the sender still approves every receiver. On shared networks (cafés, offices) other people on the network can see the nickname, which is why the Safety Check matters.

6. What the server sees

SeesNever sees
Random room id and short code (in memory, until the room expires)File names, types, sizes or contents
IP addresses (in memory, salted-hashed, for rate limiting)The encryption key or Safety Check words
Connection setup messages (relayed, not parsed)Anything that links a stats row to you
One anonymous stats row per finished transfer (size rounded up to the MiB, hour bucket, outcome)Your files, ever

Details in the privacy policy.

7. Limits of the design

  • You trust the code your browser loads. Like any web app, a compromised web server could serve malicious JavaScript. We use a strict Content Security Policy and no third-party scripts, but this is inherent to web-based encryption.
  • Anyone with the link can ask to connect. Share it privately; you still approve each receiver.
  • IP addresses are visible to the other peer. Direct connections mean the two browsers learn each other's network address, as with any peer-to-peer app.
  • Metadata is visible to your network. Someone watching your network can see that a connection happened and roughly how much data moved, but not what it was.

Reporting a vulnerability

Email security@securesend.cc. Please give us a reasonable time to fix an issue before disclosing it.