| RFC 9750 | MLS Architecture | April 2025 |
| Beurdouche, et al. | Informational | [Page] |
The Messaging Layer Security (MLS) protocol (RFC 9420)provides a group key agreement protocol for messaging applications.MLS is designed to protect against eavesdropping, tampering, and messageforgery, and to provide forward secrecy (FS) and post-compromise security(PCS).¶
This document describes the architecture for using MLS in a generalsecure group messaging infrastructure and defines the security goalsfor MLS. It provides guidance on building a group messaging systemand discusses security and privacy trade-offs offered by multiplesecurity mechanisms that are part of the MLS protocol (e.g., frequencyof public encryption key rotation). The document also providesguidance for parts of the infrastructure that are not standardized byMLS and are instead left to the application.¶
While the recommendations of this document are not mandatory to follow in orderto interoperate at the protocol level, they affect the overall securityguarantees that are achieved by a messaging application. This is especially truein the case of active adversaries that are able to compromise clients, theDelivery Service (DS), or the Authentication Service (AS).¶
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are candidates for any level of Internet Standard; see Section 2 of RFC 7841.¶
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained athttps://www.rfc-editor.org/info/rfc9750.¶
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
End-to-end security is used in the vast majority of instant messaging systemsand is also deployed in systems for other purposes such as calling and conferencing.In this context, "end-to-end" capturesthe notion that users of the system enjoy some level of security -- with theprecise level depending on the system design -- even in the face of maliciousactions by the operator of the messaging system.¶
Messaging Layer Security (MLS) specifies an architecture (this document) and aprotocol[RFC9420] for providing end-to-end security in thissetting. MLS is not intended as a full instant messaging protocol but rather isintended to be embedded in concrete protocols, such as the Extensible Messaging and Presence Protocol (XMPP)[RFC6120].Implementations of the MLS protocol will interoperate at the cryptographiclevel, though they may have incompatibilities in terms of how protected messagesare delivered, contents of protected messages, and identity/authenticationinfrastructures.The MLS protocol has been designed to provide the same security guarantees toall users, for all group sizes, including groups of only two clients.¶
MLS provides a way forclients to formgroups within which they cancommunicate securely. For example, a set of users might use clients on theirphones or laptops to join a group and communicate with each other. A group maybe as small as two clients (e.g., for simple person-to-person messaging) or aslarge as hundreds of thousands. A client that is part of a group is amemberof that group. As groups change membership and group or member properties, theyadvance from oneepoch to another and the cryptographic state of the groupevolves.¶
The group is represented as a tree, which represents the members as the leavesof a tree. It is used to efficiently encrypt to subsets of the members. Eachmember has a state called aLeafNode object holding the client's identity,credentials, and capabilities.¶
Various messages are used in the evolution from epoch to epoch.AProposal message proposesa change to be made in the next epoch, such as adding or removing a member.ACommit message initiates a new epoch by instructing members of the group toimplement a collection of proposals. Proposals and Commits are collectivelycalledhandshake messages.AKeyPackage provides keys that can be used to add the client to a group,including a public encryption key and a signature key (both stored inthe KeyPackage'sLeafNode object).AWelcome message provides a new member to the group with the information toinitialize their state for the epoch in which they were added.¶
Of course most (but not all) applications use MLS to send encrypted group messages.Anapplication message is an MLS message with an arbitrary application payload.¶
Finally, aPublicMessage contains an integrity-protected MLS handshake message,while aPrivateMessage contains a confidential, integrity-protected handshakeor application message.¶
For a more detailed explanation of these terms, please consult the MLS protocolspecification[RFC9420].¶
MLS is designed to operate within the context of a messaging service, whichmay be a single service provider, a federated system, or some kind ofpeer-to-peer system. The service needs to provide two services thatfacilitate client communication using MLS:¶
An Authentication Service (AS), which is responsible forattesting to bindings between application-meaningful identifiers and thepublic key material used for authentication in the MLS protocol. TheAS must also be able to generate credentials that encode thesebindings and validate credentials provided by MLS clients.¶
A Delivery Service (DS), which can receive and distributemessages between group members. In the case of group messaging, the DSmay also be responsible for acting as a "broadcaster" where the sendersends a single message which is then forwarded to each recipient in the groupby the DS. The DS is also responsible for storing and delivering initialpublic key material required by MLS clients in order to proceed with the groupsecret key establishment that is part of the MLS protocol.¶
For presentation purposes, this document treats the AS and DS as conventionalnetwork services. However, MLS does not require a specific implementationfor the AS or DS. These services may reside on the same server or differentservers, they may be distributed between server and client components, and theymay even involve some action by users. For example:¶
Several secure messaging services today provide a centralized DS and rely onmanual comparison of clients' public keys as the AS.¶
MLS clients connected to a peer-to-peer network could instantiate adecentralized DS by transmitting MLS messages over that network.¶
In an MLS group using a Public Key Infrastructure (PKI) for authentication,the AS would comprise the certificate issuance and validation processes,both of which involve logic inside MLS clients as well as variousexisting PKI roles (e.g., Certification Authorities).¶
It is important to note that the AS can becompletely abstract in the case of a service provider which allows MLSclients to generate, distribute, and validate credentials themselves.As with the AS, the DS can be completely abstract ifusers are able to distribute credentials and messages without relyingon a central DS (as in a peer-to-peer system). Note,though, that in such scenarios, clients will need to implement logicthat assures the delivery properties required of the DS (seeSection 5.2).¶
Figure 1 shows the relationship of these concepts,with three clients and one group, and clients 2 and 3 beingpart of the group and client 1 not being part of any group.¶
Figure 2 shows the formation of an examplegroup consisting of Alice, Bob, and Charlie, with Alice driving the creation of the group.¶
This process proceeds as follows.¶
Alice, Bob, and Charlie create accounts with a service provider and obtaincredentials from the AS. This is a one-time setup phase.¶
Alice, Bob, and Charlie authenticate to the DS and store some initialkeying material which is used to send encrypted messages to themfor the first time. This keying material is authenticated with theirlong-term credentials. Although in principle this keying materialcan be reused for multiple senders, in order to provide forward secrecyit is better for this material to be regularly refreshed so that eachsender can use a new key and delete older keys.¶
When Alice wants to create a group including Bob, she first uses the DS to lookup his initial keying material. She then generates two messages:¶
A message to the entire group (which at this point is just her and Bob)that adds Bob to the group.¶
A Welcome message just to Bob encrypted with his initial keying material thatincludes the secret keying information necessary to join the group.¶
She sends both of these messages to the DS, which is responsiblefor sending them to the appropriate people. Note that the security of MLSdoes not depend on the DS forwarding the Welcome message only to Bob, as itis encrypted for him; it is simply not necessary for other group membersto receive it.¶
If Alice then wants to add Charlie to the group, she follows a similar procedureas with Bob. She first uses the DS to lookup his initial keying material and then generates two messages:¶
A message to the entire group (consisting of her, Bob, and Charlie) addingCharlie to the group.¶
A Welcome message just to Charlie encrypted with his initial keying material thatincludes the secret keying information necessary to join the group.¶
At the completion of this process, we have a group with Alice, Bob, and Charlie,which means that they share a single encryption key which can be used tosend messages or to key other protocols.¶
Once the group has been created, clients can perform other actions,such as:¶
sending a message to everyone in the group¶
receiving a message from someone in the group¶
adding one or more clients to an existing group¶
removing one or more members from an existing group¶
updating their own key material¶
leaving a group (by asking to be removed)¶
Importantly, MLS does not itself enforce any access control on groupoperations. For instance, any member of the group can send a messageto add a new member or to evict an existing member.This is in contrast to some designs in which there is a single groupcontroller who can modify the group. MLS-using applications areresponsible for setting their own access control policies. For instance,if only the group administrator is allowed to change group members,then it is the responsibility of the application to inform membersof this policy and who the administrator is.¶
The general pattern for any change in the group state (e.g., to add or removea user) is that it consists of two messages:¶
This message describes the change to be made (e.g., add Bob to the group)but does not effect a change.¶
This message changes the group state to include the changes described ina set of proposals.¶
The simplest pattern is for a client to just send a Commit which contains one ormore Proposals. For instance, Alice could send a Commit with the ProposalAdd(Bob) embedded to add Bob to the group. However, there are situations inwhich one client might send a Proposal and another might send the corresponding Commit. Forinstance, Bob might wish to remove himself from the group and send a Removeproposal to do so (seeSection 12.1.3 of [RFC9420]). Because Bob cannot sendthe Commit, an existing member must do so. Commits can apply to multiple validProposals, in which case all the listed changes are applied.¶
It is also possible for a Commit to apply to an empty set of Proposals,in which case it just updates the cryptographic state of the groupwithout changing its membership.¶
While it's natural to think of a messaging system as consisting of groups ofusers, possibly using different devices, in MLS the basic unit of operation isnot the user but rather the "client". Formally, a client is a set ofcryptographic objects composed of public values such as a name (an identity), apublic encryption key, and a public signature key. As usual, a user demonstratesownership of the client by demonstrating knowledge of the associated secretvalues.¶
In some messaging systems, clients belonging to the same user must all share thesame signature key pair, but MLS does not assume this; instead, a user may havemultiple clients with the same identity and different keys. In this case, eachclient will have its own cryptographic state, and it is up to the application todetermine how to present this situation to users. For instance, it may rendermessages to and from a given user identically regardless of which client theyare associated with, or it may choose to distinguish them.It is also possible to have multiple clients associated withthe same user share state, as described inSection 8.2.4.¶
When a client is part of a group, it is called a member. A group in MLS isdefined as the set of clients that have knowledge of the shared group secretestablished in the group key establishment phase. Note that until a client hasbeen added to the group and contributed to the group secret in a mannerverifiable by other members of the group, other members cannot assume that theclient is a member of the group; for instance, the newly added member might nothave received the Welcome message or been unable to decrypt it for some reason.¶
The Authentication Service (AS) has to provide three services:¶
Issue credentials to clients that attest to bindings between identities andsignature key pairs.¶
Enable a client to verify that a credential presented by another client isvalid with respect to a reference identifier.¶
Enable a group member to verify that a credential represents the same clientas another credential.¶
A member with a valid credential authenticates its MLS messages by signing themwith the private key corresponding to the public key bound by its credential.¶
The AS is considered an abstract layer by the MLS specification; part of thisservice could be, for instance, running on the members' devices, while anotherpart is a separate entity entirely. The following examples illustrate thebreadth of this concept:¶
A PKI could be used as an AS[RFC5280]. The issuance function would beprovided by the certificate authorities in the PKI, and the verificationfunction would correspond to certificate verification by clients.¶
Several current messaging applications rely on users verifying each other'skey fingerprints for authentication. In this scenario, the issuance functionis simply the generation of a key pair (i.e., a credential is just anidentifier and public key, with no information to assist in verification).The verification function is the application function that enables usersto verify keys.¶
In a system based on end-user Key Transparency (KT)[KT], theissuance function would correspond to the insertion of a key in a KT log undera user's identity. The verification function would correspond to verifying akey's inclusion in the log for a claimed identity, together with the KT log'smechanisms for a user to monitor and control which keys are associated withtheir identity.¶
By the nature of its role in MLS authentication, the AS is invested with alarge amount of trust and the compromise of the AS couldallow an adversary to, among other things, impersonate group members. We discusssecurity considerations regarding the compromise of the different ASfunctions in detail inSection 8.4.3.¶
The association between members' identities and their signature keys is fairlyflexible in MLS. As noted above, there is no requirement that all clientsbelonging to a given user have the same signature key (in fact, having duplicatesignature keys in a group is forbidden). A member canalso rotate the signature key they use within a group. These mechanisms allowclients to use different signature keys in different contexts and at differentpoints in time, providing unlinkability and post-compromise security benefits.Some security trade-offs related to this flexibility are discussed inSection 8.¶
In many applications, there are multiple MLS clients that represent a singleentity, such as a human user with a mobile and desktop version of anapplication. Often, the same set of clients is represented in exactly the samelist of groups. In applications where this is the intended situation, otherclients can check that a user is consistently represented by the same set ofclients. This would make it more difficult for a malicious AS to issue fakecredentials for a particular user because clients would expect the credential toappear in all groups of which the user is a member. If a client credential doesnot appear in all groups after some relatively short period of time, clientshave an indication that the credential might have been created without theuser's knowledge. Due to the asynchronous nature of MLS, however, there may betransient inconsistencies in a user's client set, so correlating users' clientsacross groups is more of a detection mechanism than a prevention mechanism.¶
The Delivery Service (DS) plays two major roles in MLS:¶
As a directory service, providing the initial keying material forclients to use. This allows a client to establish a shared key and sendencrypted messages to other clients even if they're offline.¶
Routing MLS messages among clients.¶
While MLS depends on correct behavior by the AS inorder to provide endpoint authentication and hence confidentiality ofthe group key, these properties do not depend on correct behavior bythe DS; even a malicious DS cannot add itself to groups or recoverthe group key. However, depending precisely on how MLS is used, the DS maybe able to determine group membership or prevent changes to thegroup from taking place (e.g., by blocking group change messages).¶
Upon joining the system, each client stores its initial cryptographic keymaterial with the DS. This key material, called a KeyPackage,advertises the functional abilities of the client (e.g., supported protocolversions, supported extensions, etc.) and the following cryptographic information:¶
A credential from the AS attesting to the binding betweenthe identity and the client's signature key.¶
The client's asymmetric encryption public key.¶
All the parameters in the KeyPackage are signed with the signatureprivate key corresponding to the credential.As noted inSection 3.7, users may own multiple clients, eachwith their own keying material. Each KeyPackage is specific to an MLS versionand cipher suite, but a client may want to offer support for multiple protocolversions and cipher suites. As such, there may be multiple KeyPackages stored byeach user for a mix of protocol versions, cipher suites, and end-user devices.¶
When a client wishes to establish a group or add clients to a group, it firstcontacts the DS to request KeyPackages for each of the other clients,authenticates the KeyPackages using the signature keys, includes the KeyPackagesin Add proposals, and encrypts the information needed to join the group(theGroupInfo object) with an ephemeral key; it then separately encrypts theephemeral key with the public encryption key (init_key) from each KeyPackage.When a client requests a KeyPackage in order to add a user to a group, theDS should provide the minimum number of KeyPackages necessary tosatisfy the request. For example, if the request specifies the MLS version, theDS might provide one KeyPackage per supported cipher suite, even if it hasmultiple such KeyPackages to enable the corresponding client to be added tomultiple groups before needing to upload more fresh KeyPackages.¶
In order to avoid replay attacks and provide forward secrecy for messages sentusing the initial keying material, KeyPackages are intended to be used onlyonce, andinit_key is intended to be deleted by the client after decryptionof the Welcome message. The DS is responsible for ensuring thateach KeyPackage is only used to add its client to a single group, with thepossible exception of a "last resort" KeyPackage that is specially designatedby the client to be used multiple times. Clients are responsible for providingnew KeyPackages as necessary in order to minimize the chance that the "lastresort" KeyPackage will be used.¶
Recommendation: Ensure that "last resort" KeyPackages don't get used byprovisioning enough standard KeyPackages.¶
Recommendation: Rotate "last resort" KeyPackages as soon as possibleafter being used or if they have been stored for a prolonged period of time.Overall, avoid reusing "last resort" KeyPackages as much as possible.¶
Recommendation: Ensure that the client for which a "last resort" KeyPackagehas been used is updating leaf keys as early as possible.¶
Recommendation: Ensure that clients delete the private componentof theirinit_key after processing a Welcome message, or after therotation of the "last resort" KeyPackage.¶
Overall, it needs to be noted that key packages need to be updated whensignature keys are changed.¶
The main responsibility of the DS is to ensure delivery ofmessages. Some MLS messages need only be delivered to specific clients (e.g., aWelcome message initializing a new member's state), while others need to bedelivered to all the members of a group. The DS may enable thelatter delivery pattern via unicast channels (sometimes known as "clientfanout"), broadcast channels ("server fanout"), or a mix of both.¶
For the most part, MLS does not require the DS to deliver messagesin any particular order. Applications can set policies that control theirtolerance for out-of-order messages (seeSection 7), andmessages that arrive significantly out of order can be dropped without otherwiseaffecting the protocol. There are two exceptions to this. First, Proposalmessages should all arrive before the Commit that references them. Second,because an MLS group has a linear history of epochs, the members of the groupmust agree on the order in which changes are applied. Concretely, the groupmust agree on a single MLS Commit message that ends each epoch and begins thenext one.¶
In practice, there's a realistic risk of two members generating Commit messagesat the same time, based on the same epoch, and both attempting to send them tothe group at the same time. The extent to which this is a problem, and theappropriate solution, depend on the design of the DS. Per the CAPtheorem[CAPBR], there are two general classes of distributed systems that theDS might fall into:¶
Consistent and Partition-tolerant, or Strongly Consistent, systems, which can providea globally consistent view of data but have the inconvenience of clients needingto handle rejected messages.¶
Available and Partition-tolerant, or Eventually Consistent, systems, which continueworking despite network issues but may return different views of data todifferent users.¶
Strategies for sequencing messages in strongly and eventually consistent systemsare described in the next two subsections. Most DSs will use thestrongly consistent paradigm, but this remains a choice that can be handled incoordination with the client and advertised in the KeyPackages.¶
However, note that a malicious DS could also reorder messages orprovide an inconsistent view to different users. The "generation" counter inMLS messages provides per-sender loss detection and ordering that cannot bemanipulated by the DS, but this does not provide complete protection againstpartitioning. A DS can cause a partition in the group by partitioning keyexchange messages; this can be detected only by out-of-band comparison (e.g.,confirming that all clients have the sameepoch_authenticator value). Amechanism for more robust protections is discussed in[EXTENSIONS].¶
Other forms of DS misbehavior are still possible that are not easyto detect. For instance, a DS can simply refuse to relay messagesto and from a given client. Without some sort of side information, other clientscannot generally detect this form of Denial-of-Service (DoS) attack.¶
With this approach, the DS ensures that some types of incomingmessages have a linear order and all members agree on that order. The DeliveryService is trusted to break ties when two members send a Commit message at thesame time.¶
As an example, there could be an "ordering server" DS thatbroadcasts all messages received to all users and ensures that all clients seemessages in the same order. This would allow clients to only apply the firstvalid Commit for an epoch and ignore subsequent Commits. Clients that send a Commitwould then wait to apply it until it is broadcast back to them by the DeliveryService, assuming that they do not receive another Commit first.¶
Alternatively, the DS can rely on theepoch andcontent_typefields of an MLSMessage to provide an order only to handshake messages, andpossibly even filter or reject redundant Commit messages proactively to preventthem from being broadcast. There is some risk associated with filtering; thisis discussed further inSection 5.3.¶
With this approach, the DS is built in a way that may besignificantly more available or performant than a strongly consistent system,but where it offers weaker consistency guarantees. Messages may arrive to differentclients in different orders and with varying amounts of latency, which meansclients are responsible for reconciliation.¶
This type of DS might arise, for example, when group members aresending each message to each other member individually or when a distributedpeer-to-peer network is used to broadcast messages.¶
Upon receiving a Commit from the DS, clients can either:¶
Pause sending new messages for a short amount of time to account for areasonable degree of network latency and see if any other Commits arereceived for the same epoch. If multiple Commits are received, the clientscan use a deterministic tie-breaking policy to decide which to accept, andthen resume sending messages as normal.¶
Accept the Commit immediately but keep a copy of the previous group state fora short period of time. If another Commit for a past epoch is received,clients use a deterministic tie-breaking policy to decide if they shouldcontinue using the Commit they originally accepted or revert and use thelater one. Note that any copies of previous or forked group states must bedeleted within a reasonable amount of time to ensure that the protocol providesforward secrecy.¶
If the Commit references an unknown proposal, group members may need to solicitthe DS or other group members individually for the contents of theproposal.¶
Whenever a commit adds new members to a group, MLS requires the committer tosend a Welcome message to the new members. Applications should ensure thatWelcome messages are coupled with the tie-breaking logic for commits (seeSections 5.2.1 and5.2.2). That is, when multiplecommits are sent for the same epoch, applications need to ensure that onlyWelcome messages corresponding to the commit that "succeeded" are processed bynew members.¶
This is particularly important when groups are being reinitialized. When a groupis reinitialized, it is restarted with a different protocol version and/orcipher suite but identical membership. Whenever an authorized member sends andcommits a ReInit proposal, this immediately freezes the existing group andtriggers the creation of a new group with a newgroup_id.¶
Ideally, the new group would be created by the same member that committed theReInit proposal (including sending Welcome messages for the new group to allof the previous group's members). However, this operation is not always atomic,so it's possible for a member to go offline after committing a ReInit proposalbut before creating the new group. If this happens, it's necessary for anothermember to continue the reinitialization by creating the new group and sendingout Welcome messages.¶
This has the potential to create a race condition, where multiple members try tocontinue the reinitialization at the same time, and members receive multipleWelcome messages for each attempt at reinitializing the same group. Ensuringthat all members agree on which reinitialization attempt is "correct" is key toprevent this from causing forks.¶
Situations can arise where a malicious or buggy client sends a Commit that isnot accepted by all members of the group, and the DS is not able to detect thisand reject the Commit. For example, a buggy client might send an encryptedCommit with an invalid set of proposals, or a malicious client might send amalformed Commit of the form described inSection 16.12 of [RFC9420].¶
In situations where the DS is attempting to filter redundant Commits, the DSmight update its internal state under the assumption that a Commit has succeededand thus end up in a state inconsistent with the members of the group. Forexample, the DS might think that the current epoch is nown+1 and reject anycommits from other epochs, while the members think the epoch isn, and as aresult, the group is stuck -- no member can send a Commit that the DS willaccept.¶
Such "desynchronization" problems can arise even when the DS takesno stance on which Commit is "correct" for an epoch. The DS can enable clientsto choose between Commits, for example by providing Commits in the orderreceived and allowing clients to reject any Commits thatviolate their view of the group's policies. As such, all honest andcorrectly implemented clients will arrive at the same "first valid Commit" andchoose to process it. Malicious or buggy clients that process a different Commitwill end up in a forked view of the group.¶
When these desynchronizations happen, the application may choose to take actionto restore the functionality of the group. These actions themselves can havesecurity implications. For example, a client developer might have a clientautomatically rejoin a group, using an external join, when it processes aninvalid Commit. In this operation, however, the client trusts that theGroupInfo provided by the DS faithfully represents the state of the group, andnot, say, an earlier state containing a compromised leaf node. In addition, theDS may be able to trigger this condition by deliberately sending the victim aninvalid Commit. In certain scenarios, this trust can enable the DS or amalicious insider to undermine the post-compromise security guarantees providedby MLS.¶
Actions to recover from desynchronization can also have availability and DoSimplications. For example, if a recovery mechanism relies on external joins, amalicious member that deliberately posts an invalid Commit could also post acorrupted GroupInfo object in order to prevent victims from rejoining the group.Thus, careful analysis of security implications should be made for any systemfor recovering from desynchronization.¶
MLS is designed as a large-scale group messaging protocol and hence aims toprovide both performance and security (e.g., integrity and confidentiality)to its users. Messaging systems that implement MLS provide support forconversations involving two or more members, and aim to scale to groups withtens of thousands of members, typically including many users using multiple devices.¶
MLS aims to provide agreement on group membership, meaning that all groupmembers have agreed on the list of current group members.¶
Some applications may wish to enforce Access Control Lists (ACLs) to limit addition or removal of groupmembers to privileged clients or users. Others may wish to requireauthorization from the current group members or a subset thereof. Such policiescan be implemented at the application layer, on top of MLS. Regardless, MLS doesnot allow for or support addition or removal of group members without informingall other members.¶
Membership of an MLS group is managed at the level of individual clients. Inmost cases, a client corresponds to a specific device used by a user. If a userhas multiple devices, the user will generally be represented in a group bymultiple clients (although applications could choose to have devices sharekeying material). If an application wishes to implement operations at the levelof users, it is up to the application to track which clients belong to a givenuser and ensure that they are added/removed consistently.¶
MLS provides two mechanisms for changing the membership of a group. The primarymechanism is for an authorized member of the group to send a Commit that adds orremoves other members. A secondary mechanism is an "external join": A member ofthe group publishes certain information about the group, which a new member canuse to construct an "external" Commit message that adds the new member to thegroup. (There is no similarly unilateral way for a member to leave the group;they must be removed by a remaining member.)¶
With both mechanisms, changes to the membership are initiated from inside thegroup. When members perform changes directly, this is clearly the case.External joins are authorized indirectly, in the sense that a member publishinga GroupInfo object authorizes anyone to join who has access to the GroupInfoobject, subject to whatever access control policies the application appliesfor external joins.¶
Both types of joins are done via a Commit message, which could beblocked by the DS or rejected by clients if the join is not authorized. Theformer approach requires that Commits be visible to the DS; the latter approachrequires that clients all share a consistent policy. In the unfortunate eventthat an unauthorized member is able to join, MLS enables any member to removethem.¶
Application setup may also determine other criteria for membership validity. Forexample, per-device signature keys can be signed by an identity key recognizedby other participants. If a certificate chain is used to authenticate devicesignature keys, then revocation by the owner adds an alternative mechanism to promptmembership removal.¶
An MLS group's secrets change on every change of membership, so each client onlyhas access to the secrets used by the group while they are a member. Messagessent before a client joins or after they are removed are protected with keysthat are not accessible to the client. Compromise of a member removed from agroup does not affect the security of messages sent after their removal.Messages sent during the client's membership are also secure as long as theclient has properly implemented the MLS deletion schedule, which calls for thesecrets used to encrypt or decrypt a message to be deleted after use, along withany secrets that could be used to derive them.¶
Any user or client may have membership in several groups simultaneously. Theset of members of any group may or may not overlap with the members ofanother group. MLS guarantees that the FS and PCS goals within a given group aremaintained and not weakened by user membership in multiple groups. However,actions in other groups likewise do not strengthen the FS and PCS guaranteeswithin a given group, e.g., key updates within a given group following a devicecompromise do not provide PCS healing in other groups; each group must beupdated separately to achieve these security objectives. This also applies tofuture groups that a member has yet to join, which are likewise unaffected byupdates performed in current groups.¶
Applications can strengthen connectivity among parallel groups by requiringperiodic key updates from a user across all groups in which they havemembership.¶
MLS provides a pre-shared key (PSK) mechanism that can be used to link healing propertiesamong parallel groups. For example, suppose a common member M of two groups Aand B has performed a key update in group A but not in group B. The key updateprovides PCS with regard to M in group A. If a PSK is exported from group A andinjected into group B, then some of these PCS properties carry over to group B,since the PSK and secrets derived from it are only known to the new, updatedversion of M, not to the old, possibly compromised version of M.¶
No operation in MLS requires two distinct clients or members to be onlinesimultaneously. In particular, members participating in conversations protectedusing MLS can update the group's keys, add or remove new members, and sendmessages without waiting for another user's reply.¶
Messaging systems that implement MLS have to provide a transport layer fordelivering messages asynchronously and reliably.¶
Because all clients within a group (members) have access to the sharedcryptographic material, the MLS protocol allows each member of the messaging groupto perform operations. However, every service/infrastructure has control overpolicies applied to its own clients. Applications managing MLS clients can beconfigured to allow for specific group operations. On the one hand, anapplication could decide that a group administrator will be the only member toperform Add and Remove operations. On the other hand, in many settings such asopen discussion forums, joining can be allowed for anyone.¶
While MLS application messages are always encrypted,MLS handshake messages can be sent either encrypted (in an MLSPrivateMessage) or unencrypted (in an MLS PublicMessage). Applicationsmay be designed such that intermediaries need to see handshakemessages, for example to enforce policy on which commits are allowed,or to provide MLS ratchet tree data in a central location. Ifhandshake messages are unencrypted, it is especially important thatthey be sent over a channel with strong transport encryption(seeSection 8) in order to prevent externalattackers from monitoring the status of the group. Applications thatuse unencrypted handshake messages may take additional steps to reducethe amount of metadata that is exposed to the intermediary. Everythingelse being equal, using encrypted handshake messages provides strongerprivacy properties than using unencrypted handshake messages,as it prevents intermediaries from learning about the structureof the group.¶
If handshake messages are encrypted, any accesscontrol policies must be applied at the client, so the application must ensurethat the access control policies are consistent across all clients to make surethat they remain in sync. If two different policies were applied, the clientsmight not accept or reject a group operation and end up in differentcryptographic states, breaking their ability to communicate.¶
Recommendation: Avoid using inconsistent access control policies,especially when using encrypted group operations.¶
MLS allows actors outside the group to influence the group in two ways: Externalsigners can submit proposals for changes to the group, and new joiners can usean external join to add themselves to the group. Theexternal_sendersextension ensures that all members agree on which signers are allowed to sendproposals, but any other policies must be assured to be consistent, as noted above.¶
Recommendation: Have an explicit group policy setting the conditions underwhich external joins are allowed.¶
Within an MLS group, every member is authenticated to every other member bymeans of credentials issued and verified by the AS. MLSdoes not prescribe what actions, if any, an application should take in the eventthat a group member presents an invalid credential. For example, an applicationmay require such a member to be immediately evicted or may allow some graceperiod for the problem to be remediated. To avoid operational problems, it isimportant for all clients in a group to have a consistent view of whichcredentials in a group are valid, and how to respond to invalid credentials.¶
Recommendation: Have a uniform credential validation process to ensurethat all group members evaluate other members' credentials in the same way.¶
Recommendation: Have a uniform policy for how invalid credentials arehandled.¶
In some authentication systems, it is possible for a previously valid credentialto become invalid over time. For example, in a system based on X.509certificates, credentials can expire or be revoked. The MLS update mechanismsallow a client to replace an old credential with a new one. This is best donebefore the old credential becomes invalid.¶
Recommendation: Proactively rotate credentials, especially if a credentialis about to become invalid.¶
Group members whose local MLS state is lost or corrupted can reinitialize theirstate by rejoining the group as a new member and removing the memberrepresenting their earlier state. An application can require that a clientperforming such a reinitialization prove its prior membership with a PSK thatwas exported from the previous state.¶
There are a few practical challenges to this approach. For example, theapplication will need to ensure that all members have the required PSK,including any new members that have joined the group since the epoch in whichthe PSK was issued. And of course, if the PSK is lost or corrupted along withthe member's other state, then it cannot be used to recover.¶
Reinitializing in this way does not provide the member with access to groupmessages exchanged during the state loss window, but enables proof of priormembership in the group. Applications may choose various configurations forproviding lost messages to valid group members that are able to prove priormembership.¶
It is common for users within a group to own multiple devices. A newdevice can be added to a group and be considered as a new client by theprotocol. This client will not gain access to the history even if it is owned bysomeone who owns another member of the group. MLS does not provide directsupport for restoring history in this case, but applications can elect toprovide such a mechanism outside of MLS. Such mechanisms, if used, may reducethe FS and PCS guarantees provided by MLS.¶
The MLS protocol provides several extension points where additional informationcan be provided. Extensions to KeyPackages allow clients to disclose additionalinformation about their capabilities. Groups can also have extension dataassociated with them, and the group agreement properties of MLS will confirmthat all members of the group agree on the content of these extensions.¶
Application messages carried by MLS are opaque to the protocol and can containarbitrary data. Each application that uses MLS needs to define the format ofitsapplication_data and any mechanism necessary to determine the format ofthat content over the lifetime of an MLS group. In many applications, this meansmanaging format migrations for groups with multiple members who may each beoffline at unpredictable times.¶
Recommendation: Use the content mechanism defined in[EXTENSIONS], unless the specific application defines anothermechanism that more appropriately addresses the same requirements for thatapplication of MLS.¶
The MLS framing for application messages also provides a field where clients cansend information that is authenticated but not encrypted. Such information canbe used by servers that handle the message, but group members are assured thatit has not been tampered with.¶
The protocol aims to be compatible with federated environments. While thisdocument does not specify all necessary mechanisms required for federation,multiple MLS implementations can interoperate to form federated systems if theyuse compatible authentication mechanisms, cipher suites, application content, andinfrastructure functionalities. Federation is described in more detail in[FEDERATION].¶
It is important that multiple versions of MLS be able to coexist in thefuture. Thus, MLS offers a version negotiation mechanism; this mechanismprevents version downgrade attacks where an attacker would actively rewritemessages with a lower protocol version than the messages originally offered by theendpoints. When multiple versions of MLS are available, the negotiation protocolguarantees that the creator is able to select the best version out of thosesupported in common by the group.¶
In MLS 1.0, the creator of the group is responsible for selecting the bestcipher suite supported across clients. Each client is able to verify availabilityof protocol version, cipher suites, and extensions at all times once it has atleast received the first group operation message.¶
Each member of an MLS group advertises the protocol functionality they support.These capability advertisements can be updated over time, e.g., if clientsoftware is updated while the client is a member of a group. Thus, in additionto preventing downgrade attacks, the members of a group can also observe when itis safe to upgrade to a new cipher suite or protocol version.¶
MLS is a security layer that needs to be integrated with an application. Afully functional deployment of MLS will have to make a number of decisions abouthow MLS is configured and operated. Deployments that wish to interoperate willneed to make compatible decisions. This section lists all of the dependencies ofan MLS deployment that are external to the protocol specification, but wouldstill need to be aligned within a given MLS deployment, or for two deploymentsto potentially interoperate.¶
The protocol has a built-in ability to negotiate protocol versions,cipher suites, extensions, credential types, and additional proposal types. Fortwo deployments to interoperate, they must have overlapping support in each ofthese categories. Therequired_capabilities extension (Section 7.2 of [RFC9420]) can promote interoperability with a wider set of clients byensuring that certain functionality continues to be supported by a group, evenif the clients in the group aren't currently relying on it.¶
MLS relies on the following network services, which need to be compatible inorder for two different deployments based on them to interoperate.¶
AnAuthentication Service, described fully inSection 4,defines the types of credentials which may be used in a deployment andprovides methods for:¶
ADelivery Service, described fully inSection 5, providesmethods for:¶
Additional services may or may not be required, depending on the applicationdesign:¶
In cases where group operations are not encrypted, the DS has the ability toobserve and maintain a copy of the public group state. In particular, thisis useful for either (1) clients that do not have the ability to send the full publicstate in a Welcome message when inviting a user or (2) clients that need torecover from losing their state. Such public state can contain privacy-sensitive information such as group members' credentials and related publickeys; hence, services need to carefully evaluate the privacy impact ofstoring this data on the DS.¶
If external joiners are allowed, there must be a method for publishing aserializedGroupInfo object (with anexternal_pub extension) thatcorresponds to a specific group and epoch, and for keeping that object in sync withthe state of the group.¶
If an application chooses not to allow external joining, it mayinstead provide a method for external users to solicit group members (or adesignated service) to add them to a group.¶
If the application uses PSKs that members of a group may not have access to(e.g., to control entry into the group or to prove membership in the groupin the past, as discussed inSection 6.6), there must be a method for distributingthese PSKs to group members who might not have them -- for instance, if theyjoined the group after the PSK was generated.¶
If an application wishes to detect and possibly discipline members that sendmalformed commits with the intention of corrupting a group's state, theremust be a method for reporting and validating malformed commits.¶
MLS requires the following parameters to be defined, which must be the same fortwo implementations to interoperate:¶
The maximum total lifetime that is acceptable for a KeyPackage.¶
How long to store the resumption PSK for past epochs of a group.¶
The degree of tolerance that's allowed for out-of-order message delivery:¶
How long to keep unused nonce and key pairs for a sender.¶
A maximum number of unused key pairs to keep.¶
A maximum number of steps that clients will move a secret tree ratchetforward in response to a single message before rejecting it.¶
Whether to buffer messages that aren't yet able to be understood due toother messages not arriving first, and, if so, how many and for how long -- forexample, Commit messages that arrive before a proposal they reference orapplication messages that arrive before the Commit starting an epoch.¶
If implementations differ in these parameters, they will interoperate to someextent but may experience unexpected failures in certain situations, such asextensive message reordering.¶
MLS provides the following locations where an application may store arbitrarydata. The format and intention of any data in these locations must align for twodeployments to interoperate:¶
Application data, sent as the payload of an encrypted message.¶
Additional authenticated data, sent unencrypted in an otherwise encryptedmessage.¶
Group IDs, as decided by group creators and used to uniquely identify a group.¶
Application-level identifiers of public key material (specifically,theapplication_id extension as defined inSection 5.3.3 of [RFC9420]).¶
MLS requires the following policies to be defined, which restrict the set ofacceptable behaviors in a group. These policies must be consistent betweendeployments for them to interoperate:¶
A policy on which cipher suites are acceptable.¶
A policy on any mandatory or forbidden MLS extensions.¶
A policy on when to send proposals and commits in plaintext instead ofencrypted.¶
A policy for which proposals are valid to have in a commit, including but notlimited to:¶
When a member is allowed to add or remove other members of the group.¶
When, and under what circumstances, a reinitialization proposal is allowed.¶
When proposals from external senders are allowed and how to authorizethose proposals.¶
When external joiners are allowed and how to authorize those externalcommits.¶
Which other proposal types are allowed.¶
A policy of when members should commit pending proposals in a group.¶
A policy of how to protect and share the GroupInfo objects needed forexternal joins.¶
A policy for when two credentials represent the same client, distinguishing the following two cases:¶
A policy on how long to allow a member to stay in a group without updating itsleaf keys before removing them.¶
Finally, there are some additional application-defined behaviors that arepartially an individual application's decision but may overlap withinteroperability:¶
MLS adopts the Internet threat model[RFC3552] and therefore assumes that theattacker has complete control of the network. It is intended to provide thesecurity services described inSection 8.2 in the face ofattackers who can:¶
Monitor the entire network.¶
Read unprotected messages.¶
Generate, inject, and delete any message in the unprotectedtransport layer.¶
While MLS should be run over a secure transport such as QUIC[RFC9000] or TLS[RFC8446], the security guarantees of MLS do not depend on thetransport. This departs from the usual design practice of trusting the transportbecause MLS is designed to provide security even in the face of compromisednetwork elements, especially the DS.¶
Generally, MLS is designed under the assumption that the transport layer ispresent to keep metadata private from network observers, while the MLS protocolprovides confidentiality, integrity, and authentication guarantees for theapplication data (which could pass through multiple systems). Additionalproperties such as partial anonymity or deniability could also be achieved inspecific architecture designs.¶
In addition, these guarantees are intended to degrade gracefully in the presenceof compromise of the transport security links as well as of both clients andelements of the messaging system, as described in the remainder of this section.¶
As discussed above, MLS provides the highest level of security when its messagesare delivered over an encrypted transport, thus preventing attackers fromselectively interfering with MLS communications as well asprotecting the already limited amount of metadata. Very littleinformation is contained in the unencrypted header of the MLS protocol messageformat for group operation messages, and application messages are alwaysencrypted in MLS.¶
Recommendation: Use transports that provide reliability and metadataconfidentiality whenever possible, e.g., by transmitting MLS messages overa protocol such as TLS[RFC8446] or QUIC[RFC9000].¶
MLS avoids the need to send the full list of recipients to the server fordispatching messages because that list could potentially contain tens ofthousands of recipients. Header metadata in MLS messages typically consists ofan opaquegroup_id, a numerical value to determine the epoch of the group (thenumber of changes that have been made to the group), and whether the message isan application message, a proposal, or a commit.¶
Even though some of this metadata information does not consist of sensitiveinformation, when correlated with other data a network observer might be able toreconstruct sensitive information. Using a secure channel to transfer thisinformation will prevent a network attacker from accessing this MLS protocolmetadata if it cannot compromise the secure channel.¶
MLS provides an authenticated "Additional Authenticated Data" (AAD) field forapplications to make data available outside a PrivateMessage, whilecryptographically binding it to the message.¶
Recommendation: Use the "Additional Authenticated Data" field of thePrivateMessage instead of using other unauthenticated means of sendingmetadata throughout the infrastructure. If the data should be kept private, theinfrastructure should use encrypted application messages instead.¶
Having no secure channel to exchange MLS messages can have a serious impact onprivacy when transmitting unencrypted group operation messages. Observing thecontents and signatures of the group operation messages may lead an adversary toextract information about the group membership.¶
Recommendation: Never use the unencrypted mode for group operationswithout using a secure channel for the transport layer.¶
In general, we do not consider DoS resistance to be theresponsibility of the protocol. However, it should not be possible for anyoneaside from the DS to perform a trivial DoS attack from which it ishard to recover. This can be achieved through the secure transport layer,which prevents selective attack on MLS communications by networkattackers.¶
In the centralized setting, DoS protection can typically be performed by usingtickets or cookies which identify users to a service for a certain number ofconnections. Such a system helps in preventing anonymous clients from sendingarbitrary numbers of group operation messages to the DS or the MLSclients.¶
Recommendation: Use credentials uncorrelated with specific users to helpprevent DoS attacks, in a privacy-preserving manner. Note that the privacy ofthese mechanisms has to be adjusted in accordance with the privacy expectedfrom secure transport links. (See more discussion in the next section.)¶
As noted above, MLS is designed to provide some robustness in the face oftampering within the secure transport, e.g., tampering by the DS.The confidentiality and authenticity properties of MLS prevent the DS fromreading or writing messages. MLS also provides a few tools for detectingmessage suppression, with the caveat that message suppression cannot always bedistinguished from transport failure.¶
Each encrypted MLS message carries a per-sender incrementing "generation" number.If a group member observes a gap in the generationsequence for a sender, then they know that they have missed a message from thatsender. MLS also provides a facility for group members to send authenticatedacknowledgments of application messages received within a group.¶
As discussed inSection 5, the DS is trusted to selectthe single Commit message that is applied in each epoch from among the Commits sentby group members. Since only one Commit per epoch is meaningful, it's notuseful for the DS to transmit multiple Commits to clients. The risk remainsthat the DS will use the ability maliciously.¶
MLS aims to provide a number of security guarantees, covering authentication, aswell as confidentiality guarantees to different degrees in different scenarios.¶
MLS enforces the encryption of application messages and thus generallyguarantees authentication and confidentiality of application messages sent in agroup.¶
In particular, this means that only other members of a given group can decryptthe payload of a given application message, which includes information about thesender of the message.¶
Similarly, group members receiving a message from another group member canauthenticate that group member as the sender of the message and verify themessage's integrity.¶
Message content can be deniable if the signature keys are exchanged over adeniable channel prior to signing messages.¶
Depending on the group settings, handshake messages can be encrypted as well. Ifthat is the case, the same security guarantees apply.¶
MLS optionally allows the addition of padding to messages, mitigating the amountof information leaked about the length of the plaintext to an observer on thenetwork.¶
MLS provides additional protection regarding secrecy of past messages and futuremessages. These cryptographic security properties are forward secrecy (FS) and post-compromise security (PCS).¶
FS means that access to all encrypted traffic history combined withaccess to all current keying material on clients will not defeat thesecrecy properties of messages older than the oldest key of thecompromised client. Note that this means that clients have to delete the appropriatekeys as soon as they have been used with the expected message;otherwise, the secrecy of the messages and the security of MLS areconsiderably weakened.¶
PCS means that if a group member's state is compromised at some time t1 but thegroup member subsequently performs an update at some time t2, then all MLSguarantees apply to messages sent by the member after time t2 and to messages sent by othermembers after they have processed the update. For example, if an attacker learnsall secrets known to Alice at time t1, including both Alice's long-term secretkeys and all shared group keys, but Alice performs a key update at time t2, thenthe attacker is unable to violate any of the MLS security properties after theupdates have been processed.¶
Both of these properties are satisfied even against compromised DSs and ASes inthe case where some other mechanism for verifying keys is in use, such as KeyTransparency[KT].¶
Confidentiality is mainly ensured on the client side. Because FS and PCS rely on the active deletion andreplacement of keying material, any client which is persistently offline maystill be holding old keying material and thus be a threat to both FS and PCS ifit is later compromised.¶
MLS partially defends against this problem by active members includingnew keying material. However, not much can be done on the inactive side especially in thecase where the client has not processed messages.¶
Recommendation: Mandate key updates from clients that are not otherwisesending messages and evict clients that are idle for too long.¶
These recommendations will reduce the ability of idle compromised clients todecrypt a potentially long set of messages that might have been sent after the point of compromise.¶
The precise details of such mechanisms are a matter of local policy and beyondthe scope of this document.¶
MLS provides strong authentication within a group, such that a group membercannot send a message that appears to be from another group member.Additionally, some services require that a recipient be able to prove to theservice provider that a message was sent by a given client, in order to reportabuse. MLS supports both of these use cases. In some deployments, these servicesare provided by mechanisms which allow the receiver to prove a message's originto a third party. This is often called "non-repudiation".¶
Roughly speaking, "deniability" is the opposite of "non-repudiation", i.e., theproperty that it is impossible to prove to a third party that a message was sentby a given sender. MLS does not make any claims with regard to deniability. Itmay be possible to operate MLS in ways that provide certain deniabilityproperties, but defining the specific requirements and resulting notions ofdeniability requires further analysis.¶
When a user has multiple devices, the base MLS protocol only describes how tooperate each device as a distinct client in the MLS groups that the user is amember of. As a result, the other members of the group will be able to identifywhich of a user's devices sent each message and, therefore, which device the userwas using at the time. Group members would also be able to detect when the useradds or removes authorized devices from their account. For some applications,this may be an unacceptable breach of the user's privacy.¶
This risk only arises when the leaf nodes for the clients in question providedata that can be used to correlate the clients. One way to mitigate thisrisk is by only doing client-level authentication within MLS. If user-levelauthentication is still desirable, the application would have to provide itthrough some other mechanism.¶
It is also possible to maintain user-level authentication while hidinginformation about the clients that a user owns. This can be done by having theclients share cryptographic state, so that they appear as a single client withinthe MLS group. Appearing as a single client has the privacy benefits of nolonger leaking which device was used to send a particular message and no longerleaking the user's authorized devices. However, the application would need toprovide a synchronization mechanism so that the state of each client remains consistentacross changes to the MLS group. Flaws in this synchronization mechanism mayimpair the ability of the user to recover from a compromise of one of theirdevices. In particular, state synchronization may make it easier for an attackerto use one compromised device to establish exclusive control of a user'saccount, locking them out entirely and preventing them from recovering.¶
The MLS protocol adopts a threat model which includes multiple forms ofendpoint/client compromise. While adversaries are in a strong position ifthey have compromised an MLS client, there are still situations where securityguarantees can be recovered thanks to the PCS properties achieved by the MLSprotocol.¶
In this section we will explore the consequences and recommendations regardingthe following compromise scenarios:¶
The attacker has access to a symmetric encryption key.¶
The attacker has access to an application ratchet secret.¶
The attacker has access to the group secrets for one group.¶
The attacker has access to a signature oracle for any group.¶
The attacker has access to the signature key for one group.¶
The attacker has access to all secrets of a user for all groups (full statecompromise).¶
As described above, each MLS epoch creates a new group secret.¶
These group secrets are then used to create a per-sender ratchet secret, whichin turn is used to create a per-sender Authenticated Encryption with Associated Data (AEAD)[RFC5116] keythat is then used to encrypt MLS plaintext messages. Each time a message issent, the ratchet secret is used to create a new ratchet secret and a newcorresponding AEAD key. Because of the properties of the key derivationfunction, it is not possible to compute a ratchet secret from its correspondingAEAD key or compute ratchet secret n-1 from ratchet secret n.¶
Below, we consider the compromise of each of these pieces of keying material inturn, in ascending order of severity. While this is a limited kind ofcompromise, it can be realistic in cases of implementation vulnerabilities whereonly part of the memory leaks to the adversary.¶
In some circumstances, adversaries may have access to specific AEAD keys andnonces which protect an application message or a group operation message. Compromise ofthese keys allows the attacker to decrypt the specific message encrypted withthat key but no other; because the AEAD keys are derived from the ratchetsecret, it cannot generate the next ratchet secret and hence not the next AEADkey.¶
In the case of an application message, an AEAD key compromise means that theencrypted application message will be leaked as well as the signature over thatmessage. This means that the compromise has both confidentiality and privacyimplications on the future AEAD encryptions of that chain. In the case of agroup operation message, only the privacy is affected, as the signature isrevealed, because the secrets themselves are protected by Hybrid Public Key Encryption (HPKE). Notethat under that compromise scenario, authentication is not affected in either ofthese cases. As every member of the group can compute the AEAD keys for all thechains (they have access to the group secrets) in order to send and receivemessages, the authentication provided by the AEAD encryption layer of the commonframing mechanism is weak. Successful decryption of an AEAD encrypted messageonly guarantees that some member of the group -- or in this case an attackerwho has compromised the AEAD keys -- sent the message.¶
Compromise of the AEAD keys allows the attacker to send an encrypted messageusing that key, but the attacker cannot send a message to a group that appears to be fromany valid client because the attacker cannot forge the signature. This applies to all theforms of symmetric key compromise described inSection 8.3.1.¶
When a ratchet secret is compromised, the adversary can compute both the currentAEAD keys for a given sender and any future keys for that sender in thisepoch. Thus, it can decrypt current and future messages by the correspondingsender. However, because it does not have previous ratchet secrets, it cannotdecrypt past messages as long as those secrets and keys have been deleted.¶
Because of its forward secrecy guarantees, MLS will also retain secrecy of allother AEAD keys generated forother MLS clients, outside this dedicated chainof AEAD keys and nonces, even within the epoch of the compromise. MLS providespost-compromise security against an active adaptive attacker across epochs forAEAD encryption, which means that as soon as the epoch is changed, if theattacker does not have access to more secret material they won't be able toaccess any protected messages from future epochs.¶
An adversary who gains access to a set of group secrets -- as when a member of thegroup is compromised -- is significantly more powerful. In this section, weconsider the case where the signature keys are not compromised. This can occurif the attacker has access to part of the memory containing the group secretsbut not to the signature keys which might be stored in a secure enclave.¶
In this scenario, the adversary gains the ability to compute any number ofratchet secrets for the epoch and their corresponding AEAD encryption keys andthus can encrypt and decrypt all messages for the compromised epochs.¶
If the adversary is passive, it is expected from the PCS properties of the MLSprotocol that as soon as the compromised party remediates the compromise andsends an honest Commit message, the next epochs will provide message secrecy.¶
If the adversary is active, the adversary can engage in the protocol itself andperform updates on behalf of the compromised party with no ability for an honestgroup to recover message secrecy. However, MLS provides PCS against activeadaptive attackers through its Remove group operation. This means that as longas other members of the group are honest, the protocol will guarantee messagesecrecy for all messages exchanged in the epochs after the compromised party hasbeen removed.¶
If an active adversary has compromised an MLS client and can sign messages, twodifferent scenarios emerge. In the strongest compromise scenario, the attackerhas access to the signing key and can forge authenticated messages. In a weaker,yet realistic scenario, the attacker has compromised a client but the clientsignature keys are protected with dedicated hardware features which do not allowdirect access to the value of the private key and instead provide a signatureAPI.¶
When considering an active adaptive attacker with access to a signature oracle,the compromise scenario implies a significant impact on both the secrecy andauthentication guarantees of the protocol, especially if the attacker also hasaccess to the group secrets. In that case, both secrecy and authentication arebroken. The attacker can generate any message, for the current and futureepochs, until the compromise is remediated and the formerly compromised clientsends an honest update.¶
Note that under this compromise scenario, the attacker can perform alloperations which are available to a legitimate client even without access to theactual value of the signature key.¶
The difference between having access to the value of the signature key and onlyhaving access to a signing oracle is not about the ability of an active adaptivenetwork attacker to perform different operations during the time of thecompromise; the attacker can perform every operation available to a legitimateclient in both cases.¶
There is a significant difference, however, in terms of recovery after acompromise.¶
Because of the PCS guarantees provided by the MLS protocol, when a previouslycompromised client recovers from compromise and performs an honest Commit, bothsecrecy and authentication of future messages can be recovered as long as theattacker doesn't otherwise get access to the key. Because the adversary doesn'thave the signing key, they cannot authenticate messages on behalf of thecompromised party, even if they still have control over some group keys bycolluding with other members of the group.¶
This is in contrast with the case where the signature key is leaked. In thatcase, the compromised endpoint needs to refresh its credentials and invalidatethe old credentials before the attacker will be unable to authenticate messages.¶
Beware that in both oracle and private key access, an active adaptive attackercan follow the protocol and request to update its own credential. This in turninduces a signature key rotation, which could provide the attacker with part orthe full value of the private key, depending on the architecture of the serviceprovider.¶
Recommendation: Signature private keys should be compartmentalized fromother secrets and preferably protected by a Hardware Security Module (HSM) or dedicated hardwarefeatures to allow recovery of the authentication for future messages after acompromise.¶
Recommendation: When the credential type supports revocation, the users ofa group should check for revoked keys.¶
In real-world compromise scenarios, it is often the case that adversaries targetspecific devices to obtain parts of the memory or even the ability to executearbitrary code in the targeted device.¶
Also, recall that in this setting, the application will often retain theunencrypted messages. If so, the adversary does not have to break encryption atall to access sent and received messages. Messages may also be sent by using theapplication to instruct the protocol implementation.¶
Recommendation: If messages are stored on the device, they should beprotected using encryption at rest, and the keys used should be storedsecurely using dedicated mechanisms on the device.¶
Recommendation: If the threat model of the system includes an adversarythat can access the messages on the device without even needing to attackMLS, the application should delete plaintext and ciphertext messages as soonas practical after encryption or decryption.¶
Note that this document makes a clear distinction between the way signature keysand other group shared secrets must be handled. In particular, a large set ofgroup secrets cannot necessarily be assumed to be protected by an HSM or secureenclave features. This is especially true because these keys are frequently usedand changed with each message received by a client.¶
However, the signature private keys are mostly used by clients to send amessage. They also provide strong authentication guarantees to other clients;hence, we consider that their protection by additional security mechanisms shouldbe a priority.¶
Overall, there is no way to detect or prevent these compromises, as discussed inthe previous sections: Performing separation of the application secret statescan help recovery after compromise; this is the case for signature keys, butsimilar concerns exist for a client's encryption private keys.¶
Recommendation: The secret keys used for public key encryption should bestored similarly to the way the signature keys are stored, as keys can be usedto decrypt the group operation messages and contain the secret material usedto compute all the group secrets.¶
Even if secure enclaves are not perfectly secure or are even completely broken,adopting additional protections for these keys can ease recovery of the secrecyand authentication guarantees after a compromise where, for instance, anattacker can sign messages without having access to the key. In certaincontexts, the rotation of credentials might only be triggered by the AS throughACLs and hence be beyond the capabilities of the attacker.¶
There are many scenarios leading to communication between the application on adevice and the DS or the AS. In particular,when:¶
The application connects to the AS to generate or validatea new credential before distributing it.¶
The application fetches credentials at the DS prior to creatinga messaging group (one-to-one or more than two clients).¶
The application fetches service provider information or messages on theDS.¶
The application sends service provider information or messages to the DeliveryService.¶
In all these cases, the application will often connect to the device via asecure transport which leaks information about the origin of the request, such asthe IP address and -- depending on the protocol -- the MAC address of the device.¶
Similar concerns exist in the peer-to-peer use cases for MLS.¶
Recommendation: In the case where privacy or anonymity isimportant, using adequate protection such as Multiplexed Application Substrate over QUIC Encryption (MASQUE)[MASQUE-PROXY], Tor[Tor], or a VPN can improve metadataprotection.¶
More generally, using anonymous credentials in an MLS-based architecture mightnot be enough to provide strong privacy or anonymity properties.¶
In the case where private data or metadata has to be persisted on the serversfor functionality (mappings between identities and push tokens, groupmetadata, etc.), it should be stored encrypted at rest and only decrypted upon needduring the execution. Honest service providers can rely on such "encryption atrest" mechanisms to be able to prevent access to the data when not using it.¶
Recommendation: Store cryptographic material used for server-sidedecryption of sensitive metadata on the clients and only send it when needed.The server can use the secret to open and update encrypted data containersafter which they can delete these keys until the next time they need it, inwhich case those can be provided by the client.¶
Recommendation: Rely on group secrets exported from the MLS session forserver-side encryption at rest and update the key after each removal from thegroup. Otherwise, rotate those keys on a regular basis.¶
MLS is intended to provide strong guarantees in the face of compromise of theDS. Even a totally compromised DS should not be able to read messages or inject messages that will be acceptable to legitimate clients. It should also not beable to undetectably remove, reorder, or replay messages.¶
However, a malicious DS can mount a variety of DoS attacks on the system,including total DoS attacks (where it simply refuses to forward any messages)and partial DoS attacks (where it refuses to forward messages to and fromspecific clients). As noted inSection 5.2, these attacks are onlypartially detectable by clients without an out-of-band channel. Ultimately,failure of the DS to provide reasonable service must be dealt with as a customerservice matter, not via technology.¶
Because the DS is responsible for providing the initial keying material toclients, it can provide stale keys. This does not inherently lead to compromiseof the message stream, but does allow the DS to attack post-compromise security to a limitedextent. This threat can be mitigated by having initial keys expire.¶
Initial keying material (KeyPackages) using thebasic credential type is morevulnerable to replacement by a malicious or compromised DS, as there is nobuilt-in cryptographic binding between the identity and the public key of theclient.¶
Recommendation: Prefer a credential type in KeyPackages which includes astrong cryptographic binding between the identity and its key (for example, thex509 credential type). When using thebasic credential type, take extracare to verify the identity (typically out of band).¶
Push tokens provide an important mechanism that is often ignored from the standpoint of privacy considerations. In many modern messaging architectures, applications are usingpush notification mechanisms typically provided by OS vendors. This is to makesure that when messages are available at the DS (or via othermechanisms if the DS is not a central server), the recipient application on adevice knows about it. Sometimes the push notification can contain theapplication message itself, which saves a round trip with the DS.¶
To "push" this information to the device, the service provider and the OSinfrastructures use unique per-device, per-application identifiers calledpush tokens. This means that the push notification provider and the serviceprovider have information on which devices receive information and at whichpoint in time. Alternatively, non-mobile applications could use a WebSocket orpersistent connection for notifications directly from the DS.¶
Even though the service provider and the push notification providercan't necessarily access the content (typically encrypted MLSmessages), no technical mechanism in MLS prevents them from determiningwhich devices are recipients of the same message.¶
For secure messaging systems, push notifications are often sent in real time, as itis not acceptable to create artificial delays for message retrieval.¶
Recommendation: If real-time notifications are not necessary, one candelay notifications randomly across recipient devices using a mixnet or othertechniques.¶
Note that with a legal request to ask the service provider for the push tokenassociated with an identifier, it is easy to correlate the token with a secondrequest to the company operating the push notification system to get informationabout the device, which is often linked with a real identity via a cloudaccount, a credit card, or other information.¶
Recommendation: If stronger privacy guarantees are needed with regard tothe push notification provider, the client can choose to periodically connectto the DS without the need of a dedicated push notificationinfrastructure.¶
Applications can also consider anonymous systems for server fanout (forexample,[Loopix]).¶
The Authentication Service design is left to the infrastructure designers. Inmost designs, a compromised AS is a serious matter, as the AS can serveincorrect or attacker-provided identities to clients.¶
The attacker can link an identity to a credential.¶
The attacker can generate new credentials.¶
The attacker can sign new credentials.¶
The attacker can publish or distribute credentials.¶
An attacker that can generate or sign new credentials may or may not have accessto the underlying cryptographic material necessary to perform suchoperations. In that last case, it results in windows of time for which allemitted credentials might be compromised.¶
Recommendation: Use HSMs to store the root signature keys to limit theability of an adversary with no physical access to extract the top-levelsignature private key.¶
Note that historically some systems generate signature keys on theAS and distribute the private keys to clients along withtheir credential. This is a dangerous practice because it allows the AS or anattacker who has compromised the AS to silently impersonate the client.¶
One important property of MLS is that all members know which other members arein the group at all times. If all members of the group and the ASare honest, no parties other than the members of the current group canread and write messages protected by the protocol for that group.¶
This guarantee applies to the cryptographic identities of the members.Details about how to verify the identity of a client depend on the MLScredential type used. For example, cryptographic verification of credentials canbe largely performed autonomously (e.g., without user interaction) by theclients themselves for thex509 credential type.¶
In contrast, when MLS clients use thebasic credential type, some othermechanism must be used to verify identities. For instance, the AuthenticationService could operate some sort of directory server to provide keys, or userscould verify keys via an out-of-band mechanism.¶
Recommendation: Select the MLS credential type with the strongest securitywhich is supported by all target members of an MLS group.¶
Recommendation: Do not use the same signature key pair acrossgroups. Update all keys for all groups on a regular basis. Do not preservekeys in different groups when suspecting a compromise.¶
If the AS is compromised, it could validate a signaturekey pair (or generate a new one) for an attacker. The attacker could then use this key pair to join agroup as if it were another of the user's clients. Because a user can have manyMLS clients running the MLS protocol, it possibly has many signature key pairsfor multiple devices. These attacks could be very difficult to detect,especially in large groups where the UI might not reflect all the changes backto the users. If the application participates in a key transparency mechanism inwhich it is possible to determine every key for a given user, then thiswould allow for detection of surreptitiously created false credentials.¶
Recommendation: Make sure that MLS clients reflect all the membershipchanges to the users as they happen. If a choice has to be made because thenumber of notifications is too high, the client should provide a log of stateof the device so that the user can examine it.¶
Recommendation: Provide a key transparency mechanism for theAS to allow public verification of the credentialsauthenticated by this service.¶
While the ways to handle MLS credentials are not defined by the protocol or thearchitecture documents, the MLS protocol has been designed with a mechanism thatcan be used to provide out-of-band authentication to users. Theauthentication_secret generated for each user at each epoch of the group is aone-time, per-client authentication secret which can be exchanged between usersto prove their identities to each other. This can be done, for instance, using a QRcode that can be scanned by the other parties.¶
Recommendation: Provide one or more out-of-band authentication mechanismsto limit the impact of an AS compromise.¶
We note, again, that the AS may not be a centralizedsystem and could be realized by many mechanisms such as establishing priorone-to-one deniable channels, gossiping, or using trust on first use (TOFU) forcredentials used by the MLS protocol.¶
Another important consideration is the ease of redistributing new keys on clientcompromise, which helps recovering security faster in various cases.¶
Group membership is itself sensitive information, and MLS is designed to limitthe amount of persistent metadata. However, large groups often require aninfrastructure that provides server fanout. In the case of client fanout, thedestination of a message is known by all clients; hence, the server usually doesnot need this information. However, servers may learn this information throughtraffic analysis. Unfortunately, in a server-side fanout model, the DeliveryService can learn that a given client is sending the same message to a set ofother clients. In addition, there may be applications of MLS in which the groupmembership list is stored on some server associated with the DS.¶
While this knowledge is not a breach of the protocol's authentication orconfidentiality guarantees, it is a serious issue for privacy.¶
Some infrastructures keep a mapping between keys used in the MLS protocol anduser identities. An attacker with access to this information due to compromiseor regulation can associate unencrypted group messages (e.g., Commits andProposals) with the corresponding user identity.¶
Recommendation: Use encrypted group operation messages to limit privacyrisks whenever possible.¶
In certain cases, the adversary can access specific bindings between public keysand identities. If the signature keys are reused across groups, the adversarycan get more information about the targeted user.¶
Recommendation: Ensure that linking between public keys and identitiesonly happens in expected scenarios.¶
Physical attacks on devices storing and executing MLS principals are notconsidered in depth in the threat model of the MLS protocol. Whilenon-permanent, non-invasive attacks can sometimes be equivalent to softwareattacks, physical attacks are considered outside of the MLS threat model.¶
Compromise scenarios typically consist of a software adversary, which canmaintain active adaptive compromise and arbitrarily change the behavior of theclient or service.¶
On the other hand, security goals consider that honest clients will always runthe protocol according to its specification. This relies on implementations ofthe protocol to securely implement the specification, which remains non-trivial.¶
Recommendation: Additional steps should be taken to protect the device andthe MLS clients from physical compromise. In such settings, HSMs and secureenclaves can be used to protect signature keys.¶
MLS does not protect against one group member replaying a PrivateMessage sent by anothergroup member within the same epoch that the message was originally sent. Similarly, MLSdoes not protect against the replay (by a group member or otherwise) of a PublicMessagewithin the same epoch that the message was originally sent. Applications forwhom replay is an important risk should apply mitigations at the application layer, asdiscussed below.¶
In addition to the risks discussed inSection 8.3.1, an attackerwith access to the ratchet secrets for an endpoint can replay PrivateMessageobjects sent by other members of the group by taking the signed content of themessage and re-encrypting it with a new generation of the original sender'sratchet. If the other members of the group interpret a message with a newgeneration as a fresh message, then this message will appear fresh. (This ispossible because the message signature does not cover thegeneration fieldof the message.) Messages sent as PublicMessage objects similarly lack replayprotections. There is no message counter comparable to thegeneration fieldin PrivateMessage.¶
Applications can detect replay by including a unique identifier for the message(e.g., a counter) in either the message payload or theauthenticated_datafield, both of which are included in the signatures forPublicMessage and PrivateMessage.¶
Various academic works have analyzed MLS and the different security guaranteesit aims to provide. The security of large parts of the protocol has been analyzed by[BBN19] (for MLS Draft 7),[ACDT21] (for MLS Draft 11), and[AJM20] (for MLS Draft 12).¶
Individual components of various drafts of the MLS protocol have beenanalyzed in isolation and with differing adversarial models. Forexample,[BBR18],[ACDT19],[ACCKKMPPWY19],[AJM20],[ACJM20],[AHKM21],[CGWZ25], and[WPB25] analyze theratcheting tree sub-protocol of MLS that facilitates key agreement;[WPBB22] analyzes the sub-protocol of MLS for group state agreementand authentication; and[BCK21] analyzes the key derivation paths inthe ratchet tree and key schedule. Finally,[CHK21] analyzes theauthentication and cross-group healing guarantees provided by MLS.¶
This document has no IANA actions.¶