Glossia 4.0 · Section 6

Message format and padding

The envelope every message travels in, and why every message is padded to one of five sizes.

A relay can see how big a message is, even though it cannot read it. To keep sizes from revealing what a message contains, every message is padded to one of five fixed sizes before it leaves the sender’s device.

Padding sizes
BucketSizeTypical contents
1256 bytesReceipts, typing indicators, short text
21 KiBMost text messages
34 KiBLong text, group updates, small images’ previews
416 KiBVoice notes, in chunks
564 KiBAttachments, in chunks

Attachments are encrypted with a random key, split into 64 KiB chunks and stored on the recipient’s mailbox relay as separate objects. The message that refers to them carries the key and a hash of each chunk.

The envelope

Fields of the message envelope
FieldSizeDescription
version1 byteEnvelope version. 0x04 for Glossia 4.0.
mailbox32 bytesThe recipient’s mailbox address for the current day.
sealedVariableThe sender’s identity, device and the end-to-end encrypted message, sealed so that only the recipient can open them.
paddingVariableZero bytes that bring the envelope to its bucket size.
tag16 bytesAuthenticates the padding length, so that it cannot be altered in transit.

Sealed sender

The sender’s identity is inside the encryption, not on the outside of the envelope. Relays therefore cannot see who sent a message, only that a message of a certain size was delivered to a mailbox.

Conformance

Relays MUST reject any envelope whose length is not exactly one of the five bucket sizes, or whose padding tag does not verify. Earlier relay software accepted malformed padding, which could have let a malicious client mark its messages with distinctive sizes. This was reported in the 2026 audit as GL4-M1 and fixed before release.