!vlnjqGLpLJlFmBSkfQ:matrix.org

End-to-end encryption in Matrix

1010 Members
More general discussion around implementing and using encryption in Matrix via Olm/Megolm | Spec work and reference impl work in #e2e-dev:matrix.org179 Servers

Load older messages


SenderMessageTime
21 Apr 2024
@deiabo:matrix.org@deiabo:matrix.org joined the room.04:15:06
@deiabo:matrix.org@deiabo:matrix.org left the room.04:15:25
@bluescreenoff:matrix.orgbluescreen
In reply to @daedric:aguiarvieira.pt
It makes no sense. :/
Why not? I don't think I said anything wrong?
08:05:22
@bluescreenoff:matrix.orgbluescreen🥲08:05:32
@bluescreenoff:matrix.orgbluescreen
In reply to @cvwright:futo.org
There is a spec change proposal MSC3061 that provides a way to share older historical room keys with new users, more in line with the room's history visibility setting.
I don't know how I missed this for a week, will take a look!
08:17:14
@dkasak:termina.org.ukdkasak
In reply to @ity:itycodes.org
Only if you are cross-signed and their client sends them, iirc.
No, you can never re-receive old keys from other people, only from other cross signed devices of your own.
08:37:25
@daedric:aguiarvieira.ptRicardo Duarte
In reply to @bluescreenoff:matrix.org
Why not? I don't think I said anything wrong?
Oh, i'm not claiming you did 🙂
11:12:16
@daedric:aguiarvieira.ptRicardo DuarteI only said "a public group e2ee room doesn't make much sense" because anyone can join and start reading new messages. You're just preventing the server admin from reading them. 11:13:08
@daedric:aguiarvieira.ptRicardo DuarteI was in a smalish e2ee room (i didn't notice) with about 100 members.11:13:21
@daedric:aguiarvieira.ptRicardo DuarteEach time any member updated his device list, my server would receive the new device least and get a performance hit11:13:50
@brayd:chat.braydmedia.deBrayd
In reply to @dkasak:termina.org.uk
No, you can never re-receive old keys from other people, only from other cross signed devices of your own.

Hmm according to this (https://blog.neko.dev/posts/unable-to-decrypt-matrix.html) article it is possible to receive them from the sender
So I couldn't decrypt my own messages from the past but from my chat partner as long as they still have the keys for their sent messages (which is the case in my example) so I should be able to get the keys or not? But I seem to not get them even when the other person is online at the same time as I am. So is there anything I have to do in addition to initiate the request for the sender's keys?

From the article: "Now comes the real magic. Clients can request keys from each other by sending a key request. That way you can request the keys to all unreadable messages either from one of your devices or the original sender. This however has limitations. What if your other clients don't exist or are offline? Or the original sender isn't online? Well, then none can send you keys, so you will never receive them. Sorry, make sure to keep a backup next time!"

19:01:12
@tclj:matrix.orgMatrix joined the room.20:00:06
@dkasak:termina.org.ukdkasak
In reply to @brayd:chat.braydmedia.de

Hmm according to this (https://blog.neko.dev/posts/unable-to-decrypt-matrix.html) article it is possible to receive them from the sender
So I couldn't decrypt my own messages from the past but from my chat partner as long as they still have the keys for their sent messages (which is the case in my example) so I should be able to get the keys or not? But I seem to not get them even when the other person is online at the same time as I am. So is there anything I have to do in addition to initiate the request for the sender's keys?

From the article: "Now comes the real magic. Clients can request keys from each other by sending a key request. That way you can request the keys to all unreadable messages either from one of your devices or the original sender. This however has limitations. What if your other clients don't exist or are offline? Or the original sender isn't online? Well, then none can send you keys, so you will never receive them. Sorry, make sure to keep a backup next time!"

These behaviours were further restricted as part of remediations of https://matrix.org/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients/. Nico's blog post predates that so it's outdated in this respect.

Using the mechanisms available today, it's impossible to safely accept keys re-shared after the fact from other people's devices. You can only safely accept keys re-shared from your own verified devices. So the former behaviour was removed, for example in the Rust SDK crypto crate.

23:26:43
22 Apr 2024
@brenbarn:matrix.orgBrenBarnthat's completely nuts03:11:59
@andrewf:element.ioAndrew F (sick today) changed their display name from Andrew F (back on April 22) to Andrew F.07:16:49
@brayd:chat.braydmedia.deBrayd
In reply to @dkasak:termina.org.uk

These behaviours were further restricted as part of remediations of https://matrix.org/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients/. Nico's blog post predates that so it's outdated in this respect.

Using the mechanisms available today, it's impossible to safely accept keys re-shared after the fact from other people's devices. You can only safely accept keys re-shared from your own verified devices. So the former behaviour was removed, for example in the Rust SDK crypto crate.

Ahh that explains
Thank you
On the other hand it somehow makes sense that a chat partner doesn't count as "trusted" since they could maybe manipulate the old messages and send matching keys

Sure that wouldn't be easy to do but I think it could be possible...maybe a reason why it was changed?

09:49:42
@deepbluev7:neko.devNicoWell, the keys can never be trusted, but apart from them you could still request them as untrusted keys. It is a tradeoff between security and convenience09:53:05
@cvwright:futo.orgcvwright
In reply to @brenbarn:matrix.org
that's completely nuts
It's unfortunate for sure but it makes sense given the reality of the situation. If we can get something like MSC3917 working and merged into the spec, then a lot of things will be better.
14:26:55
@dkasak:termina.org.ukdkasak
In reply to @brayd:chat.braydmedia.de

Ahh that explains
Thank you
On the other hand it somehow makes sense that a chat partner doesn't count as "trusted" since they could maybe manipulate the old messages and send matching keys

Sure that wouldn't be easy to do but I think it could be possible...maybe a reason why it was changed?

It's not fundamentally impossible to have the original author of the message securely re-share the key that was initially lost on its way to you. However, there is no current mechanism for the author's client to do so. The mechanism that was being used for this suffers from lesser guarantees, allowing a malicious server to inject messages (and keys), pretending they were authored by someone else. This is why it had to be removed.
14:28:48
@brayd:chat.braydmedia.deBrayd
In reply to @dkasak:termina.org.uk
It's not fundamentally impossible to have the original author of the message securely re-share the key that was initially lost on its way to you. However, there is no current mechanism for the author's client to do so. The mechanism that was being used for this suffers from lesser guarantees, allowing a malicious server to inject messages (and keys), pretending they were authored by someone else. This is why it had to be removed.
Makes sense
14:30:11
@dkasak:termina.org.ukdkasak
In reply to @brayd:chat.braydmedia.de

Ahh that explains
Thank you
On the other hand it somehow makes sense that a chat partner doesn't count as "trusted" since they could maybe manipulate the old messages and send matching keys

Sure that wouldn't be easy to do but I think it could be possible...maybe a reason why it was changed?

* It's not fundamentally impossible to have the original author of the message securely re-share the key that was initially lost on its way to you (or which you had somehow lost in the meantime). However, there is no current mechanism for the author's client to do so. The mechanism that was being used for this suffers from lesser guarantees, allowing a malicious server to inject messages (and keys), pretending they were authored by someone else. This is why it had to be removed.
14:30:16
@dkasak:termina.org.ukdkasakThere was some talk about implementing this mechanism, but given those situations (the key getting lost on its way to you or you losing the key) are usually a result of bugs, priority was given to fixing these bugs instead14:31:07
@dkasak:termina.org.ukdkasakUltimately whatever is chosen requires engineering effort and potential maintenance burden14:31:45
@brenbarn:matrix.orgBrenBarn
In reply to @cvwright:futo.org
It's unfortunate for sure but it makes sense given the reality of the situation. If we can get something like MSC3917 working and merged into the spec, then a lot of things will be better.
what makes sense given the reality is to just disable e2ee (at least by default) until all such issues are resolved
18:20:02
@brayd:chat.braydmedia.deBrayd
In reply to @brenbarn:matrix.org
what makes sense given the reality is to just disable e2ee (at least by default) until all such issues are resolved
Well I'd rather loose access to sensitive information in 1:1 chats rather than not having those information encrypted from third parties
18:21:30
@brenbarn:matrix.orgBrenBarn
In reply to @brayd:chat.braydmedia.de
Well I'd rather loose access to sensitive information in 1:1 chats rather than not having those information encrypted from third parties
I think that is not in line with what most ordinary users want
18:22:03
@brenbarn:matrix.orgBrenBarn(i.e., "grandma" type users)18:22:09
@brayd:chat.braydmedia.deBrayd
In reply to @brenbarn:matrix.org
(i.e., "grandma" type users)

Tbh those kind of users would probably also loose access their access to their signal messages
At least as soon as they'd have to migrate to a new phone. They'd probably be able to migrate the phone number but they would not understand that they'd have to actively have signal on the old and new phone open and have to start a migration process for the data and the keys even though Signal makes it very simple while not compromising encryption

I don't think it's even easier than that

Of course it is important to improve how all of this is handled on Matrix to make it as easy and as fail-proof for non-technical users as possible, but disabling encryption per default until that is ready is a bit drastic IMO (even though afaik you can do that just fine when you're administrating your own Synapse server)

18:25:30
@deepbluev7:neko.devNico
In reply to @brayd:chat.braydmedia.de
Well I'd rather loose access to sensitive information in 1:1 chats rather than not having those information encrypted from third parties
As long as I can tell I prefer being able to read that information instead of having to ask the user to send it to me again. It is just frustrating to have an UTD and not being able to recover from it. Additionally, Synapse relies on the key reqests still to notice device lists being out of date, so without them some temporary faults are unrecoverable right now
19:07:10
@deepbluev7:neko.devNicoIdeally those would be fixed, but at the current pace, that will take years19:07:26

Show newer messages


Back to Room ListRoom Version: 5