ruin.chat: small, sealed, and self-contained
A chat built to a radio packet's budget: every message sealed so the relays can't read it, a web client with no framework, and a first bot that posts the news by handing lines to the real client instead of reinventing the cryptography.
Most chat software assumes a fast, always-on line to a company’s servers. ruin.chat starts from the opposite question: what would a chat look like if a single message had to fit in one short radio packet, survive being passed from hand to hand, and never trust the thing carrying it?
The answer shapes everything that follows. One rule first, because the rest falls out of it: a relay never sees what you wrote. It moves sealed bytes it cannot open. Everything else — how small a message is, what a bot can be, why there is no framework in the web client — is a consequence of starting there.
🔺 A message the size of a breath
The design target is not a data center. It is a low-power radio mesh, the kind where a node might speak in bursts of a couple hundred bytes and then go quiet for hours. So a post in ruin.chat is held to a budget: signed, encrypted, and still small enough to fit a single LoRa datagram of about 165 bytes. The internet version is kept honest about this by its own test suite, which fails if a message outgrows the budget.
That constraint is a feature, not a hardship. A message small enough for a radio packet is also small enough to sit on a USB stick, ride along in an email, or wait on a relay until the person it is for comes back online. Each message is self-contained and self-verifying: it carries everything needed to check that it is genuine, so it does not matter who hands it to you. Store it, forward it, lose half your network — the message is still the message.
The web client follows the same discipline. There is no framework, no megabyte of JavaScript to download before the first word appears. The page is built element by element, and — this matters for safety as much as for size — it is never assembled by pasting text into HTML. A post, a name, a headline from a feed: all of it arrives as text and stays text, which closes off the most common way a chat app gets turned against the people reading it.
🔺 Sealed to a room
Every conversation in ruin.chat is a room, and every message is encrypted to its room before it leaves your device. The relays that carry it store ciphertext. They can tell that something moved, and roughly when, but not what it said.
The sealing is bound to its context. A message is tied to the room it belongs to and to the account that wrote it, so a relay — or anyone else — cannot lift a message out of one room and replay it in another, or forge one in your name. The signatures are deliberately tiny, because a fat signature would blow the packet budget; shrinking them without weakening them was one of the harder problems, and it is exactly the sort of thing I want other people to look at.
Which brings me to the part I would rather say plainly than bury. This is experimental, and its cryptography has not yet had an independent review. A few things are true today and worth knowing before anyone leans on it. The relays cannot read your messages, but they can still see metadata: your address, the timing, which rooms you follow. Your keys live in your browser, which is the ordinary trade-off for end-to-end encryption that runs on a web page, and it means anything that can run code in that page can reach them. So: promising to carry a secret, not yet proven to keep one. I would rather ship it saying that than dress it up.
🔺 The first bot
With the pieces in place, I wanted a small proof that the thing was pleasant to build on. The test was a news bot: pick a recent article, post it to the public #news channel with a short summary, and do it every few minutes.
The obvious way to write a bot is to have it speak the protocol directly. For ruin.chat that would mean reimplementing the sealed envelopes and the signatures in a throwaway script — which is precisely how you get a subtle, confident, dangerous bug, the kind that looks encrypted and isn’t. So the bot does not speak the protocol at all.
Instead it is a thin program that does only the boring parts: it fetches a feed from posthole.net, picks the newest article it has not already posted, trims a summary down to something that respects the packet budget, and then hands that line to the real command-line client. The client does the sealing and the signing — the same code a person’s app uses — and puts the message on a relay. The bot never handles a key beyond pointing the client at one. It keeps a small list of what it has already posted so it never repeats itself, and when the feed has nothing new it simply says so and waits.
This is the whole payoff of the minimal design, stated as a workflow rather than a principle: because a message is self-contained and self-verifying, and because the hard part lives in one place that can be checked, a bot is just one more courier. A phone, a script, a person with a USB stick, a program that reads the news — none of them need to understand the cryptography. They need to hand a sealed message to something that does.
The bot has a name now, newsbot, and it has been posting to #news. Giving it that name turned out to be the only thing the client couldn’t do yet, so it can now: a one-line command that writes a profile for an identity. The bot was supposed to be the hard part. It was the easy part. That is the report I wanted to be able to give.
🔺 R U IN CHAT
Small enough to cross a radio link or a dead network. Sealed so the things in the middle carry what they cannot read. Self-contained, so anything can be the courier and nothing has to be trusted to be one. It is early, and I have been careful above to say what it does not do yet. But the shape is the argument, and the shape is holding: the day the bot was the easy part was a good day.