Both wrap points pad now. Unsealed envelopes go out as Envelope.paddedPayload (pad beside ct), sealed ones through SealedSender.sealedPayload, and the federated seal to an address is padded the same way. That covers text, control, group fan-out, delivery-key preludes, call signalling, own-device copies and federated sends, each envelope on its own. A payload that misses its ladder step throws and is never sent; nothing falls back to unpadded. Everything for one device (preludes and the message) is built and padded before any of it is queued or the session saved, so a payload that fails its length check cannot leave a prelude queued on a session that was then not saved. The federated path now saves the session after the payload is built, for the same reason. A message too long for the top step is refused before anything is spent: for a body over Padding.ALWAYS_FITS_PLAINTEXT_BYTES each device's envelope is built once on an unsaved session and measured in the sealed form, before any token is taken, batch minted or ratchet step saved. The person sees "Too long to send as a message. Send it as a file." The composer shows how much is left in the last thousand characters, counted as the wire counts them (Padding.composerCost), and disables Send past the limit. Same words and limit (20,000) as iOS. Attachments, stories and avatars are sealed with clen and padded only when the relay descriptor carries features.padAttachments as a JSON true. Absent, false, a string, or a descriptor that cannot be read all mean off. The switches are read at most once an hour, and a failed read is retried after a minute rather than once per envelope. interop: seal_padded, attachment_pad and attachment_open, so the reference engine can check this side's padded output byte for byte. Tests: EverySendIsPaddedTest (8): every payload of an unsealed first send and of a sealed send is a ladder length; a long message takes the larger step; over the top step is refused with no delivery token, batch or session step spent; just under the limit is sent; the attachment switch off, on, and read strictly. SendToAddressTest asserts the federated payload is a ladder length. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flamenet Messenger. Android
The Android app, and the two libraries under it. The product's site is at https://flamenetmessenger.com.
engine/ the protocol: X3DH, Double Ratchet, sealed sender, safety numbers,
key transparency. Plain Kotlin/JVM, no Android in it at all.
client/ the relay transport: HTTP, auth, the §8 routes.
app/ the Compose app.
interop/ the cross-engine driver; not shipped.
engine and client are deliberately plain JVM libraries. The protocol has
nothing to do with Android, and keeping it off the platform means their tests
run anywhere a JVM does, no SDK, no emulator, no device, which is also what
lets them gate in CI on Linux:
./gradlew :engine:test :client:test
The app's own unit tests need the Android SDK but still no emulator (Robolectric):
./gradlew :app:testDebugUnitTest
Where it stands
PARITY.md is the definition of done for this app, read that, not this. Every row there names the iOS file it came from so it can be re-checked rather than trusted. Headlines: messaging, groups, attachments, voice notes, stories, calls, sealed sender, key transparency and the encrypted vault are built and tested, and a cross-platform round trip against iOS is verified.
If a claim here ever disagrees with PARITY.md or with the tree, believe those, and fix this.
Why the engine came first, and is held to the vectors
An Android client needs the protocol implemented a third time, and the third
implementation is the one that finds the places where the specification says
less than the two existing engines quietly agreed on, but only if it is
written against the spec and the published vectors rather than against a
reading of our own Swift and JavaScript. So the engine is held to
test/vectors/protocol-v1.json in
flamenet-e2e, the same file the
other two engines are checked against, read from that repository rather than
copied here, because a copied vector file drifts and a drifting vector file
stops being a check. PublishedVectorsTest looks for it beside this checkout
and fails loudly if it cannot find it; FLAMENET_VECTORS overrides the search.
Two implementations that agree may both be wrong in the same way, especially when one was written while reading the other. The audit-path ordering in §19 is the worked example: a top-down reading of a bottom-up path produces the correct root for every left-spine index, so it passes any test that only checks index 0. The vector file pins a right-descending index for that reason, and the Kotlin tests assert both that the published path verifies and that the same path reversed does not.
If this engine ever disagrees with the file, the interesting question is which of the three is wrong, not this one by default.
Contributing and security
- CONTRIBUTING.md, building (JDK 21,
JAVA_HOMEis not optional on a Mac), the test gate, and the platform traps that cost an hour each. - PARITY.md, what iOS does, what this does, and what is left. It is the definition of done for this app.
- SECURITY.md, threat model and where to send a vulnerability report. Not an issue tracker matter: security@flamenetmessenger.com.