MLS — Group Messaging
Messaging Layer Security (RFC 9420), which uses HPKE and provides efficient asynchronous group key establishment with forward secrecy and, conditionally, post-compromise security (once a committed fresh leaf key replaces the compromised one) for groups from two to thousands. In this module's illustration, an openmls provider holds signature keys as token objects of a PKCS#11 module (a software token in this sample).
Why this matters: MLS's TreeKEM provides forward secrecy and, conditionally, post-compromise security (once a committed fresh leaf key replaces the compromised one) for groups from two to thousands, and the draft PQ MLS cipher suites (draft-ietf-mls-pq-ciphersuites-07) have been sent to the IESG with a request for publication.
Start here: Alice and Bob start the group in the TreeKEM visualizer; add a third member and see which nodes on the direct path have to re-key.
For your role
- Developer / Engineer
- TreeKEM, HPKE and a PKCS#11-backed OpenMLS provider: the workshop tool runs the ML-DSA-65 credential signing, the ML-KEM-768 HPKE node update and the AES-128-GCM message encryption, then adds members to the ratchet tree.
- Security Architect
- Group key agreement that scales to thousands while signature keys stay in the HSM: the tool's Add, Remove and Update on the ratchet tree show how many nodes re-key per change.
- Researcher / Academic
- RFC 9420's TreeKEM and the post-quantum ciphersuites are shown with live primitives and the authoritative references; enable HSM mode to route them through softhsmv3.
Group messaging at scale, with PQC custody
The Messaging Layer Security protocol (RFC 9420) provides asynchronous group key establishment with forward secrecy and, conditionally, post-compromise security (once a committed fresh leaf key replaces the compromised one) for groups from two to thousands. Our openmls_pqctoday_crypto Rust provider wires the OpenMLS reference implementation to PKCS#11 v3.2 so signature keys are held as token objects of a PKCS#11 module (a software token in this sample).
RFC 9420 baseline
Asynchronous group key agreement via TreeKEM. Forward secrecy + conditional post-compromise security (once a committed fresh leaf key replaces the compromised one) with O(log N) Commit cost.
PQ ciphersuites
draft-ietf-mls-pq-ciphersuites-07 (1 November 2026) proposes eleven hybrid and pure ML-KEM cipher suites. The first eight retain traditional signatures. Their post-quantum confidentiality claim covers passive attackers.
HSM custody
Our PKCS#11 provider holds signature keys as token objects with CKA_SENSITIVE=TRUE. OpenMLS sees opaque handles; raw private-key bytes are not returned through this interface (the sample token is software in the same process).
What MLS solves
Messaging Layer Security (RFC 9420, July 2023) is the IETF's protocol for efficient asynchronous group key establishment, giving groups from two to thousands of participants forward secrecy AND post-compromise security.
RFC 9420 describes the Double Ratchet as the common solution for two parties and sender keys as the common strategy for larger groups, where post-compromise security is difficult to achieve. MLS replaces both with a tree-based key encapsulation scheme — TreeKEM — that provides forward secrecy and post-compromise security for groups from two to thousands.
TreeKEM — the ratchet tree
Every member of an MLS group is a leaf of a left-balanced binary tree. Each internal node holds a key pair derived from the path of its descendants. A member knows the secret keys for every node on the path from their leaf to the root.
When member i sends a Commit (add / remove / update operation), they refresh every node on their direct path with fresh HPKE keys and encrypt the new path secrets to the resolution of each node so the right subset of the group learns the new secrets.
A Commit that carries a path derives a fresh commit secret from the root path secret and mixes it with the previous epoch's init secret to start the next epoch; application AEAD keys derive from that epoch's secrets (RFC 9420, section 12.4). A Commit that only adds members, injects a PSK or reinitialises may leave out the path; its commit secret is then the all-zero vector, so no fresh secret enters the key schedule.
Forward secrecy needs members to delete old keys: removing past ratchet-tree private keys protects earlier epochs, and deleting each message key after use protects earlier messages (RFC 9420, section 16.6). Post-compromise security is conditional. Suppose an attacker copies Bob's leaf and tree keys at one moment. A message sent by anyone only steps a one-way hash ratchet and adds no fresh randomness. A Commit by another member encrypts its new path secrets to nodes whose private keys Bob, and so the attacker, still holds, so an attacker who sees the Commit can follow it. Recovery begins when the group processes a Commit that replaces Bob's leaf with a fresh key pair whose private key the attacker never saw: Bob's own Commit with a path, or another member's Commit that includes Bob's Update proposal (an Update proposal has no effect until it is committed).
These guarantees model a one-time snapshot of a member's secrets. An attacker who keeps control of Bob's device, or who holds Bob's signature key, can keep reading the new secrets or can impersonate Bob: with the signature key the attacker can create LeafNodes and KeyPackages in Bob's name and, where the application allows external Commits, insert itself into the group. Groups can require a pre-shared key from joiners to raise that cost (RFC 9420, sections 16.5 and 12.4.3.2).
Key schedule — from group secret to keys
The MLS key schedule (RFC 9420) takes, among its inputs, the previous epoch's init secret, the current epoch's commit secret, and the current epoch's GroupContext object and runs them through a chain of Extract / Expand steps from the KDF to derive the encryption secret, exporter secret, and confirmation key.
Each AEAD application message uses a per-member, per-generation key derived from the encryption secret via a per-leaf hash ratchet. Lose any one message key, and the rest are still safe.
Cryptographically the schedule is RFC 9180-style HPKE labelled extract/expand. Every Extract is one HMAC; every Expand is iterated HMAC. In our PKCS#11 provider those HMACs all run inside the HSM.
Ciphersuites — baseline, PQ, hybrid
MLS RFC 9420 registers seven fixed cipher suites (0x0001 to 0x0007), each pairing a specific DHKEM, KDF, AEAD, hash and signature scheme; MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519 is the mandatory-to-implement suite.
`draft-ietf-mls-pq-ciphersuites-07` (1 November 2026) registers eleven ML-KEM cipher suites: hybrid (ML-KEM with X25519, P-256 or P-384) and pure ML-KEM. The first eight combine the KEM with a traditional signature algorithm; the last three also use post-quantum signatures (ML-DSA-44, ML-DSA-65 and ML-DSA-87).
`draft-ietf-mls-combiner-02` (expired, WGLC revival pending) specifies a hybrid combiner: run two MLS sessions in parallel (one traditional, one PQ) and combine them by exporting a secret from the PQ session and importing it as a Pre-Shared Key (PSK) into the traditional session, to achieve amortized PQ confidentiality and authenticity. It is an architecture, not a single cipher suite: each session names its own cipher suite (a traditional one and a pure post-quantum one), and the combiner does not change how cipher suites compute group keys (section 8.1 of the draft).
How our HSM provider plugs into OpenMLS
OpenMLS — the only production-grade open-source MLS implementation in active use — talks to crypto through a single trait, `OpenMlsCrypto`. The trait has ~15 functions: hash, HMAC, HKDF extract/expand, AEAD seal/open, signature key generation, sign, verify, HPKE seal/open/setup/derive.
Our `openmls_pqctoday_crypto` Rust crate (in `pqctoday-hsm/openmls-provider/`) implements that trait by routing each operation through PKCS#11 v3.2 against softhsmv3. Signature keys generate as token objects with `CKA_SENSITIVE=TRUE` and `CKA_EXTRACTABLE=FALSE`; what OpenMLS stores as the "private key" is an opaque `HsmKeyHandle` blob, not raw key material, so raw private-key bytes are not returned to OpenMLS through this interface. In this sample the token is a software module loaded into the same process, so the key bytes still exist in that process's memory; a production HSM has to demonstrate tamper resistance, isolation from the host and assurance separately.
HPKE for the X25519 + SHA-256 + AES-128-GCM suite runs end-to-end through the HSM: ECDH via `CKM_ECDH1_DERIVE`, HKDF via PKCS#11 HMAC, AEAD via `CKM_AES_GCM`. Wire-interop with `hpke-rs` (the reference) is verified in both directions by integration tests.
The road to PQ MLS
Two things have to converge for production PQ MLS: (1) the upstream OpenMLS workspace registers `draft-ietf-mls-pq-ciphersuites` in `openmls_traits::types::Ciphersuite`, and (2) our provider wires `CKM_ML_KEM_*` and `CKM_ML_DSA` through.
A parallel path is the hybrid combiner: a traditional and a PQ MLS session run in parallel and combined through a PSK exported from the PQ session. This is the path most enterprise messaging vendors are watching, because it lets them ship MLS today and turn on PQ when their HSM fleet is ready, without re-keying.
Status snapshot (8 November 2026, from the drafts' datatracker pages): the PQ ciphersuite draft is an Active Internet-Draft at -07 (1 November 2026; the list of eleven suites is unchanged from -06) and its IESG state is "Publication Requested". The MLS extensions framework (`draft-ietf-mls-extensions`) is an active working-group draft at -11 (2 November 2026). As checked on 30 October 2026, the combiner draft (-02, 22 October 2025) is expired; its WG state is "Waiting for WG Chair Go-Ahead, Revised I-D Needed - Issue raised by WGLC". Check the datatracker pages for the current state.
Ciphersuites at a glance
| Suite | KEM | Signature | Status | Reference |
|---|---|---|---|---|
| MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519 | DHKEM(X25519, HKDF-SHA256) | Ed25519 | RFC 9420 baseline | RFC 9420 |
| MLS_128_DHKEMP256_AES128GCM_SHA256_P256 | DHKEM(P-256, HKDF-SHA256) | ECDSA P-256 | RFC 9420 baseline | RFC 9420 |
| MLS_128_MLKEM768X25519_AES128GCM_SHA256_Ed25519 (draft) | ML-KEM-768 + X25519 (hybrid KEM, one session) | Ed25519 (post-quantum confidentiality only) | PQ draft | draft-ietf-mls-pq-ciphersuites-07 |
| MLS_192_MLKEM768_AES256GCM_SHA384_MLDSA65 (draft) | ML-KEM-768 (pure post-quantum KEM, one session) | ML-DSA-65 | PQ draft | draft-ietf-mls-pq-ciphersuites-07 |
| Amortized PQ MLS combiner: traditional session + PQ session, joined by an exported PSK | Per session: a traditional KEM in one session, a pure post-quantum KEM in the other | Per session: traditional in the traditional session; post-quantum in the PQ session for PQ authenticity | Hybrid combiner draft | draft-ietf-mls-combiner-02 |
Related modules
- Email & Document SigningSame track · Protocols · Same migration phase · Shares ML-DSA, JOSE
- API Security & JWTSame track · Protocols · Same migration phase · Shares ML-DSA, JOSE
- TLS BasicsSame track · Protocols · Same migration phase · Shares ML-KEM, ML-DSA
- PKI Enrollment Protocols (EST & CMP)Same track · Protocols · Same migration phase · Shares ML-DSA, ML-KEM
In the Industry Landscape
Check your understanding
8 questions on MLS — Group Messaging, each with its answer and the reason.
Take the quizNext step
Practice it: MLS Group MessagingMLS Group Messaging is the hands-on version of this module: the same ideas, run in your browser.
Production Tool Capabilities & Verification ChecklistMessaging Security Architects & Collaboration Platform Engineers
Capabilities to require in your production tools:
- For an RFC 9420 group reinitialization, confirm the explicit target cipher suite, each member’s matching KeyPackage and the new epoch 1 Welcome bound to the old group.
- Test key deletion for forward secrecy and recovery after a fresh leaf key for the affected member is committed. Use a controlled, one-time compromise scenario.
- Verify each KeyPackage’s suite, signature and credential binding. A draft suite using Ed25519 offers post-quantum confidentiality against passive attacks. Select a suite with ML-DSA and verify the credential assumptions when the policy calls for post-quantum authentication.
How to evaluate in your environment
Stage a group reinitialization with a mismatched KeyPackage followed by a matching one. Capture the ReInit Commit and Welcome and verify their binding. In a separate run, test member join/remove and committed leaf-key recovery while measuring update bandwidth.
Production evidence to collect
Target suite and KeyPackage validation receipts, ReInit Commit and matching Welcome metadata, credential verification, and positive and negative epoch recovery cases for the tested build.
Completing this Hub module and its browser-based sample exercises teaches the technical and governance decision criteria for your role; it does not test, validate, or certify your deployed production systems.
Record evidence for your environment
Identify the tested build and configuration. Use reference IDs for observations. For a proposed exclusion, record the system boundary or rule and why it excludes this build.
Evidence missing. 0 of 3 requirements have a reference or scope rationale.
Learning module content can be inaccurate. Please double-check its information. Report inaccuracies in PQC Today GitHub Discussions.