bongsmoke.cloud
How it works · RFC 4:20 §§4–6, abridged

Two halves, kept apart.

Most “self-destructing note” services encrypt your message and then store the result on their own servers. You are trusting them not to keep it. This one is built so that there is nothing to keep.

The life of one note

  • Your half. 256 random bits, made in your browser.
  • The server’s half. HMAC(secret, note ID), computed on demand. Stored nowhere.
  1. MintSender’s browser ↔ server

    Your browser asks for a note. The server picks a random ID, computes its half from a secret and that ID, hands both back, and writes nothing down.

    POST /api/create → { noteId, B }
    Your halfDoesn’t exist yet
    Server’s halfComputed, handed to the sender
    Stored about the noteNothing
  2. SealSender’s browser only

    Your browser makes its own 256 random bits. HKDF over both halves gives an AES-256-GCM key. The message is compressed, padded, and encrypted, and the server’s half is thrown away.

    key = HKDF(A ‖ B) → AES-256-GCM
    Your halfMade here: 256 random bits
    Server’s halfUsed once, discarded
    Stored about the noteNothing
  3. SendWhatever app you paste it into

    The link is the whole note. Your half and the ciphertext sit after the #, the one part of a URL that browsers never send to any server.

    /n/<id>#1.<A>.<iv>.<ciphertext>
    Your halfIn the link, after the #
    Server’s halfNowhere. Computable, not stored
    Stored about the noteNothing
  4. RevealReader’s browser ↔ server

    Opening the link fetches nothing. Pressing Reveal sends the ID and only the ID. One atomic SET NX decides it: the first caller wins, and only the winner gets the server’s half.

    SET <hash of id> 1 NX EX <ttl>
    Your halfIn the reader’s browser, never sent
    Server’s halfRecomputed and released, once
    Stored about the noteOne burn marker: a hashed ID and a 1-byte value
  5. GoneEveryone, forever

    The reader’s browser rebuilds the key, decrypts, and clears the fragment from its address bar. Copies of the link still exist in history and in the chat. None of them can get the server’s half again.

    → 410 { "error": "gone" }
    Your halfCleared from the reader’s tab
    Server’s halfRefused, every time after
    Stored about the noteThe marker, until the note would have expired anyway

Anatomy of the link

bongsmoke.cloud/n/<id>The server can see this part. The ID alone opens nothing.#1.<A>.<iv>.<ciphertext>The fragment. Never in a request, a Referer, or a log.

The server can compute its half on demand from a secret and the note ID. It stores neither, and it releases the half once. An optional passphrase adds a third share, which is never sent to us at all.

The short version

The key that opens your note is assembled from two pieces that never sit in the same place. One piece rides inside the link. The other is computed by our server, handed out a single time, and then refused forever.

Neither piece is any use alone, and the only one we can ever produce is ours.

Writing a note

Your browser asks the server for an identifier. The server invents one: 128 random bits plus the moment the note should die. It computes its half of the key from that identifier and a secret only it knows, and returns both. It writes nothing down. There is no record that a note was created, because there is nothing worth recording.

Your browser then generates 256 random bits of its own, combines them with the server’s half through HKDF to produce an AES-256 key, compresses and pads your message, encrypts it, and throws the server’s half away. What is left is a link:

Everything after the # is a URL fragment. It is the one part of a web address that a browser keeps to itself: it is not in the request, not in the Referer header, not in any server log anywhere. The encrypted message travels entirely inside the link you send.

Reading a note

Opening the link fetches nothing. That is deliberate: chat apps and mail servers follow links to build previews, and a page that phoned home on load would be burned by a bot before the recipient ever saw it. Nothing happens until someone presses Reveal.

At that point the browser sends one thing, the identifier, and asks for the missing half. The server checks the expiry, then performs a single atomic write: mark this note burned, but only if it is not already marked. If that write succeeds, this is the first reader, and the server computes its half and returns it. If it fails, the answer is simply gone, and no amount of asking changes it.

First one wins. Everyone after gets a 410.

Forty readers at once, from forty addresses: one 200, thirty-nine 410s, one burn marker. That is a test, and it passes.

The browser reassembles the key, decrypts, shows you the note, and clears the fragment out of the address bar. At no point did the ciphertext or the plaintext cross the network.

What we actually store

Burn markers
A fixed-size flag under a hash of the note identifier, set the first time a note is opened. It expires on its own. It cannot be turned back into a note, a link, or a message.
Rate-limit counters
An integer per endpoint per ten-minute window, keyed by a hash of the IP address rather than the address itself. Also expires on its own.
That is the entire database
No messages. No ciphertext. No key shares. No account, because there is nothing to attach one to.

A passphrase, if you want one

Adding a passphrase stretches it with PBKDF2-SHA256 at 600,000 iterations and mixes the result into the key alongside the other two shares. It is a third factor, not a replacement: someone would need the link and the first reveal and the passphrase. Send it through a different channel than the link, or it is decoration.

What this does not protect you from

  • Anyone who sees the full link first can read the note. Your recipient will find it already burned.
  • The link lingers. The fragment may stay in your own browser history and in whatever app you pasted it into.
  • Readers keep things. Once someone has read a note, nothing stops them keeping it.

The threat model is written out in full, including the parts that are inconvenient.

That is the whole trick.

Write something, get a link, send it once. We will compute our half at most one more time.