How it works
One secret per epoch, one leaf per device
Every device holds a leaf; each node above holds a key only the devices beneath it know.
- 1
Group key agreement
Every member needs the same key, and it must change whenever somebody joins or leaves. MLS has the group agree on one secret per version of the group, an epoch, and every member agrees on who is in it, so a server cannot show different members different lists.
- 2
A tree of keys
Each device holds a leaf of a ratchet tree (TreeKEM). An update re-keys only the path from leaf to root, so its cost grows with the logarithm of the group size: around ten encryptions for a thousand devices, rather than a thousand. Removals can leave blanks, so that is typical, not guaranteed.
- 3
Forward secrecy and healing
Message keys are derived one way and deleted after use, so a key stolen today cannot open yesterday’s messages. Once a compromised device is removed or updates, fresh randomness locks the attacker out of new ones. That is why every device, not every account, is a member.
Why the tree matters
Re-keying a thousand devices takes about ten steps
- 10 devices
- 10≈ 4
- 100 devices
- 100≈ 7
- 1,000 devices
- 1,000≈ 10
Compared
MLS, Signal and Megolm side by side
Each row comes from the protocol’s own specification. The Signal column describes the pairwise protocol and how groups are usually built on it.
| Property | MLS | Signal Protocol | Megolm (Matrix) |
|---|---|---|---|
| Specified by | IETF, RFC 9420 (2023) | Signal’s published specifications (X3DH, PQXDH, Double Ratchet) | The Matrix specification |
| Designed for | Groups, from two members to thousands | Two parties; groups built on top | Group rooms in a federated network |
| How the group shares keys | One group secret per epoch, from a ratchet tree | Pairwise sessions, used to fan out messages or sender keys | Each sender’s session, shared with every device over Olm |
| Cost of a membership change | Typically logarithmic in the group size | Grows with the number of member devices | A new session shared with every device |
| Forward secrecy | Yes | Yes, between two parties | Partial, by the specification’s own account |
| Post-compromise security | Yes, after an update or removal | Yes, between two parties | Not within a session; sessions are rotated |
| All members agree on the group state | Yes, verified every epoch | Left to the application | Left to the room state kept by servers |
In Enclessa
How Enclessa uses MLS
Direct and group direct messages are encrypted with OpenMLS, an open-source Rust implementation, compiled once for every client. Each device is a member with its own key; the server only orders and forwards handshake messages. Channels are managed by default so search, retention and export work, and every room shows its mode. Enclessa’s own integration has not yet been through a third-party audit.
What the server stores in a direct message
Ciphertext the server cannot read
What MLS does not protect
Message content is protected; these are not.
- Metadata: who is in which group, when and how much is sent
- A device compromised while it is still a member
- What a recipient copies, forwards or backs up in plaintext
- Which credentials to trust: that is the application’s job
- A faulty implementation: the guarantees hold only where the spec is followed
Read the specification
Primary sources
FAQ
MLS encryption: common questions
- Neither is simply better. Signal is a mature design for two parties, with groups built on pairwise sessions. MLS is an IETF standard built for groups, so membership changes stay cheap as groups grow.
- Matrix specifies Olm for one-to-one channels and Megolm for rooms, which its specification describes as offering only partial forward secrecy. Check the current Matrix specification for the status of any MLS work.
- It depends on the cipher suite. The suites in RFC 9420 use classical elliptic-curve cryptography; post-quantum suites come from extensions and newer work.
- Direct and group direct messages, and channels created as encrypted where the organisation permits it. Other channels are managed rooms the server can read. A room cannot switch modes.
Bring your team over this afternoon
Free for up to 10 people, with encrypted direct messages and video calls. No payment card, no time limit, no server to run.
For businesses and organisations only — not available to consumers.