Recent from talks
Nothing was collected or created yet.
Matrix (protocol)
View on Wikipedia
This article may contain excessive or inappropriate references to self-published sources. (February 2019) |
| Communication protocol | |
| Purpose | Federated messaging and data synchronization |
|---|---|
| Developer(s) | The Matrix.org Foundation CIC |
| Introduction | September 2014[1][failed verification] |
| Based on | HTTP, WebRTC |
| OSI layer | application layer |
| Port(s) | unknown value |
| Website | matrix |
Matrix (sometimes stylized as [matrix] or [m] for short) is an open standard[citation needed] and communication protocol for real-time communication.[2] It aims to make real-time communication work seamlessly between different service providers, in the way that standard Simple Mail Transfer Protocol email currently does for store-and-forward email service, by allowing users with accounts at one communications service provider to communicate with users of a different service provider via online chat, voice over IP, and videotelephony. It therefore serves a similar purpose to protocols like XMPP, but is not based on any existing communication protocol.
From a technical perspective, it is an application layer communication protocol for federated real-time communication. It provides HTTP APIs and open source reference implementations for securely distributing and persisting messages in JSON format over an open federation of servers.[3][4] It can integrate with standard web services via WebRTC, facilitating browser-to-browser applications.
History
[edit]Beginning–2018
[edit]The initial project was created inside Amdocs, while building a chat tool called "Amdocs Unified Communications",[5] by Matthew Hodgson and Amandine Le Pape. Amdocs then funded most of the development work from 2014 to October 2017.[6] Matrix was the winner of the Innovation award at WebRTC 2014 Conference & Expo,[7] and of the "Best in Show" award at WebRTC World in 2015.[8] The protocol received praise mixed with some cautionary notes after it launched in 2014. Reviewers noted that other attempts at defining an open instant messaging or multimedia signalling protocol of this type had difficulties becoming widely adopted—e.g. XMPP and IRCv3—and have highlighted the challenges involved, both technological and political.[9] Some were unclear if there was enough demand among users for services which interoperate among providers.[10][11] In 2015, a subsidiary of Amdocs was created, named "Vector Creations Limited", and the Matrix staff was moved there.[12]
In July 2017, the funding by Amdocs was announced to be cut and in the following weeks the core team created their own UK-based company, "New Vector Limited",[13] which was mainly built to support the development of Matrix and Riot, the second of which was later renamed to Element.[14] During this time period, there were multiple calls for support to the community and companies that build on Matrix,[15] to help pay for the wages of at least part of the core team. Patreon and Liberapay crowdfunding accounts were created,[16] and the core team started a video podcast, called Matrix "Live" to keep the contributors up to speed with ongoing developments.[17] This was expanded by a weekly blog format, called "This Week in Matrix", where interested community members could read, or submit their own, Matrix-related news.[18] The company was created with the goal of offering consultancy services for Matrix and paid hosting of Matrix servers (as a platform called modular.im, which was later renamed to Element matrix services[19]) to generate income.[20]
In the early weeks after its creation, the Matrix team and the company Purism published plans to collaborate in the creation of the Librem 5 phone.[21] The Librem 5 was intended to be a Matrix native phone, where the default pre-installed messaging and caller app should use Matrix for audio and video calls and instant messaging.[22]
In 2017, KDE announced it was working on including support for the protocol in its IRC client Konversation.[23]
In late January 2018, the company received an investment of US$5 million from Status,[24][25] an Ethereum based startup.
In April 2018, the French Government announced plans to create their own instant messaging tool.[26] Work on the application based on Riot and Matrix protocol—called Tchap after French scientist Claude Chappe—had started in early 2018,[27] and the program was open-sourced and released on iOS and Android in April 2019.[28]
In October 2018, a Community Interest Company called "The Matrix.org Foundation C.I.C."[29] was incorporated, to serve as a neutral legal entity for further development of the standard.[30]
2019–2022
[edit]In early 2019, the Matrix protocol saw increased adoption and underwent significant development. The KDE community announced in February 2019 its intention to use Matrix for internal communications, citing its decentralized nature as an alternative to services like Telegram, Slack and Discord, and planned to operate its own server instance.[31] Two months later, in April 2019, the production servers of Matrix.org were compromised in a security breach of production servers and not the protocol.[32]
In June 2019, when the Matrix protocol left beta phase with the release of version 1.0 across all its APIs. During this time, the Matrix Foundation was also officially launched to oversee the protocol, and Synapse was serving as its reference homeserver implementation.[33][34] Later that year, in October 2019, the company New Vector raised an additional US$8.5 million for the development of Matrix.[35] By the end of the year, several organizations announced plans for adoption. In December 2019, the German Federal Ministry of Defense began a pilot project named BwMessenger, based on the Matrix protocol, a Synapse server, and the Riot application modeled after France's Tchap project.[36] Also in December, Mozilla announced it would replace its IRC infrastructure with Matrix, scheduling the migration for early 2020.[37]
Following its announcement, Mozilla completed its transition by shutting down its IRC server in March 2020 and directing users to its new Matrix instance.[38] In May 2020, end-to-end encryption was enabled by default for all new private conversations within the protocol.[39] In October of that year, the company Element acquired the Gitter chat platform from GitLab, announcing plans to migrate all Gitter users to Matrix.[40][41]
By March 2021, the Matrix.org Foundation reported that there were 28 million global visible accounts on the network.[42] In September 2022, security vulnerabilities were disclosed in the implementation of a client-side encryption library. Due to the protocol's interoperable design, the issue was limited to the affected client applications, which required an upgrade, while the protocol itself and third-party implementations were not affected. According to the disclosure, all critical issues were fixed, with the remaining ones being either non-exploitable in practice or already covered by warnings in the client interface.[43]
2022-present
[edit]In February 2023, the Matrix foundation was invited to the Digital Markets Act stakeholder workshop on "Interoperability between messaging services" and showcased how a standardised open protocol can be used to interoperate without sacrificing privacy.[44]
In June 2023, Beeper became the first member of The Matrix Foundation.[45]
In April 2024, the first elections of the Matrix Foundation's Governing Board were held, which is made up of nine different constituency groups across three categories: nonprofit and community representatives, funder representatives, and foundation representatives.
Protocol
[edit]
Matrix targets use cases like voice over IP, Internet of things and instant messaging, including group communication, along with a longer-term goal to be a generic messaging and data synchronization system for the web. The protocol supports security and replication, maintaining full conversation history, with no single points of control or failure. Existing communication services can integrate with the Matrix ecosystem.[3]
Client software is available for open-federated Instant Messaging (IM), voice over IP (VoIP) and Internet of Things (IoT) communication.
The Matrix standard specifies RESTful HTTP APIs for securely transmitting and replicating JSON data between Matrix-capable clients, servers and services. Clients send data by PUTing it to a ‘room’ on their server, which then replicates the data over all the Matrix servers participating in this ‘room’. This data is signed using a git-style signature to mitigate tampering, and the federated traffic is encrypted with HTTPS and signed with each server's private key to avoid spoofing. Replication follows eventual consistency semantics, allowing servers to function even if offline or after data-loss by re-synchronizing missing history from other participating servers.
Olm encryption
[edit]The Olm library provides for optional end-to-end encryption on a room-by-room basis via a Double Ratchet Algorithm implementation.[1] It can ensure that conversation data at rest is only readable by the room participants. With it configured, data transmitted over Matrix is only visible as ciphertext to the Matrix servers, and can be decrypted only by authorized participants in the room. The encryption protocol is called Olm; Megolm is an expansion of Olm to better suit the need for bigger rooms. There are two main implementations:
- vodozemac, the current reference implementation, written in Rust. In 2022, it has been audited by Least Authority, whose findings are publicly available[46] and have been addressed by the Matrix team.[47] The review was partially funded by Germany's national agency for the healthcare system digitalisation (Gematik).
- libolm, the former reference implementation, has been subject of a cryptographic review by NCC Group, whose findings are publicly available,[48] and have been addressed by the Matrix team.[49] The review was sponsored by the Open Technology Fund.
Outbound group session keys are needed for initiating new Megolm sessions for group chats. In addition, cross-signing-keys are used to verify the overall identity of the user and their device(s). When enabling a secure backup, all those keys are encrypted using a strong passphrase or a randomly generated recovery key. This ensures that even a person who has access to the backup of the keys could not decrypt messages, guaranteeing full E2EE.
Under MSC2883 Matrix plans implementation of MLS for group chats encryption.[50]
Bridges
[edit]Matrix supports bridging messages from different chat applications into Matrix rooms. These bridges are programs that run on the server and communicate with the non-Matrix servers. Bridges can either be acting as puppets or relays, where in the former the individual user's account is visibly posting the messages, and in the latter a bot posts the messages for non-puppeteered user accounts.
Currently there are official bridges for:
Bridges for the following notable applications are maintained by the community:
Also chat of some games such as Luanti can be bridged to a Matrix room using a mod.
Adoption
[edit]Communication among the public agents of France's central administration happens on a Matrix-based internal network, named Tchap.[62] The project is developed by the Interministerial Directorate for Digital Affairs (DINUM) with the explicit goals of security and digital sovereignty, both of which were deemed to be impossible through WhatsApp, Telegram and Slack.[63]
Germany's national healthcare system's internal communication network uses a Matrix-based [64] system (Ti-Messenger) for real-time communication among Germany's healthcare organizations and sharing of sensitive patient data, and is developed by the national agency for the digitalisation of the healthcare system (Gematik GmbH).[65] Reasons for choosing Matrix included federated identity management, which allows to reuse the existing identity infrastructure into the new chat system; the decentralized architecture, which allows cross-linking data from disparate sources; and the open protocol, which ensures interoperability and future-proof data exchange and prevents vendor lock-in.[66]
Employees of the Bundeswehr (Germany's armed forces) communicate with each other, and share classified documents (German VS-NfD), on a private Matrix network, with a customized version of the Matrix Element app: BwMessenger (as mentioned above).[67][68]
Two states of Germany run their own Matrix chat networks for schools. Rhineland-Palatinate is offering SchulchatRLP as a fork of FluffyChat since the beginning of 2024.[69] The server is sized for half a million pupils and deployed on kubernetes and the client was enhanced with features such as read receipt for parents or polls by fairkom.,[70] who became a silver partner of the Matrix foundation in 2023. Bavaria has adapted the Element client as a proprietary ByCS messenger.[71]
Luxembourg has developed a Matrix-based chat service for government officials, named Luxchat4Gov, planned to be released in the second quartal of 2023.[72]
The Swedish Social Insurance Agency (Försäkringskassan) is using Matrix for internal communications.[73]
Rocket.Chat recommends federation between RocketChat servers with its built-in Matrix bridge since version 4.7.0.[74]
FOSDEM uses Matrix since 2021.[75][76][77] The hosting is provided by Element Matrix Services, which publishes the technical details for public review soon after the event.[78][79]
Polish Armed Forces introduced a Matrix protocol based communicator in 2023, to exchange unclassified information among Polish Army soldiers as well as for Ministry of National Defence employees.[80]
Reception
[edit]Johannes Findeisen has detailed opinion criticization of the protocol for architectural decisions that leads high latency, inefficiency, resource intensive clients and servers.[81]
See also
[edit]References
[edit]- ^ a b Ermoshina, Ksenia; Musiani, Francesca; Halpin, Harry (September 2016). "End-to-End Encrypted Messaging Protocols: An Overview". In Bagnoli, Franco; et al. (eds.). Internet Science. INSCI 2016. Lecture Notes in Computer Science. Vol. 9934. Florence, Italy: Springer. pp. 244–254. doi:10.1007/978-3-319-45982-0_22. ISBN 978-3-319-45982-0.
- ^ "What Is the Matrix Protocol and How Does It Work?". MUO. 27 October 2021. Retrieved 24 July 2023.
- ^ a b Nathan Willis (11 February 2015). "Matrix: a new specification for federated realtime chat". LWN.net. Retrieved 28 June 2015.
- ^ Adrian Bridgwater (9 September 2014). "Matrix.org Reloads Inside "Illusion of Control" Vortex". Dr. Dobb's Journal. Retrieved 20 July 2015.
- ^ "Unified Communications". amdocs. Archived from the original on 3 October 2014. Retrieved 4 November 2018.
- ^ "Who is Matrix.org?". matrix.org. 20 February 2019. Archived from the original on 29 March 2019. Retrieved 20 October 2018.[self-published source]
- ^ "Award Winners of the WebRTC 2014 Conference & Expo". Upperside Blog. 23 December 2014. Archived from the original on 15 March 2015. Retrieved 28 June 2015.
- ^ Phil Edholm (18 May 2015). "WebRTC World Miami Wrap Up and Review". WebRTC. Retrieved 28 June 2015.
- ^ Andrew Prokop (23 February 2015). "Solving the WebRTC Interoperability Problem - Post". No Jitter. Retrieved 28 June 2015.
- ^ Ian Scales (11 May 2015). "To interop or not to interop? Is Matrix.org the answer for silo'd comms services?". TelecomTV. Retrieved 22 June 2015.
- ^ Matt Weinberger (16 September 2014). "Matrix wants to smash the walled gardens of messaging". ITworld. Retrieved 20 July 2015.[permanent dead link]
- ^ "Linkedin entry for Vector Creations Limited". Retrieved 22 October 2018.[self-published source]
- ^ "Free company information from Companies House (UK Government)". Companies House. Retrieved 30 July 2018.
- ^ "New Vector - We believe the future will be open and decentralized". New Vector. Retrieved 20 October 2018.[self-published source]
- ^ "A Call to Arms: Supporting Matrix!". matrix.org. 7 July 2017. Retrieved 20 October 2018.[self-published source]
- ^ "Hello world! | Matrix.org on Patreon". Patreon. Retrieved 4 November 2018.[self-published source]
- ^ Matrixdotorg (21 July 2017), Matrix Live - Episode 1: July 14th 2017, retrieved 22 October 2018[self-published source]
- ^ "This Week in Matrix". matrix.org. Retrieved 26 July 2023.[self-published source]
- ^ "Element Secure instant messenger | Riot.im download | End-to-end messages encryption and open network". Element. Archived from the original on 27 October 2020. Retrieved 1 November 2020.
- ^ "Awesome hosting for Matrix". www.modular.im. Retrieved 20 October 2018.[self-published source]
- ^ Armasu, Lucian (6 June 2018). "Purism's Privacy-Focused Librem 5 Smartphone's On Track For A Jan '19 Release". Tom's Hardware. Retrieved 4 November 2018.
- ^ "Librem 5 – A Security and Privacy Focused Phone". shop.puri.sm. Retrieved 4 November 2018.[self-published source]
- ^ https://blogs.kde.org/2017/09/05/konversation-2x-2018-new-user-interface-matrix-support-mobile-version[self-published source]
- ^ Rogers, Stewart (29 January 2018). "Status invests $5 million in Matrix to create a blockchain messaging superpower". VentureBeat. Retrieved 20 October 2018.
- ^ "Status Invests $5M In Riot.im". Status Blog. 29 January 2018. Archived from the original on 30 January 2018. Retrieved 20 October 2018.[self-published source]
- ^ Rosemain, Mathieu. "France builds WhatsApp rival due to surveillance risk". U.S. Retrieved 4 November 2018.
- ^ Kaminsky, Jean (22 April 2018). "L'Etat lance un "Telegram" à la française cet été, ouvert à tous". Solutions Numériques (in French). Retrieved 28 December 2019.
Après 3 mois de développement pour un coût très limité [...]
- ^ Cimpanu, Catalin. "French government releases in-house IM app to replace WhatsApp and Telegram use". ZDNet. Retrieved 28 December 2019.
- ^ "THE MATRIX.ORG FOUNDATION – Overview (free company information from Companies House)". Companies House. Retrieved 4 November 2018.
- ^ "Introducing the Matrix.org Foundation (Part 1 of 2)". matrix.org. 29 October 2018. Retrieved 4 November 2018.[self-published source]
- ^ Michael Larabel (20 February 2019). "KDE To Support Matrix Decentralized Instant Messaging". Phoronix. Retrieved 20 February 2019.
- ^ "We have discovered and addressed a security breach". Matrix.org. Retrieved 12 April 2019.[self-published source]
- ^ "Introducing Matrix 1.0 and the Matrix.org Foundation". Matrix blog.
- ^ Johnson, Neil (11 June 2019). "Synapse 1.0.0 released". Matrix (blog).
- ^ "New Vector scores $8.5M to plug more users into its open, decentralized messaging Matrix". TechCrunch. 10 October 2019. Archived from the original on 10 October 2019. Retrieved 18 December 2019.
- ^ Krempl, Stefan (24 December 2019). "Open Source: Bundeswehr baut eigene verschlüsselte Messenger-App". heise online (in German). Archived from the original on 2 May 2023. Retrieved 28 December 2019.
- ^ "Synchronous Messaging at Mozilla: The Decision". Mozilla. 19 December 2019. Archived from the original on 19 December 2019.
- ^ Hodgson, Matthew (3 March 2020). "Moznet IRC is dead; long live Mozilla Matrix!". Matrix blog. Retrieved 31 October 2020.
- ^ Hodgson, Matthew (6 May 2020). "Cross-signing and End-to-end Encryption by Default is HERE!!!". Matrix blog.
- ^ "Gitter is joining Element". Element Blog. 30 September 2020. Retrieved 1 November 2020.
- ^ "Welcoming Gitter to Matrix!". Matrix blog. Retrieved 1 November 2020.
- ^ FOSDEM 2021: Building massive virtual communities in Matrix on YouTube
- ^ Hodgson, Matthew; Kasak, Denis (28 September 2022). "Upgrade now to address E2EE vulnerabilities in matrix-js-sdk, matrix-ios-sdk and matrix-android-sdk2". Matrix (blog). Archived from the original on 28 September 2022.
- ^ "The DMA Stakeholder Workshop: Interoperability between messaging services". matrix.org. Retrieved 2 June 2024.
- ^ "Beeper joins the foundation".
- ^ "Archived copy" (PDF). leastauthority.com. Archived from the original (PDF) on 16 May 2022. Retrieved 22 May 2022.
{{cite web}}: CS1 maint: archived copy as title (link) - ^ "Independent public audit of Vodozemac, a native Rust reference implementation of Matrix end-to-end encryption". Matrix blog.
- ^ Alex Balducci; Jake Meredith (18 November 2016). "Matrix Olm Cryptographic Review". www.nccgroup.trust. Archived from the original on 20 October 2018. Retrieved 20 October 2018.
- ^ "Matrix's 'Olm' End-to-end Encryption security assessment released – and implemented cross-platform on Riot at last!". matrix.org. 21 November 2016. Retrieved 20 October 2018.[self-published source]
- ^ "Are We MLS Yet?". Are We MLS Yet?. Retrieved 23 September 2024.
- ^ "matrix-org/matrix-appservice-gitter". GitHub. 27 September 2018. Retrieved 20 October 2018.[self-published source]
- ^ "matrix-org/matrix-appservice-irc". GitHub. Retrieved 20 October 2018.[self-published source]
- ^ "matrix-org/matrix-appservice-slack". GitHub. Retrieved 20 October 2018.[self-published source]
- ^ GitHub - matrix-org/matrix-appservice-purple: General purpose bridging using libpurple ., matrix.org, 29 December 2018, retrieved 31 December 2018[self-published source]
- ^ "Half-Shot/matrix-appservice-discord". GitHub. Retrieved 20 October 2018.[self-published source]
- ^ "mautrix/meta". GitHub. Retrieved 21 January 2025.[self-published source]
- ^ A Matrix-Signal puppeting bridge, Tulir Asokan, 6 February 2021, retrieved 6 February 2021[self-published source]
- ^ skype-bridge, matrix.org, 16 May 2020, retrieved 16 May 2020[self-published source]
- ^ "tulir/mautrix-telegram". GitHub. Retrieved 20 October 2018.[self-published source]
- ^ "tulir/mautrix-whatsapp". GitHub. Retrieved 20 October 2018.[self-published source]
- ^ "beeper/linkedin". GitHub. Retrieved 9 May 2024.[self-published source]
- ^ "French government launches in-house developed messaging". European Commission.
- ^ "Open Source Software powering the newly developed internal messaging service of the French government". European Commission. 18 October 2019.
- ^ "TI-Messenger | gematik". www.gematik.de.
- ^ "Germany's national healthcare system adopts Matrix!". Matrix blog.
- ^ "German health professionals will communicate with each other through the open source Matrix protocol". 6 August 2021.
- ^ Pratty, Freya (29 November 2020). "Europe's armies look for digital sovereignty in new messaging tech". Sifted. Archived from the original on 30 November 2020.
- ^ "German armed forces testing open source chat". 16 January 2020.
- ^ "Statt WhatsApp: Rheinland-Pfalz testet Messenger für Schulen". www.golem.de. Retrieved 2 June 2024.
- ^ "SchulchatRLP unterstützt im Schulalltag". www.fairkom.eu. Retrieved 2 June 2024.
- ^ "BayernCloud Schule Messenger Übersicht". www.bycs.de. Retrieved 2 June 2024.
- ^ "Luxembourg launches open source chat for officials and citizens". 16 February 2023.
- ^ "dSam and eSam endorse Matrix for secure and federated communications in the Swedish public sector". December 2022.
- ^ "Rocket.Chat Leverages The Matrix Protocol for Decentralized and Interoperable Communications". www.rocket.chat. Retrieved 2 June 2024.
- ^ "Troubleshooting Matrix at FOSDEM 2021".
- ^ "FOSDEM 2022's communication infrastructure was provided by Element Matrix Services". Element Blog. 14 February 2022. Retrieved 25 January 2023.
- ^ "Troubleshooting Matrix at FOSDEM 2022".
- ^ "How we hosted FOSDEM 2021 on Matrix".
- ^ "Hosting FOSDEM 2022 on Matrix".
- ^ "Nowy komunikator wojskowy DSI Merkury 2.0". milmag.pl. 15 April 2023.
- ^ hanez (21 November 2024). "Why Matrix Sucks". Johannes Findeisen - hanez.org. Retrieved 18 September 2025.
External links
[edit]
Matrix room ID (P11478) (see uses)
Matrix (protocol)
View on GrokipediaHistory
Origins and Foundation (2014–2018)
The Matrix protocol originated in 2014, initiated by Matthew Hodgson and Amandine Le Pape, who were then employed by Amdocs, a telecommunications software company.[7] The founders sought to overcome the silos inherent in proprietary, centralized messaging platforms—such as data lock-in and poor cross-service interoperability—by developing an open standard for real-time communication that enabled federation across independent servers, drawing inspiration from the decentralized models of email and XMPP.[6] Amdocs provided primary funding and resources for core development from 2014 through October 2017, allowing the team to prioritize an open protocol over proprietary solutions during the company's unified communications efforts.[6] Early technical milestones included the release of the reference homeserver implementation, Synapse, and the initial web client, Riot (later rebranded as Element), in 2015.[7] These components demonstrated the protocol's federation capabilities, permitting servers to interconnect and exchange messages seamlessly, much like SMTP for email, while supporting features like persistent chat rooms and user portability across networks. The focus remained on establishing a resilient, extensible architecture to unify fragmented IP-based communications without reliance on single vendors.[6] By 2018, following the end of Amdocs funding and the formation of New Vector as an independent entity in 2017 to sustain development, the Matrix.org Foundation was established on October 29 as a UK-based non-profit Community Interest Company.[8] This shift aimed to ensure neutral stewardship of the open standard, preventing corporate influence from fragmenting the ecosystem and promoting community-driven governance for long-term viability.[8]Expansion and Challenges (2019–2022)
In June 2019, the Matrix.org Foundation released version 1.0 of the Matrix specification, marking the protocol's exit from beta and establishing stable APIs for client-server and server-server interactions, which facilitated reliable federation across independent homeservers and standardized end-to-end encryption using the Olm and Megolm libraries.[9] This milestone supported broader interoperability by defining consistent event formats and room structures, enabling developers to build compliant clients and servers without breaking changes. In May 2020, end-to-end encryption became enabled by default for new private rooms, enhancing privacy amid growing adoption. The primary reference client, previously known as Riot, underwent a rebranding to Element in July 2020, unifying the client, company (New Vector), and hosting services under a single identity to streamline development and marketing for decentralized secure messaging.[10] Concurrently, the Hydrogen project emerged as a lightweight, web-based Matrix client optimized for performance in resource-constrained environments, including legacy and mobile browsers, with support for core features like spaces and one-to-one VoIP.[11] These advancements, bolstered by $8.5 million in funding announced in October 2019, accelerated feature maturation and ecosystem expansion, including improved user interfaces and integration capabilities.[12] Rapid growth exposed federation scalability limitations in the dominant Synapse homeserver implementation during 2021–2022, as increased message volumes and room complexities strained state resolution and event processing, leading to elevated CPU and memory demands on public-facing servers.[13] Notable pressures arose from large-scale deployments, such as France's Tchap secure messaging platform for civil servants, which tested private federation limits with hundreds of thousands of users and highlighted inefficiencies in handling cross-server traffic without optimized caching.[14] Responses included Synapse updates stabilizing memory usage to around 2 GB per 10,000 users via improved caching and worker processes, alongside ongoing refinements to mitigate bottlenecks in bridged and high-traffic rooms.[13] By late 2022, the visible Matrix user base had roughly doubled year-over-year, underscoring the need for these mitigations amid sustained expansion.[15]Maturation and Institutional Adoption (2023–present)
In September 2025, the Matrix specification reached version 1.16, introducing extensible user profiles for enhanced customization and room version 12 developed under Project Hydra to refine state resolution algorithms and mitigate federation inconsistencies.[16][17] This off-cycle release addressed critical flaws in prior versions by granting room creators elevated power levels and overhauling state event handling, enabling more robust decentralized room management without disrupting existing federated networks.[18] High-severity vulnerabilities in room versions up to 11, including deficiencies in state resolution that could enable unauthorized control of chat rooms (e.g., CVE-2025-49090), prompted a coordinated patch rollout on August 11, 2025, with server implementations updated under embargo to curb potential exploitation prior to public disclosure.[19][20] The fixes, integrated into the 1.16 spec released shortly after on September 17, required administrators to upgrade at-risk rooms to version 12, emphasizing Matrix's iterative approach to protocol hardening amid growing deployment scales.[18][21] The Matrix Conference in October 2025 underscored institutional momentum, convening over 300 participants from more than 20 countries, including representatives from over 10 governments primarily in the EU, to discuss sovereign communication infrastructures leveraging Matrix for data autonomy and interoperability.[22][23] Adoption by public sector entities has accelerated for secure, federated messaging, with examples including Germany's health messenger solutions and broader European initiatives prioritizing vendor-independent protocols over proprietary alternatives.[24][25] Concurrently, the Element X client advanced toward mainstream viability through migrations to the Matrix Authentication Service (MAS) completed on matrix.org in April 2025, enabling features like QR-code login and improved performance via native sliding sync support, facilitating smoother onboarding in enterprise and governmental environments.[26][27]Technical Architecture
Core Data Model and Federation
Rooms in the Matrix protocol function as stateful, event-driven containers that organize messages, user memberships, and metadata into persistent communication spaces. Each room persists a history of events, where events represent discrete actions such as message transmissions or state updates, uniquely identified by event IDs and timestamps to maintain chronological ordering within the room's scope.[28] The event structure forms a directed acyclic graph (DAG), establishing a partial ordering that reflects causal dependencies among events rather than a strictly linear timeline, allowing for distributed generation and resolution of events across servers.[28] Room versions—immutable sets of algorithms defining event validation, state resolution, and conflict handling—ensure causal consistency by prioritizing verifiable event chains over temporal discrepancies, with version 12 serving as the current default as of specification version 1.16.[28] Federation occurs via the server-server API, enabling homeservers to directly peer and synchronize room events over HTTPS without a central authority, akin to email's decentralized exchange but augmented by real-time push for low-latency updates.[29] Homeservers propagate persistent data units (PDUs)—signed, durable events like room state changes or messages—to all participants in a room, while ephemeral data units (EDUs) handle transient notifications such as presence or receipts, batched into transactions limited to 50 PDUs and 100 EDUs per exchange for efficiency.[29] This API-driven peering replicates room states and event histories across interconnected homeservers, fostering a resilient, distributed network where data persistence relies on mutual synchronization rather than hierarchical control.[29]APIs and Event Handling
The Matrix Client-Server API defines RESTful HTTP endpoints over HTTPS, employing JSON for request and response payloads to enable client interactions with homeservers for authentication, room synchronization, event transmission, and historical retrieval.[30] Authentication occurs via POST /_matrix/client/v3/login, yielding an access_token for authorizing subsequent API calls, while registration uses POST /_matrix/client/v3/register.[31] [32] Synchronization of room events and state, which propagate changes across the distributed network, relies on long-polling or streaming via GET /_matrix/client/v3/sync; this endpoint delivers incremental updates to the room timeline, state events, and membership lists, ensuring clients reflect the latest federated consensus without polling each room individually.[33] Event issuance drives all state mutations and content dissemination, with clients submitting via PUT /_matrix/client/v3/rooms/{roomId}/send/{eventType}/{txnId}, where txnId ensures idempotency against duplicates.[34] Core event types include m.room.message for textual, emote, or media payloads (specifying msgtype such as "m.text" or "m.image"); m.room.member for membership transitions like "join", "leave", or "invite", carrying content with membership status and displayname; and m.room.power_levels as a state event dictating granular permissions, such as requiring level 50 for state modifications or 100 for administrative actions.[30] [35] Pagination of event history employs GET /_matrix/client/v3/rooms/{roomId}/messages, parameterized by from (a token from prior sync), dir ("b" for backwards), and limit, enabling efficient lazy-loading of timelines while respecting server-side filtering for access controls.[36] Specialized event handling supports content moderation and discovery: m.room.redaction events target existing events by ID (via the redacts field), purging sensitive content from display while retaining structural metadata to preserve event graph integrity and federation replayability, with authorization typically requiring elevated power levels.[37] Room aliases, governed by m.room.aliases state events, map human-readable identifiers (e.g., #room:example.com) to room IDs, allowing resolution via federation without exposing internal IDs, subject to state event authorization rules.[38] Protocol evolution occurs through room upgrades, initiated by admins via POST /_matrix/client/v3/rooms/{roomId}/upgrade/{newVersion}, which atomically creates a versioned successor room—transferring state, history references, and aliases—while rendering the original read-only, thus enabling schema refinements without disrupting ongoing federation.[39][40]Security and Encryption
End-to-End Encryption Mechanisms
Matrix's end-to-end encryption relies on the Olm library for one-to-one communications and the Megolm library for group rooms, both implementing ratcheting mechanisms to secure messages in transit and at rest on client devices.[5][41] Olm employs the Double Ratchet algorithm, using Curve25519 for ephemeral and long-term key exchanges to establish shared secrets, AES-256 in CBC mode with PKCS#7 padding for symmetric encryption, and HMAC-SHA-256 (truncated to 64 bits in version 1) for message authentication.[42][43] This setup provides forward secrecy by advancing the ratchet with one-time keys, ensuring that compromised long-term keys do not expose prior session material, though it requires explicit device verification to mitigate man-in-the-middle risks.[44] For group communications, Megolm uses a symmetric ratchet where a single outbound session key is derived for encrypting messages, which is then securely distributed to recipients via inbound Olm sessions.[45][5] The ratchet advances unidirectionally to generate unique message keys per event, supporting forward secrecy by discarding prior keys, but it lacks post-compromise security and relies on periodic key refreshes to limit exposure windows in large groups.[45][46] Megolm derives an AES-256 encryption key and an HMAC-SHA-256 authentication key from the ratchet state using HKDF, enabling efficient broadcasting without per-recipient re-encryption, though this trades some security properties for scalability.[5] Device and key verification occurs through Short Authentication Strings (SAS), often presented as emoji sets or numeric codes derived from hashed public keys, allowing users to compare and confirm session integrity out-of-band.[47] Cross-signing identities, introduced in Matrix Specification version 1.1 around 2020, extend this to multi-device scenarios via a hierarchy of Ed25519 keys: a master key signs self-signing keys (for device trust) and user-signing keys (for signing other users' identities), enabling transitive verification across devices without repeated manual checks.[48][49] These mechanisms bootstrap trust but depend on users securely managing recovery passphrases or hardware keys to prevent identity compromise.[50]Known Vulnerabilities and Mitigations
In September 2022, researchers identified multiple cryptographic flaws in Matrix's Olm and Megolm libraries underpinning end-to-end encryption, enabling practical attacks such as recovering session keys from unverified devices and forging cross-signing identities to impersonate users during verification flows like emoji-based SAS (Short Authentication String).[51][52] These vulnerabilities arose from inadequate protection against server-influenced key claims and malleable session ratcheting, allowing a compromised homeserver or attacker with device access to decrypt past messages or inject payloads without detection.[53] The Matrix team issued emergency updates to matrix-js-sdk, matrix-react-sdk, and related clients on September 28, 2022, incorporating hardened key verification logic, mandatory cross-signature checks, and user prompts for device consent, though full mitigation depended on client adoption and user vigilance in verifying sessions.[51] In July 2025, the Matrix Foundation disclosed two high-severity federation protocol vulnerabilities (CVE-2025-49090 and a pending CVE), exploitable via state resolution ambiguities that allowed remote servers to overwrite room state events, enabling unauthorized actions like permission escalations, user evictions, or content injection in shared rooms.[54][55] The root causes traced to non-deterministic event precedence in federated syncs, where malicious servers could "reset" state by replaying or prioritizing forged events during partial outages or high-load scenarios.[18] Responses included a coordinated embargo with major homeserver vendors, culminating in specification-breaking fixes via MSC4289 on August 11, 2025, which enforces explicit privileges for room creators in state resolution and adds server-side safeguards against retroactive manipulations; operators were urged to deploy patched Synapse, Dendrite, and Conduit versions immediately.[20] Federation in Matrix exposes persistent man-in-the-middle risks during initial trust establishment, as clients rely on homeservers for unverified key exchanges and device consents under a trust-on-first-use model, potentially allowing intercepted or forged events from malicious remote peers before encryption activates.[56] Server-side signature validation and federation sender whitelisting provide partial mitigations, but these falter against sophisticated adversaries controlling intermediate servers, as evidenced by historical analyses of unauthenticated event injection in group sessions.[53] Ongoing proposals, such as enhanced authentication in server-server APIs, aim to reduce exposure through stricter origin checks, yet the protocol's decentralized ethos precludes absolute safeguards without compromising interoperability.[57]Features and Capabilities
Communication Primitives
Matrix employs room events as the foundational primitives for real-time communication, enabling extensible schemas that accommodate text messaging, file sharing, reactions, and threaded replies within decentralized rooms. Them.room.message event type supports core messaging via JSON content fields, including msgtype variants such as m.text for plaintext bodies and m.file for attachments with associated URLs and filenames, allowing clients to fetch media from designated storage endpoints.[28] These events propagate through federated servers via the server-server API, ensuring consistent real-time delivery across participants without central coordination.[28]
Reactions are facilitated by the m.reaction event, which references a target event using m.relates_to with rel_type set to m.annotation and includes the reaction key (e.g., an emoji), providing lightweight, non-intrusive feedback that integrates into event timelines.[58] Threaded replies build on this relational model by embedding m.relates_to with m.in_reply_to and the referenced event_id directly in m.room.[message](/page/Message) events, permitting nested conversations that maintain chronological integrity while supporting real-time updates and pagination for clients.[58] The extensible nature of event schemas—defined as flexible JSON objects—allows custom extensions for specialized primitives, such as location sharing or polls, while preserving backward compatibility across room versions.[28]
Voice and video calling leverage WebRTC for peer-to-peer media transport, with all signaling conducted over Matrix room events to enable decentralized negotiation, including m.call.invite, m.call.answer, and m.call.candidate for ICE handling and session description protocol exchanges.[30] This approach supports trickle-ICE for progressive candidate discovery, reducing setup latency in federated environments.[59]
Beyond human-centric interactions, Matrix's event model extends to IoT use cases, fulfilling early specification goals of synchronizing arbitrary state data among devices, services, and users through room-based messaging and persistent event histories.[2] Devices can publish state events (e.g., m.room.member analogs for presence) or custom types for sensor data, enabling real-time syncing without proprietary middleware.[2]