RFC 9420: Messaging Layer Security

Summary

In July 2023, Richard Barnes, Benjamin Beurdouche, Raphael Robert, Jon Millican, Emad Omara and Katriel Cohn-Gordon specified the Messaging Layer Security protocol in RFC 9420. MLS encrypts group chats end to end for groups from two to thousands of members, even when not everyone is online at the same time. A key tree ensures that key changes grow only logarithmically with group size.

Why groups are hard

For two participants, the Double Ratchet from Signal is the proven solution. Larger groups have mostly distributed individual sender keys over pairwise channels. That is efficient, but to recover security after a compromised device, the number of key messages needed grows with the square of the group size.

MLS arranges members in a tree and uses asynchronous key encapsulation via HPKE. A member renewing its keys only has to update the nodes on its path to the root.

Epochs, commits and services

The state of a group is a sequence of epochs. Each new epoch starts with a Commit message that applies proposed changes such as adding or removing members; new members receive a Welcome message.

MLS assumes two services: an Authentication Service that confirms identities and a Delivery Service that distributes messages. RFC 9750 from April 2025 describes the architecture for this separately.

Ideas

  • MLS offers forward secrecy and post-compromise security.
  • A key tree keeps the cost of key changes logarithmic.
  • Every group change begins a new epoch.
  • Key packages allow inviting members who are offline.
  • Removed members lose access to future messages.
  • A fixed mandatory cipher suite ensures interoperability.

Insights

  • Group encryption is more than many pairwise connections; only the tree structure makes post-compromise security affordable.
  • An open standard for end-to-end encryption creates the technical basis for exchange between different messengers.

Facts

  • RFC 9420 appeared in July 2023 as a Proposed Standard and is 132 pages long.
  • The mandatory cipher suite uses X25519, AES-128-GCM, SHA-256 and Ed25519.
  • The authors came from Cisco, Inria and Mozilla, Meta and the University of Oxford, among others.
  • RFC 9750 from April 2025 describes the architecture around MLS.

References

Remarks

  • MLS only covers encryption; how identities are verified and messages delivered is left to the application.

Recommendations

  • Use vetted MLS libraries for group chats rather than building your own ratchets.
  • Secure the Authentication Service with the same care as the keys themselves.
  • Treat each user device as a separate member so that a lost device can be removed specifically.

Read the RFC at the RFC Editor

Search the Web Archive

Found a mistake or have something to add? Get in touch.