Skip to content

What is MLS encryption? MLS vs Signal Protocol vs Matrix Megolm

MLS is the IETF standard for end-to-end encrypted group messaging, published as RFC 9420. It supports forward secrecy and post-compromise security. This guide explains the protocol and compares it with Signal and Matrix Megolm.

Updated

  1. Your message

    Readable on the sending and receiving devices only

  2. MLS · RFC 9420

    One group per conversation, one leaf per device

  3. OpenMLS, in Rust

    The open-source implementation, compiled once for every client

  4. TLS

    Transport encryption to the delivery service

  5. Delivery service

    Stores ciphertext, an epoch and a timestamp — no key

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. 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. 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. 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

Fan-out: one encryption per deviceMLS tree: one per level on the path
10 devices
10≈ 4
100 devices
100≈ 7
1,000 devices
1,000≈ 10
Typical cost of one update in a well-populated tree. Blank nodes left by removals can raise it until the tree refills.

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.

MLS compared with the Signal Protocol and Matrix Megolm
PropertyMLSSignal ProtocolMegolm (Matrix)
Specified byIETF, RFC 9420 (2023)Signal’s published specifications (X3DH, PQXDH, Double Ratchet)The Matrix specification
Designed forGroups, from two members to thousandsTwo parties; groups built on topGroup rooms in a federated network
How the group shares keysOne group secret per epoch, from a ratchet treePairwise sessions, used to fan out messages or sender keysEach sender’s session, shared with every device over Olm
Cost of a membership changeTypically logarithmic in the group sizeGrows with the number of member devicesA new session shared with every device
Forward secrecyYesYes, between two partiesPartial, by the specification’s own account
Post-compromise securityYes, after an update or removalYes, between two partiesNot within a session; sessions are rotated
All members agree on the group stateYes, verified every epochLeft to the applicationLeft 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

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.