Matrix MLS Last updated: 2023-07-18

                                   __   __ _    ____               _   ___ 
  __ _ _ __ ___   __      _____   |  \ /  | |  /   _|   _   _  ___| |_/ _ \
 / _` | '__/ _ \  \ \ /\ / / _ \  |   V   | |  \_ (_   | | | |/ _ \ __\// /
| (_| | | |  __/   \ V  V /  __/  | |\_/| | |____)  \  | |_| |  __/ |_  \/ 
 \__,_|_|  \___|    \_/\_/ \___|  |_|   |_|____|____/   \__, |\___|\__| () 
                                                         |___/             

Not Yet.

Messaging Layer Security (MLS) is an IETF standard for end-to-end encryption in messaging systems. We are investigating bringing MLS to Matrix. So far we have basic encryption and decryption working and can handle membership changes.

Latest demo video: key backup

Previous demo videos:

Why MLS?

In most cases, MLS has better performance in large groups than Olm/Megolm. The graph below shows a comparison¹ between some MLS and Olm/Megolm operations.

Comparison graph

The graph gives a simplified comparison, but gives an idea of their relative performance. In most cases, MLS is faster than Olm/Megolm. But one case in which MLS can be much slower when adding a large number of users to a group at a time. It is expected that this would not be a common occurrence.

However, integrating MLS into Matrix is not a simple task. One of the biggest hurdles is that MLS assumes that epochs (essentially, the state of an MLS tree in between updates to the tree) have a linear ordering. However, Matrix being a decentralised system with no central authority, it is difficult to enforce a linear ordering. Thus we must either determine a way to do so, or work around this limitation.

In addition, we need to investigate how other Matrix features, such as key backups, interact with MLS.

Tasks

(tasks are not necessarily in order)

Initial investigation

Implementation

Documentation

Resources


¹ code for running the comparison is at https://gitlab.matrix.org/uhoreg/mls-comparison. More details on how the comparison was run is at https://gitlab.matrix.org/uhoreg/mls-comparison/-/wikis/home.

History

a0c4741 - (2023-07-18) MLS is now an RFC!

d0f71ae - (2023-07-06) fix name of latest demo

f21f743 - (2023-06-30) key backups done

bd50104 - (2023-06-15) add external commits demo and mark historical decryption as in-progress

c430043 - (2023-05-02) also link to rust lib in implementations

c94bf44 - (2023-05-02) also link to first demo video in top, and add a section heading

15ff4a8 - (2023-05-02) add new demo video and mark external commits as in-progress

d2de8cc - (2023-05-01) Update last updated date

e686ca8 - (2023-05-01) Checkout full repo history

d449c6e - (2023-05-01) Add newline before commit log

a436430 - (2023-05-01) Fix commit log links

0ef051b - (2023-05-01) Create jekyll-gh-pages.yml

4109fa1 - (2023-04-20) more status update

7cbeced - (2023-04-20) update status, include demo

0f0bb93 - (2023-03-30) update status