r/matrixdotorg • • Aug 30 '22

Is matrix really good?

They say your message un públic chatrooms are not encrypted and that means (i guess) that al messages are not encrypted at all.

Can someone clarify this pls?

0 Upvotes

16 comments sorted by

27

u/hiddenasian42 Aug 30 '22

Messages in public chat rooms are only end-to-end encrypted if the room owner enabled this. That makes sense, since if a room is public, meaning anyone can join it anyway, someone who wants to read your messages will just join the room. That person would get your messages even if they were end-to-end encrypted. This is valid for messengers in general, not just Matrix.

In private chat rooms or in direct messages, end-to-end encryption makes sense. For direct messages, most Matrix clients will enable it by default.

Note that even without end-to-end encryption, your messages are still encrypted during transfer, meaning that without end-to-end, your Matrix server can read the message, but your internet provider or anyone else listening can't.

11

u/grinapo Aug 30 '22

As an addition: encrypted public rooms are extremely inconvenient in practice. They are usually non searchable, their history is not browseable, actually reading the message requires cooperation from the clients and the network, and with lot of people it may be pretty resource-consuming. And of course anyone joining the room will be able to read messages from then on.

But I do not see how the title of the question relates to the actual question: is a messaging network good only if it encrypts everything and that's all it needs to be good? ;-) Matrix has a lot of positive and negative attributes, encryption is just one of those.

1

u/[deleted] Aug 30 '22

Same of this apllies to telegram too?

6

u/hiddenasian42 Aug 31 '22

Telegram doesn't even enable end-to-end encryption on direct messages by default. You need to explicitly start a secure chat, but then you can't synchronize that across your devices anymore.

-3

u/TheJackiMonster Aug 30 '22

I disagree. It's not valid for messengers in general because a chat being publically available is a wide term. For example a chat could be available via a messenger for a group of people sharing an invitation link or similar shared secret to enter. That doesn't mean the chat is designed to be public and readable for everyone.

The term that a room is "public" would imply that everyone would be able to join without any required key or information. This is quite unlikely in any truely decentralized service because users won't have a central platform as entry point searching for a key or hint to join.

So actually all chat rooms would be considered private in such a service and all chats should be encrypted by default. Because it is unknown how public the information required to join is in practice.

The statement that nobody can read the messages is also not exactly true. If we assume that the chat is public, anyone would be able to join and read all messages. So the idea of relying on TLS between server and client only holds if the chat is not public.

But then TLS relies heavily on certificates and their regarding authorities providing them as well as verifying them. Governments usually run their own CAs which technically allows them to misuse those to eavesdrop on encrypted traffic. Additionally depending on the location of the server some laws allow to demand access to its data.

Sure, it is unlikely that a government targets you directly. But given that Matrix is built on federal servers which are publically known in most cases, a server you are using might become a target for some reason and this could end in your messages getting revealed.

3

u/d1722825 Aug 30 '22

There are private chat rooms in matrix, they are E2E encrypted by default (at least with Element as a client). These are the rooms where you can only join if you have been invited. (You can also set if newly joined users could read messages older than when they are joined.)

Public rooms are public for anyone so your messages can be read by anyone. If government want to read the messages they can simply join and do so.

(AFAIK there is a slight difference between multi-party-direct-message rooms and private rooms in terms of the used cryptography, but both are E2EE.)

1

u/TheJackiMonster Aug 31 '22

Have you actually read my comment? I didn't say anything different, lol.

1

u/grinapo Sep 02 '22

I read twice what you wrote and I have realised that I am not even sure what you wanted to convey. But it contains a lot of dubious statements, at least in the context of Matrix.

But I am not even sure anyone needs them to be corrected since the original question started from a false assumption...

Maybe just for the sake of generalisations, two important points:

  1. TLS protects from eavesdropping in transit, but not against server admins, and its is a (comparably) lightweight technology to use [and it is not necessarily related to any problem about CAs; TLS can be used without CAs, no need to detail, most of us knows hows and whys]

  2. end-to-end-encryption (E2EE) protects against most of the known adversaries, including admins, but it is heavy and often user unfriendly.

This is one reason why Matrix defaults private chats to E2EE while public (multiuser) rooms start as unencrypted, but they can be switched over anytime (and never switched back anymore).

1

u/TheJackiMonster Sep 02 '22

How would TLS be used without CAs given that a client doesn't know the public key of the server? Any transmission of the key would be needed to be unencrypted which allows attackers to make a MITM attack.

Also E2EE is not necessarily heavier as TLS from my understanding.

My whole point however was that the difference between "public" and "private" chats is completely arbitrary. If a chat is truely public, even E2EE wouldn't help you with anything neither does TLS. Everyone could read everything.

But when exactly is a chat truely public? To have a chat public you would need a public entry point which is known or reachable by everyone and this most likely is a central platform or service.

Now the argument I referred to originally was that "messengers in general wouldn't opt for E2EE in public chats". I doubt that because any decentralized messenger has a real problem in publication of such an entry point. That means I wouldn't really state that a decentralized messenger actually offers public chats and therefore it would be bad if they wouldn't use E2EE by default.

The second argument I referred to was "even without E2EE only your server can read the messages but anyone else can't" and as mentioned given that I see quite some issues with relying on CAs and on delfie-hellman key exchange as well without physical verification, I doubt that.

I never stated that Matrix doesn't allow to use E2EE or that you can't have private chats. But the comment I was replying to stated false facts by generalising messengers as "centralized/federalized messengers" and by claiming "TLS does not have issues".

1

u/grinapo Sep 02 '22

You honestly want me to state the obvious? Right. Briefly.

  • CA: you store the cert; it's for encryption (vs eavesdropping), not authentication. (If you need that, verify e2ee peer.)

  • "heavier": differentiate between "technical aspects" vs. "usability".

  • "public/private": this debate would require me to detail at least five different aspects, none of them would really mean anything for the original question. In short for simplicity: if anyone can join, it's "public", and I did not say e2ee wouldn't be useful (I could list reasons where it's useful): I said it would be impractical (which is based on real-world experience, not theory).

  • argument2: that's a theoretical debate, while I definitely underlined (im)practical use. Your threat model is different from the average, and look at the original question...

  • "I never stated that...": okay, there could be reasons going in real technical and theoretical details, but does this post look like the fitting one?

There are detailed and high quality discussions about the pros and cons of Matrix security model, ranging from TLS throughout various e2ee attributes up to metadata leaks, trust and the seriously unwanted effects of Element, Inc. controlling large swaths of users and services (not to mention the specification process and server development), but I don't feel like spending time on that here and now.

I believe people have "clarified" what the OP asked about. :-)

4

u/[deleted] Aug 31 '22

Encryption in transit always.

Encrypted between chat clients depending on the room settings.

Encryption in transit assures you that the message hasn’t been altered or intercepted in transit, and that the server is who they say they are.

1

u/ELLLI0TTT Dec 06 '24

This aged horribly 😆

1

u/Effective_Strain_709 Jun 19 '25

why?

1

u/ELLLI0TTT Jun 19 '25

No idea, don't even remember making this comment lol.

0

u/[deleted] Aug 31 '22

[deleted]

1

u/grinapo Sep 02 '22

I haven one (out of hundreds) room where all the people are verified, and it doesn't take too long to have it lost again, when someone replaces their client without backing up encryption keys. It is extremely hard to make people verify when you really know them all personally, and almost impossible to get it done when there are "facebook friends" (eg. people you've barely heard of) in the room.

0

u/[deleted] Sep 02 '22

[deleted]

1

u/grinapo Sep 02 '22

Indeed the only way it'd work in practice is by using some dual "web of trust/direct verification" system. Verifying people en-masse is unbearably slow today, I actually did that, and it is highly impractical even with geeks, not to mention normal people.

Most rooms use the compromise of being encrypted with full of unverified people, or the worse case when people "verify" someone they never met.

In fact it would be even more user friendly to be able to cache a person automagically (like vrify without actual verification), so there would be three levels:

  1. unknown

  2. known cert

  3. verified cert

Since it is rare that someone pulls up MITM attack on people never meeting one another.