Matrix (protocol)
{{Short description|Networking protocol for real-time communication}}
{{distinguish|text=MATRIX, a chat app taken down by law enforcement in December 2024}}
{{self-published|date=February 2019}}
{{Infobox networking protocol
| title = {{#invoke:Wikidata|getValue|Q22906785|FETCH_WIKIDATA}}
| logo = {{#invoke:Wikidata|getValue|P154|FETCH_WIKIDATA}}
| logo alt = [matrix]
| logo size = 220px
| is stack = no
| purpose = Federated messaging and data synchronization
| developer = The Matrix.org Foundation CIC
| date = {{Start date and age|2014|09}}{{Failed verification|date=July 2020|reason=p. 247: 'Matrix.org, released in December 2014'}}
| influenced =
| osilayer = {{#invoke:Wikidata|getValue|P5805|FETCH_WIKIDATA}}
|ports={{#invoke:Wikidata|getRawValue|P1641|FETCH_WIKIDATA}}}}
Matrix (sometimes stylized as [matrix]) is an open standard{{Reference needed|date=April 2025|reason=not every open protocol is a standard: what is the independent body deliberating the evolution of the protocol? this needs to be specified}} and communication protocol for real-time communication.{{Cite web |date=2021-10-27 |title=What Is the Matrix Protocol and How Does It Work? |url=https://www.makeuseof.com/what-is-matrix-protocol-how-does-it-work/ |access-date=2023-07-24 |website=MUO |language=en}} 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. It can integrate with standard web services via WebRTC, facilitating browser-to-browser applications.
History
{{Prose |date=June 2024}}
The initial project was created inside Amdocs, while building a chat tool called "Amdocs Unified Communications", by Matthew Hodgson and Amandine Le Pape. Amdocs then funded most of the development work from 2014 to October 2017. Matrix was the winner of the Innovation award at WebRTC 2014 Conference & Expo,{{cite news|url=http://blog.uppersideconferences.com/award-winners-webrtc-2014-conference-expo/#.VZBLdbIVhBc|title=Award Winners of the WebRTC 2014 Conference & Expo|date=2014-12-23|work=Upperside Blog|access-date=2015-06-28|archive-url=https://web.archive.org/web/20150315032553/http://blog.uppersideconferences.com/award-winners-webrtc-2014-conference-expo/#.VZBLdbIVhBc|archive-date=2015-03-15|url-status=dead}} and of the "Best in Show" award at WebRTC World in 2015. 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. Some were unclear if there was enough demand among users for services which interoperate among providers. In 2015, a subsidiary of Amdocs was created, named "Vector Creations Limited", and the Matrix staff was moved there.
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", which was mainly built to support the development of Matrix and Riot, the second of which was later renamed to Element. During this time period, there were multiple calls for support to the community and companies that build on Matrix, to help pay for the wages of at least part of the core team. Patreon and Liberapay crowdfunding accounts were created, and the core team started a video podcast, called Matrix "Live" to keep the contributors up to speed with ongoing developments. 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. 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{{Cite web|title=Element Secure instant messenger {{!}} Riot.im download {{!}} End-to-end messages encryption and open network|url=https://element.io/previously-riot|access-date=2020-11-01|website=Element}}) to generate income.
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. 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.
In 2017, KDE announced it was working on including support for the protocol in its IRC client Konversation.
In late January 2018, the company received an investment of US$5 million from Status, an Ethereum based startup.
In April 2018, the French Government announced plans to create their own instant messaging tool. Work on the application based on Riot and Matrix protocol—called {{ill|Tchap|fr}} after French scientist Claude Chappe—had started in early 2018,{{Cite web|url=https://www.solutions-numeriques.com/securite/letat-lance-un-telegram-a-la-francaise-cet-ete-ouvert-a-tous/|title=L'Etat lance un "Telegram" à la française cet été, ouvert à tous|last=Kaminsky|first=Jean|date=2018-04-22|website=Solutions Numériques|language=fr-FR|access-date=2019-12-28|quote=Après 3 mois de développement pour un coût très limité [...]}} and the program was open-sourced and released on iOS and Android in April 2019.{{Cite web|url=https://www.zdnet.com/article/french-government-releases-in-house-im-app-to-replace-whatsapp-and-telegram-use/|title=French government releases in-house IM app to replace WhatsApp and Telegram use|last=Cimpanu|first=Catalin|website=ZDNet|language=en|access-date=2019-12-28}}
In October 2018, a Community Interest Company called "The Matrix.org Foundation C.I.C." was incorporated, to serve as a neutral legal entity for further development of the standard.
In February 2019, the KDE community announced plans to adopt Matrix for its internal communications needs, as a decentralized alternative to other instant messaging servers like Telegram, Slack, and Discord, and operate its own server instance.
In April 2019, Matrix.org suffered a security breach in which the production servers were compromised.
This breach was not an issue with the Matrix protocol and did not directly affect homeservers other than matrix.org.
In June 2019, the Matrix protocol left beta phase with the version 1.0 across all APIs (and Synapse, at the time the reference homeserver), and the Matrix foundation was officially launched.{{Cite web|url=https://matrix.org/blog/2019/06/11/introducing-matrix-1-0-and-the-matrix-org-foundation|title=Introducing Matrix 1.0 and the Matrix.org Foundation|website=Matrix blog}}{{Cite web|url=https://matrix.org/blog/2019/06/11/synapse-1-0-0-released/|title = Synapse 1.0.0 released|website=Matrix blog}}
In October 2019, New Vector raised an additional US$8.5 million to develop Matrix.{{Cite web |date=10 October 2019 |title=New Vector scores $8.5M to plug more users into its open, decentralized messaging Matrix |url=https://techcrunch.com/2019/10/10/new-vector-scores-8-5m-to-plug-more-users-into-its-open-decentralized-messaging-matrix/ |archive-url=https://web.archive.org/web/20191010162513/https://techcrunch.com/2019/10/10/new-vector-scores-8-5m-to-plug-more-users-into-its-open-decentralized-messaging-matrix/ |url-status=dead |archive-date=October 10, 2019 |access-date=2019-12-18 |website=TechCrunch |language=en-US}}
In December 2019, German Ministry of Defense announced a pilot project called BwMessenger for secure instant messaging tool based on Matrix protocol, Synapse server and Riot application. This is modeled after French Tchap project. The long-term goal of the Federal Government is the secure use of messenger services that covers all ministries and subordinate authorities.{{Cite web|url=https://www.heise.de/newsticker/meldung/Open-Source-Bundeswehr-baut-eigene-verschluesselte-Messenger-App-4623404.html|title=Open Source: Bundeswehr baut eigene verschlüsselte Messenger-App|last=online|first=heise|website=heise online|date=24 December 2019 |language=de|access-date=2019-12-28}}
In December 2019, Mozilla announced that it would begin to use Matrix as a replacement for IRC. In the announcement, they said that they would be completing the move in late January 2020. The Mozilla IRC server, irc.mozilla.org, is said to be removed "no later than March of next year [2020]".{{Cite web|url=https://discourse.mozilla.org/t/synchronous-messaging-at-mozilla-the-decision/50620|title = Synchronous Messaging at Mozilla: The Decision|date = 19 December 2019}} In March 2020, the IRC server was turned off and users were directed to join chat.mozilla.org, Mozilla's Element instance.{{Cite web|title=Moznet IRC is dead; long live Mozilla Matrix!|url=https://matrix.org/blog/2020/03/03/moznet-irc-is-dead-long-live-mozilla-matrix|access-date=2020-10-31|website=Matrix blog|language=en}}
In May 2020, Matrix enabled end-to-end encryption by default for private conversations.{{Cite web|url=https://matrix.org/blog/2020/05/06/cross-signing-and-end-to-end-encryption-by-default-is-here|title=Cross-signing and End-to-end Encryption by Default is HERE!!!|website=Matrix blog}}
In October 2020, Element acquired Gitter from GitLab.{{Cite web|date=2020-09-30|title=Gitter is joining Element|url=https://element.io/blog/gitter-is-joining-element/|access-date=2020-11-01|website=Element Blog}} This meant that all Gitter users would be transitioned over to Matrix.{{Cite web|title=Welcoming Gitter to Matrix!|url=https://matrix.org/blog/2020/09/30/welcoming-gitter-to-matrix|access-date=2020-11-01|website=Matrix blog|language=en}}
In March 2021, matrix.org announced that there are 28 million global visible accounts.{{cite web |title=FOSDEM 2021: Building massive virtual communities in Matrix |website = YouTube| date=7 February 2021 |url=https://www.youtube.com/watch?v=TzUfS08lMek&t=265s |access-date=31 March 2021 |language=en}}
In September 2022, some security issues were found in the implementation of one client-side encryption library.{{Cite web |url=https://matrix.org/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients|title=Upgrade now to address E2EE vulnerabilities in matrix-js-sdk, matrix-ios-sdk and matrix-android-sdk2|language=en-US}} Due to the interoperable architecture, only the affected client applications needed upgrade and third-party implementations were not affected. All critical issues were fixed, with the remaining ones being either non-exploitable in practice, or already prominently warned for in the client.
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.{{Cite web |title=The DMA Stakeholder Workshop: Interoperability between messaging services |url=https://www.matrix.org/blog/2023/03/15/the-dma-stakeholder-workshop-interoperability-between-messaging-services/ |access-date=2024-06-02 |website=matrix.org}}
In June 2023, Beeper became the first member of The Matrix Foundation.{{cite web | url=https://matrix.org/blog/2023/06/beeper-joins-the-foundation/|title=Beeper joins the foundation}}
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
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.
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 =
The Olm library provides for optional end-to-end encryption on a room-by-room basis via a Double Ratchet Algorithm implementation. 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{{cite web |url=https://leastauthority.com/static/publications/LeastAuthority-Matrix_vodozemac_Final_Audit_Report.pdf |title=Archived copy |website=leastauthority.com |access-date=22 May 2022 |archive-url=https://web.archive.org/web/20220516164237/https://leastauthority.com/static/publications/LeastAuthority-Matrix_vodozemac_Final_Audit_Report.pdf |archive-date=16 May 2022 |url-status=dead}} and have been addressed by the Matrix team.{{cite web | url=https://matrix.org/blog/2022/05/16/independent-public-audit-of-vodozemac-a-native-rust-reference-implementation-of-matrix-end-to-end-encryption | title=Independent public audit of Vodozemac, a native Rust reference implementation of Matrix end-to-end encryption |website=Matrix blog}} The review was partially funded by Germany's national agency for the healthcare system digitalisation ({{ill|Gematik|de}}).
- libolm, the former reference implementation, has been subject of a cryptographic review by NCC Group, whose findings are publicly available, and have been addressed by the Matrix team. 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.{{Cite web |title=Are We MLS Yet? |url=https://arewemlsyet.com |access-date=2024-09-23 |website=Are We MLS Yet? |language=en-US}}
Bridges
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:
{{Div col}}
- Apple iMessage
- Discord
- Facebook Messenger/Instagram
- Google Chat
- GroupMe
- Mastodon
- RSS/Twitter feeds
- Signal
- Skype
- Telegram
- SMS
{{Div col end}}
Adoption
Communication among the public agents of France's central administration happens on a Matrix-based internal network, named {{ill|Tchap|fr}}.{{cite web |url=https://joinup.ec.europa.eu/collection/open-source-observatory-osor/document/french-government-launches-house-developed-messaging-service-tchap|title=French government launches in-house developed messaging|website=European Commission}}
The project is developed by the Interministerial Directorate for Digital Affairs ({{ill|DINUM|fr}}) with the explicit goals of security and digital sovereignty, both of which were deemed to be impossible through WhatsApp, Telegram and Slack.{{cite web |url=https://joinup.ec.europa.eu/collection/open-source-observatory-osor/news/tchap-messaging-service|title=Open Source Software powering the newly developed internal messaging service of the French government.|website=European Commission|date=18 October 2019 }}
Germany's national healthcare system's internal communication network uses a Matrix-based
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 ({{ill|Gematik|de}} GmbH).{{cite web | url=https://matrix.org/blog/2021/07/21/germanys-national-healthcare-system-adopts-matrix | title=Germany's national healthcare system adopts Matrix! |website=Matrix blog}}
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.{{Cite web|url=https://joinup.ec.europa.eu/collection/open-source-observatory-osor/news/german-health-system-adopts-matrix|title=German health professionals will communicate with each other through the open source Matrix protocol|date=6 August 2021 }}
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).{{cite web | url=https://element.io/case-studies/bundeswehr | title=Bundeswehr | BwMessenger | Matrix | Defence case study }}{{cite web | url=https://joinup.ec.europa.eu/collection/open-source-observatory-osor/news/matrix-pilot-bwmessenger | title=German armed forces testing open source chat| date=16 January 2020}}
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.{{Cite web |title=Statt WhatsApp: Rheinland-Pfalz testet Messenger für Schulen |url=https://www.golem.de/news/statt-whatsapp-rheinland-pfalz-testet-messenger-fuer-schulen-2404-184238.html |access-date=2024-06-02 |website=www.golem.de}} 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.,{{Cite web |title=SchulchatRLP unterstützt im Schulalltag |url=https://www.fairkom.eu/schulchat-rlp-unterstuetzt-im-schulalltag |access-date=2024-06-02 |website=www.fairkom.eu}} who became a silver partner of the Matrix foundation in 2023. Bavaria has adapted the Element client as a proprietary ByCS messenger.{{Cite web |title=BayernCloud Schule Messenger Übersicht |url=https://www.bycs.de/uebersicht-und-funktionen/messenger/index.html |access-date=2024-06-02 |website=www.bycs.de}}
Luxembourg has developed a Matrix-based chat service for government officials, named Luxchat4Gov, planned to be released in the second quartal of 2023.{{Cite web|url=https://joinup.ec.europa.eu/collection/open-source-observatory-osor/news/luxembourg-launches-open-source-chat-officials-and-citizens|title=Luxembourg launches open source chat for officials and citizens|date=16 February 2023 }}
The Swedish Social Insurance Agency (Försäkringskassan) is using Matrix for internal communications.{{cite web | url=https://element.io/blog/dsam-och-esam-forordar-matrix-for-saker-och-federerad-kommunikation-inom-sveriges-offentliga-sektor/|title=dSam and eSam endorse Matrix for secure and federated communications in the Swedish public sector|date=December 2022 }}
RocketChat recommends federation between RocketChat servers with its built-in Matrix bridge since version 4.7.0.{{cite web | url=https://www.rocket.chat/press-releases/rocket-chat-leverages-matrix-protocol-for-decentralized-and-interoperable-communications| title=Rocket.Chat Leverages The Matrix Protocol for Decentralized and Interoperable Communications | access-date=2024-06-02 |website=www.rocket.chat}}
FOSDEM uses Matrix since 2021.{{Cite web|url=https://archive.fosdem.org/2021/practical/matrix_troubleshooting/|title=Troubleshooting Matrix at FOSDEM 2021}}{{Cite web |date=2022-02-14 |title=FOSDEM 2022's communication infrastructure was provided by Element Matrix Services |url=https://element.io/blog/fosdem-2022s-communication-infrastructure-was-provided-by-element-matrix-services/ |access-date=2023-01-25 |website=Element Blog}}{{Cite web|url=https://archive.fosdem.org/2022/practical/matrix_troubleshooting/|title=Troubleshooting Matrix at FOSDEM 2022}}
The hosting is provided by Element Matrix Services, which publishes the technical details for public review soon after the event.{{Cite web|url=https://matrix.org/blog/2021/02/15/how-we-hosted-fosdem-2021-on-matrix|title=How we hosted FOSDEM 2021 on Matrix}}{{Cite web|url=https://matrix.org/blog/2022/02/07/hosting-fosdem-2022-on-matrix|title=Hosting FOSDEM 2022 on Matrix}}
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.{{Cite web|url=https://milmag.pl/nowy-komunikator-wojskowy-dsi-merkury-2-0/|title=Nowy komunikator wojskowy DSI Merkury 2.0|website=milmag.pl}}
See also
References
{{reflist|refs=
{{cite news | url=https://lwn.net/Articles/632572/ | title=Matrix: a new specification for federated realtime chat | author=Nathan Willis | work=LWN.net | date=2015-02-11 | access-date=2015-06-28 }}
{{cite news | url=http://www.drdobbs.com/tools/240169004 | author=Adrian Bridgwater | title=Matrix.org Reloads Inside "Illusion of Control" Vortex | work=Dr. Dobb's Journal | date=2014-09-09 | access-date=2015-07-20 }}
{{cite news | url=https://beta.companieshouse.gov.uk/company/10873661 | title=Free company information from Companies House (UK Government) | access-date=2018-07-30 |website=Companies House}}
{{Cite web|url=https://beta.companieshouse.gov.uk/company/11648710|title=THE MATRIX.ORG FOUNDATION – Overview (free company information from Companies House)|website=Companies House|access-date=2018-11-04}}
}}
External links
{{Wikidata property | P11478 }}
- {{Official website}}
{{Instant messaging}}
{{telecommunications}}
{{Computer-mediated communication}}
Category:Application layer protocols
Category:End-to-end encryption