Matrix: Decentralized, Anonymous, and Secure Instant Messaging

沉默的广场
·
·
IPFS
·

Matrix is ​​an end-to-end encrypted and decentralized instant messaging protocol. The Matrix protocol targets Telegram and Discord, which are also instant messaging software. Compared with the two, the Matrix service can be registered without an email address or a mobile phone number, which is very suitable for anonymous community communication and avoids the worry of personal information leakage. This article introduces the Matrix protocol and its official client Element (formerly known as Riot.im).

Element desktop and mobile client screenshots

Compared with mainstream instant messaging software, Matrix has many advantages, including:

  1. Privacy : Registering a Matrix account does not require an email address or a mobile phone number, only a username and password. There is no need to worry about the risk of mobile phone number and email leakage when using Matrix.
  2. Secure encryption : Matrix private chats and group chats are end-to-end encrypted, and all chat content is encrypted for storage and transmission. Even the owner of the Matrix server cannot see the user's chat content.
  3. Open source : Matrix's official client and server software are all open source, and anyone can review the code and check for loopholes in the code. Those who are interested can also use open source code to build their own Matrix server.
  4. Decentralization : Matrix is ​​a federated protocol. The Matrix network consists of servers distributed around the world and operated by different individuals and organizations. Therefore, the Matrix protocol is not easy to be monopolized by a single organization.
The Matrix network is a federated structure, connected by multiple servers with equal status

"Federal protocol" sounds difficult to understand, in fact, e-mail is one of the most widely used federated protocol. Each e-mail server is equal in status . When sending and receiving e-mail, as long as you specify an e-mail server and users on the server, you can communicate. For example, the email address example@gmail.com contains both the user name and the server name, example is the user name, and gmail.com is the server name.

In chat software such as Telegram and WeChat, you need to specify a mobile phone number or username to add a friend. Matrix, on the other hand, is very much like email, with account names consisting of usernames and server names. A matrix account ID is as follows:

 example@matrix.org

Here example is the username and matrix.org is the server name. Adding a friend in Matrix is ​​the same as sending and receiving emails, you need to fill in the complete MatrixID@server name. Here is example@matrix.org .

Using Matrix Safely

1. Select a server

There are many service providers for email, such as Gmail, Hotmail, ProtonMail. Matrix, as a similar federated protocol, naturally has many servers to choose from. There is a list of servers available on the Matrix website to choose to sign up for:

https://www.hello-matrix.net/public_servers.php

However, this article recommends using Matrix's official server matrix.org, which has guaranteed security and stability, and is the easiest to configure.

2. Web client + Tor

The official client of the Matrix protocol is called Element (formerly known as Riot.im). Element has desktop and mobile clients , providing an experience similar to chat tools such as Telegram and Discord, but it is recommended to use the web version ( mobile terminal ) in the Tor browser . And the whole process of account registration and use is completed in the Tor browser using the web version.

Advantages of Tor+ web version:

  1. Hiding IP : It is troublesome to configure the proxy on the lement client. In the Tor browser, there is no need to configure the proxy of the client, and the IP can be hidden throughout the process, which allows Matrix to achieve the invisibility of Tox and TorMessage.
  2. Ease of use : The web version of many chat software will have fewer functions than the client. The functions of the Element web version and the desktop client are completely equivalent, and the interface is exactly the same. Users can switch between the client software and the web version at zero cost.
  3. Concealment : The web version is more concealed than the App. As long as you log in with the incognito mode, others will not be able to detect the existence of the Matrix client.

The Tor+ web version is completely anonymous, registration does not require an email address or a mobile phone, and it can be used by opening a browser. All communications are highly encrypted, and the level of convenience is comparable to forum private messages, which can be used as an encrypted alternative to private messages. It is recommended to use Matrix in this way.

Register and use

Element's download page provides a web version, or you can click the link below to directly enter the registration page. Note that the whole process should be done with the Tor browser.

https://app.element.io/#/register

The first registration is as follows:

Figure 1: First Registration

Select "Free" above to choose to register directly on the matrix.org server (recommended). Select "Premium", you can use the host provided by Matrix's official website to build your own server. Select "Advanced" to use a third-party server.

When registering, you only need to provide your username and password. Email is optional and you don't need to enter it.

Figure 2: Prompt

A reminder will pop up next. If you do not bind your email address, you will not be able to reply if you forget your password. Due to the pursuit of anonymity here, click continue to continue.

If you register with Tor, there will be a Google reCaptcha verification code next, and the registration will be completed after clicking the verification code, as shown in the figure:

Figure 3: Registration completed

If you want to enter the Matrix web version in the future, you can log in directly by visiting app.element.io.

Create a recovery key

Matrix uses end-to-end encryption. Encrypted chat records are (possibly) stored on multiple servers. In order to view historical chat records, a recovery key needs to be created.

The recovery key is not complicated. It is essentially setting two passwords for the account. The login password is used to log in to the Matrix account, and the recovery key is used to view historical messages. When logging in on a new device, the Matrix server will require verification of the second password. Without the second password (recovery key), you can still log in, but you cannot view historical messages.

The recovery key is set as follows:

Click the avatar on the upper left, select [settings], and select [Security & Privacy] on the right, as shown in Figure 4.

Figure 4: Settings

Select the green [Set up] button on the right, and the following page will pop up.

Figure 5: Recovery Key Options

Here select the second item [Enter a Security Phrase].

Next, you need to enter the second password, the password set here is used to restore the chat history. After the setting is complete, a 12-group key with 4 keys in each group will be displayed, as shown in the figure below. It is recommended to back up and keep this key. If you forget the second password above, you can use this keychain to unlock the chat history:

Figure 6: Recovery keychain

If you need to manage these usernames, passwords, and keychains, it is recommended to use a password manager such as KeepassXC .

start chatting

In Matrix, if you know the other party's ID (similar to example@matrix.org format), click the "+" sign (Start Chat) on the left column to start a private chat.

Group chat works similarly. Click the "+" sign (Add Room) below the left column to create or join a group chat. Select explore public rooms, you can use the add group link to join other group chats. The group ID is similar to the following format:

https://matrix.to/#/!xTTMQbujXcFdGQJgAS:matrix.org?via=matrix.org

You can also choose Create new room to build your own group.

Other uses of Matrix are similar to mainstream chat software, so I won't repeat them here.

More Matrix information can be found at :

[1] https://matrixim.cc/sfd2017-matrix.pdf , the introduction slides of Peking University Matrix interest club.

[2] https://matrix.org/docs/develop, Matrix development documentation, which can be used as a development reference for Matrix robots and bridges. It also describes many of the internal details of Matrix.



CC BY-NC-ND 2.0

Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!