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

Unable to decrypt message that has been received while being logged out #1893

Open
Graphicscore opened this issue Aug 9, 2021 · 11 comments
Open
Labels
A-E2EE O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Labs

Comments

@Graphicscore
Copy link

Graphicscore commented Aug 9, 2021

Steps to reproduce

  1. Create 2 accounts (Account A, Account B)
  2. Setup Key Backup in Settings for both accounts
  3. Logout Account A
  4. Send message from Account B to Account A
  5. Login with Account A and restore backup
  6. Message is unable to be decrypted, and Account A cannot see the content.
    ** Unable to decrypt: The sender's device has not sent us the keys for this message. **

What happened?

You're unable to decrypt an E2EE message that has been send/received while the receiver has been logged out of the session.

What did you expect?

I expect to be able to decrypt/restore messages that I should have received while being logged out of my account.

Operating system

Windows,Mac, Web

Browser information

Latest Chrome, Latest Edge

URL for webapp

https://app.element.io/

@t3chguy
Copy link
Member

t3chguy commented Aug 9, 2021

This is a property of https://en.wikipedia.org/wiki/Forward_secrecy

A feature is in the works (Dehydration) which lets you stash your session during logout securely to be able to re-use with your next login

@Graphicscore
Copy link
Author

@t3chguy But what if I want to logout and resume on a different pc? The message would be lost then wouldn't it?
Is there any way to "make it work" right now?

@t3chguy
Copy link
Member

t3chguy commented Aug 9, 2021

That would have no effect. It would be securely stored (encrypted) on your Matrix server so can be migrated to a different device.

Is there any way to "make it work" right now?

Keep a session logged in, if you log out of all of your sessions then you have 0 keypairs to which encrypted messages can be encrypted for.

@Graphicscore
Copy link
Author

So if I have no sessions left there is no way around this issue until the dehydration feature is implemented?

@t3chguy
Copy link
Member

t3chguy commented Aug 9, 2021

If you have 0 sessions then you have no keys to be encrypted for. Hence you not receiving the decryption keys for messages which happen during that time.

@germain-gg germain-gg added O-Uncommon Most users are unlikely to come across this or unexpected workflow A-E2EE S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Aug 9, 2021
@Graphicscore
Copy link
Author

Do you have a rough estimate / timeline for when the dehydration feature will be available?

@Elementisgreatbut
Copy link

Same here, that would be really nice to know.

Do you have a rough estimate / timeline for when the dehydration feature will be available?

@svargh
Copy link

svargh commented Jan 7, 2022

So instead of doing Security Key backup and room keys export in element,
I should make a firefox profile backup to be really sure all needed information for decryption is available?

There should be at least some kind of hint before log off, that any message sent can never be decrypted again!

@nordemn
Copy link

nordemn commented Jul 24, 2023

-- answering to @t3chguy at duplicate #25837 --

Sure, and if you were to reopen that session with the cryptographic asymmetric keys which only that session has then you'd be able to decrypt things. The issue is you're throwing those keys away when you close Tor.

Ok ok, I didn't know about this OLM/megolm thing and how keys were sent.

Is it a security issue to store ALL keys from a backup-ed session ? Then new sent keys could also be stored and no more decrypting issue. That's what is expected when you backup a session...

Is it possible to turn on the feature with a web app ?

Thanks

@t3chguy
Copy link
Member

t3chguy commented Jul 24, 2023

Is it a security issue to store ALL keys from a backup-ed session ?

You're describing dehydration

@chagai95
Copy link

chagai95 commented Jul 8, 2024

Isn't this already implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Labs
Projects
None yet
Development

No branches or pull requests

8 participants