Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Read All Messages In Browser #27795

Closed
muellert opened this issue Jul 21, 2024 · 13 comments
Closed

Can't Read All Messages In Browser #27795

muellert opened this issue Jul 21, 2024 · 13 comments
Labels
A-E2EE O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@muellert
Copy link

muellert commented Jul 21, 2024

Steps to reproduce

  1. I am using Elements on a mobile.
  2. I exported the session key and copied it to my computer.
  3. I opened 'app.element.io, logged in with the same account I'm using on my mobile, and verify this with my Elements on my mobile (no other method works).
  4. I select a channel.
  5. I see "Unable to decrypt message" everywhere.
  6. I import an "E2E room key".
  7. I still see "Session key: <not supported>".

Outcome

What did you expect?

I expected to be able to read all messages in that channel.

What happened instead?

Some messages are readable. Others still show "Unable to decrypt message".

So far, it seems as if only messages I sent from my mobile while I was logged out in the browser, are unreadable in the browser once I log in there, while messages which I received during that same time, are readable.

Operating system

Debian 12

Browser information

Chromium 121.0.6167.139 (Official Build) built on Debian 12.4, running on Debian 12.6 (64-bit)

URL for webapp

app.element.io

Application version

Element version: 1.11.71 Crypto version: Rust SDK 0.7.1 (80a151e), Vodozemac 0.6.0

Homeserver

matrix.org

Will you send logs?

No (what would be in those logs?)

@dosubot dosubot bot added A-E2EE O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Jul 21, 2024
@ruben1PvP
Copy link

ruben1PvP commented Jul 22, 2024

I have the same issue. I've seen that:

  1. It doesn't matter if you CTRL + F5 or if you log out and log in again.
  2. It doesn't matter what method you use to decrypt the messages (verifying by another device or using the secret key).
  3. It happened to me in Firefox and in Windows 10.
  4. Sometimes it says that the key backup is not working, others that it does but the session is waiting (eternally) to get them.
  5. I logged out, cleaned cookies and cache from my browser and logged in again. Problem persists.

I basically have one device where I can't decrypt the messages from my e2e rooms. The others are ok. Even new messages that I sent from the session where the decryption is not working are decrypted in other devices without any problem.

@dbkr
Copy link
Member

dbkr commented Jul 29, 2024

This will need investigation to see if there's a particular, exact sequence of steps to trigger the bug. Otherwise, this is going to be tough to investigate without logs.

@ruben1PvP
Copy link

This will need investigation to see if there's a particular, exact sequence of steps to trigger the bug. Otherwise, this is going to be tough to investigate without logs.

Is it even possible for us (The people who have the problem) to get logs and send them here?
For us, the "exact sequence of steps" is just logging in in app.element.io and verifying the session.

@muellert
Copy link
Author

muellert commented Jul 31, 2024

In a different discussion, a guy from Mozilla suggested I try their current browser (FF 128). Today, I did, and that thing can read even fewer messages than my Chromium, using the same key.

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2024

I import an "E2E room key".

These keys you're exporting/importing only contain keys to history at that moment in time, as megolm keys are cycled and new ones are formed any time someone joins or leaves a room to ensure Perfect Forward Secrecy. So this explains why you keep having fewer messages available as you load the same key into newer sessions.

@muellert
Copy link
Author

I don't understand how logging in to the same room with the same account, just on a different browser, constitutes "joining" a room. Regarding the room in question, there are only two people in it, me, and someone else. It has been like that from day one, and there will be no change.

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2024

I don't understand how logging in to the same room with the same account, just on a different browser, constitutes "joining" a room.

Each of your devices has its own cryptographic identity (olm), if that didn't happen then if someone compromised your device, e.g. it was stolen, they'd be able to not only decrypt history but also future. Megolm sessions are also rotated periodically, every N messages & every M days. So again, your export only guarantees the history from before it is decryptable.

@muellert
Copy link
Author

Good point. So the reason why my older messages are all readable on my phone is because they're re-encrypted with the new key?

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2024

You haven't given enough information about your phone to know which device it is in this series. Once a device is authenticated it'll receive any new megolm sessions from that point onwards but have no access to history unless you have keybackup (or manual key export as in your case) and then the messages for which the keys were included in the backup will be decryptable.

@ruben1PvP
Copy link

I import an "E2E room key".

These keys you're exporting/importing only contain keys to history at that moment in time, as megolm keys are cycled and new ones are formed any time someone joins or leaves a room to ensure Perfect Forward Secrecy. So this explains why you keep having fewer messages available as you load the same key into newer sessions.

In my case this would not be the case, knowing that if I log in another client (like Fluffychat) or in Element Android after logging in web and having these problems, all the encrypted messages are visible. Can mine be considered then a new problem? Do I have to open a new issue myself?

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2024

sounds like you are using key backup and for some reason it isn't getting restored, have you tried manually restoring it?

image

@ruben1PvP
Copy link

sounds like you are using key backup and for some reason it isn't getting restored, have you tried manually restoring it?
image

I don't know how that would change a thing, it asked me for my security key like it did multiple times before and, as I said before, that doesn't work.

@richvdh
Copy link
Member

richvdh commented Sep 17, 2024

Duplicate of element-hq/element-meta#245

@richvdh richvdh marked this as a duplicate of element-hq/element-meta#245 Sep 17, 2024
@richvdh richvdh closed this as completed Sep 17, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

5 participants