Blog

What a client built from the Tieroute spec could read in a community

GPT 6.1 Sol, at medium reasoning effort, received only the Tieroute spec documents and three attempts to build a client and collect what it could from a community. What it could and couldn’t read, the gap it found in the spec, and the protocol behavior behind each result.

This test checked whether the Tieroute spec is complete enough to build a working client from. GPT 6.1 Sol, unmodified and at medium reasoning effort, received the spec documents and nothing else: no Reroute or rerouted source, and no other guidance. It had three attempts to build a client, join a community, and collect everything an ordinary member can fetch.

This post describes what that client could and couldn't read, the gap it found in the spec, and the protocol behavior behind each result. Most results are the protocol working as specified.

Method

The client, tiebright, joined a small community on a community server run by Reroute Holdings LLC. It used a public invite code and held no roles. It made 135 HTTP requests over 7.7 minutes, 3 s apart, and received 3.89 MB. It then tried to decrypt and verify everything it received, and recorded each failure with its reason.

Requests per 30 s 135 total
Inbox cursor 1,459
Intros message size 554–855 B
History segment size 12 of 12 decrypted
requests 135between requests 3 sreceived 3.89 MBchain entries checked 77earlier messages read 0 of 29restricted channels refused, 4 of 4
Summary of the run. Hover over or focus a tile to read individual values.

What the client couldn't read

The community server delivered 29 messages sent before the client joined. The client decrypted none of them. Each channel is an MLS group (Messaging Layer Security, RFC 9420), and MLS derives new secrets for each epoch. A new epoch starts with each membership change. A joining device receives the secrets for the epoch its join creates and later epochs, never earlier ones (§16.6).

The community server refused all four restricted channels, for both history and messages. It checks a member's roles against the channel's see list before it serves either. The names of those channels stayed encrypted, because each restricted channel's name is sealed under a metadata key that only its group holds. The member list was also refused, because it requires the administrate permission.

Every signed object the client fetched verified. Identity chains passed their signature and hash-link checks, profiles verified, and all 14 avatars matched their SHA-256 hashes. Public keys were 1,984 B and signatures 3,373 B, the sizes of composite ML-DSA-65 and Ed25519.

What members can read by design

In a community anyone can join with a public code, end-to-end encryption protects against the community server and against anyone who obtains its storage. It doesn't protect against other members. The model's report listed the following as findings. Each is specified behavior:

  • Channel history from before joining. The member who admits a newcomer sends them the channel's history keys (§16.6). A channel with history on is readable by every member who can see it.
  • Earlier channel and role names. The community chain is append-only. A rename adds a new entry, and the earlier entry still holds the old name. Members hold the metadata key, so both decrypt.
  • Role assignments. The community server enforces permissions, including the refusals above. To do that it needs to know who holds each role, so assignments are plaintext. Role names stay encrypted.
  • Moderation actions. A timeout, kick, or ban is a chain entry. Every current and future member can read it.
  • Invite codes on profiles. Publishing a code on your profile is optional (§9.1). Removing and revoking it closes that route.
WhatCommunity serverAny memberAnyone at all
Message text, files, and voice
MLS, end to end
Can’tCan readCan’t
How big each message is
Ciphertext isn’t padded
Size onlySize onlyCan’t
Channel history from before you joined
Where history is on
Can’tCan readCan’t
Every edit to a message
Edits are messages too
Can’tCan readCan’t
Channel and role names
Older names too
Can’tCan readCan’t
A restricted channel’s name and messages
Only people who can see it
Can’tCan’tCan’t
Who holds which role
The server enforces roles
Can readCan readCan’t
Who’s a member
Every member’s device is in the MLS tree
Can readCan readCan’t
Device names in an identity chain
Chains are public
Can readCan readCan read
An invite code you put on your profile
Profiles are public
Can readCan readCan read
For a community anyone can join with a public code. “Any member” means any member who can see the channel.

Most of the chain's 77 entries assign roles, edit roles, or create invite codes.

  • assign-roles 22
  • edit-role 19
  • add-code 14
  • add-channel 7
  • add-role 5
  • set-name 5
  • order-channels 5
  • edit-channel 3
  • create 1
  • remove-role 1
  • timeout 1
The 77 entries hold 83 operations. Most assign or edit roles, or create invite codes.

History segments

The client received the history keys and downloaded all 12 history segments, then failed to decrypt any of them. The spec defined a segment as a 12-byte nonce followed by AES-128-GCM output. It didn't define how a history key becomes the AES key, or the associated data each segment is bound to. Without both values, a client can't read history without the Reroute source.

For the retry, the model was allowed to read Reroute's history encryption and decryption functions, and no other source. It retried the cached segments offline, without contacting a server. All 12 segments decrypted, 29 messages in total, and every message signature verified. The construction was then added to §16.5 of the spec, with test vectors in spec/vectors/v2/community-history.json.

The key

  1. History key · 32 random bytes, from community-keys
  2. HKDF-Expand, SHA-256, no Extract step
  3. info "tieroute community history", 16 bytes out
  4. AES-128-GCM key · equivalent to one HMAC call

The associated data

A five-item array, written as canonical JSON (JCS, RFC 8785). None of it is secret. It binds the segment to its location:

label "tieroute community history"community its identifier, base64urlchannel 2start 1end 7

A segment served for another community, channel, or range fails to decrypt.

What's stored

Nonce
12 B, random, new every time
Ciphertext
same length as the plaintext, AES-128-GCM
Tag
16 B, fails if any input differs
A segment has no key identifier and no version byte. A reader tries each history key it holds for the channel until one decrypts it.

Reroute differs from the new text in two places. Neither affects decryption:

  • Reroute encrypts with the history key it learned most recently. The spec says to use the newest key. These are usually the same key.
  • A segment that isn't valid UTF-8 stops Reroute's whole history fetch. The spec says only that segment's range becomes a gap.

Edits in history

The decrypted history includes every edit, not only the final text. In Tieroute, an edit is a separate signed message that names the message it changes, and clients apply edits in order (§7.3). A history segment holds each message as it was received, so a newcomer receives the original and every later version.

  1. #1 Post first
  2. #2 Edit +13 s
  3. #3 Edit +25 s
  4. #4 Edit +31 s
  5. #5 Edit +43 s
  6. #6 Edit +3 min
  7. #7 Edit +12 h
  8. #8 Edit +17 h
  9. #9 Edit +17 h
  10. #10 Reaction +36 h
PostEditReaction
The complete history of the rules channel: one post, eight edits over about 17 hours, and a reaction. Times are relative to the post. Reroute displays the latest version, and the history holds all nine.

Editing a message doesn't remove earlier versions from history. They stay readable to every member who joins later.

Message sizes

MLS supports padding, but the Tieroute profile doesn't require it, and Reroute doesn't pad. The community server stores each message, so it knows each one's exact size. The client couldn't decrypt the 19 messages in the intros channel, so it classified them by size. Five were exactly 594 B, and each arrived in the same epoch as another member's post. It labeled them reactions. The decrypted history confirms all five, with no false positives.

02505007501,000Ciphertext size (B)12345678910111213141516171819
Text postText post with a fileReaction
Show the numbers
MessageSize (B)Type
1596Text post
2556Text post
3600Text post
4596Text post
5855Text post with a file
6594Reaction
7594Reaction
8633Text post
9554Text post
10561Text post
11555Text post
12787Text post
13594Reaction
14555Text post
15556Text post
16627Text post
17594Reaction
18578Text post
19594Reaction
Ciphertext size of each message in the intros channel, as stored by the community server, by message type. Every reaction is 594 B.

Its other estimates were less accurate. It classified the largest message as a long post. That message was short, and its size came from a file reference. It overestimated the length of the shortest posts by about 10 characters, and estimated the one long post to within about 20. Size reveals the byte length of the whole message, including fields other than the text. Padding to fixed sizes would hide it, at a bandwidth cost on every message. Whether the spec will require it is undecided.

Segment sizes

A segment that holds one message is about 5.3 KB. Most of that is the sender's msg-key, the certificate that binds their message key to a device in their identity chain. It carries a 3,373 B composite signature. Each segment includes each sender's certificate once, so it can be verified on its own. Messages from one sender share a certificate. So the first segment of the rules channel, with six messages and one certificate, is smaller than two single-message segments.

010,00020,00030,000Segment size (B)1–678–9101–78–9101112–13141516–19
Rules channelIntros channel
Show the numbers
ChannelMessagesSize (B)Certificates
Rules1–610,1761
Rules7–75,5981
Rules8–96,4551
Rules10–105,3481
Intros1–723,2264
Intros8–910,6652
Intros10–105,3151
Intros11–115,3091
Intros12–1310,8612
Intros14–145,3091
Intros15–155,3101
Intros16–1921,3254
Size of each history segment, labeled by the sequence numbers it covers. Size depends more on the number of senders than on the number of messages.

Inbox cursors in rerouted

One result concerns rerouted, the reference community server, not the protocol. Each inbox item has a cursor, which a device returns to acknowledge what it has processed. The client received 77 items, and the last cursor was 1,459. rerouted assigns cursors from a single counter for everything the server accepts. The difference between consecutive cursors therefore counts traffic in channels the member can't see.

05001,0001,500120406077Inbox items the client received
Cursor the server gave each item If it counted only this member's items Activity the client couldn't see
rerouted's cursor counts everything the community server accepts, not only what this member receives. Each jump in the orange line is traffic between two of the client's items, in channels it couldn't see.

The API conventions define cursors as opaque strings, and clients aren't allowed to parse them. rerouted can change how it assigns them without a protocol change, for example with a cursor per device.

Changes for Reroute

Some results concern the Reroute app, not Tieroute:

  • Avatars are stored as uploaded, including metadata such as the software that made a screenshot. Reroute should strip metadata before upload.
  • One member's display name and avatar imitated an add button. Both are free-form, so no client can reliably detect imitation. Handles are unique, though. Reroute can show the handle whenever two members' display names match.
  • A device name is published in the identity chain. The protocol makes it optional, so Reroute can omit it by default.

Next steps

  • An implementer outside Reroute Holdings LLC runs their client against the history test vectors. So far, only Reroute Holdings LLC has checked them.
  • Reroute encrypts with the newest history key, and treats a segment that fails to parse as a gap.
  • rerouted assigns cursors that don't reveal activity in other channels.
  • A decision on whether the spec requires padding, with what the community server can see documented either way.

Report errors or questions on the issue tracker. The full history segment construction is in §16.5 of the specification.