-
Notifications
You must be signed in to change notification settings - Fork 14
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
Sharing room keys for past messages on invite (MSC3061, or its successors) #39
Comments
SCOPE UPDATEThere are some scalability issues with sending the keys for the full history, as well as several edge cases. We don't want to fix all of them on existing SDKs (mobile, web). So for existing SDKS the main goal is to |
Do we think implementation of MSC3061 should include web? element-hq/element-web#22999 is a web UI task for room history key sharing that is currently biting a customer fairly badly. If we could include this task here it would be helpful. |
I'm reasonably sure this is already implemented on web. AFAICT element-hq/element-web#22999 is just a bug, not a missing implementation. EDIT 2024-06-13: this is no longer true, because the Rust crypto stack doesn't implement it; tracked at element-hq/element-web#26867 |
We consider this feature important. Without it using Matrix for collaboration in a business setting is cumbersome.
What needs to happen to get this MSC moving again, so it can be merged, and find its way to clients and servers? |
I agree with what has been said above. We also chose Matrix but didn’t pay much attention to this issue at the beginning, and now we really need this feature. It would be great to hear some timelines, if possible. |
A guesstimate for when the security disclosure will be made would be nice. Depending on the potential attack vector the risks may be mitigated or accepted. Without the disclosure we don't know. |
I agree that this feature is very important, but @thoraj , did you intend your last comment to be sent here? If so, what kind of security disclosure do you mean? As I understand, a vulnerability was not a topic here. |
@mpeter50 Sorry for not providing context. My reference to a disclosure is based on a comment made in #e2e:matrix.org today. Apparently the MSC is blocked awaiting a security disclosure and having the issue resolved. |
We're working on this now, so the disclosure should come in the next couple of weeks. |
@dkasak Any updates for this? We are receiving complaints about this being flaky for our customer, and we are curious to know what the issue/disclosure is about, and how we can address this? |
Yes, sorry, I wanted to post an update but failed to find this particular issue. The reason this was blocked was disclosed today in https://matrix.org/blog/2024/10/security-disclosure-matrix-js-sdk-and-matrix-react-sdk/ and the associated advisories. The plan forward is outlined in this section. |
I've updated the description of this issue to reflect our current plans in this area. |
Very happy to see this progress, and that there are very concrete plans now 👍New members getting room history in encrypted rooms is indeed an important feature. I know it is not in scope atm, but I'm also wondering if the proposed exfiltration of keys using a blob, in the future could be utilized to provide keys for indexing room messages (for search purposes). |
Maybe I missed something while digging through the whole history of this topic, so I apologize right at the beginning: From what I've read, my understanding is that in order to access history in encrypted rooms in the future, the inviting party must verify one of the invited party's sessions (so that the keys are actually transmitted). Now, I'm thinking of the case where a new user joins the server and needs access to, say, 30 rooms, each of which has a different moderator (and only that moderator is allowed to invite new members to the room). As I understand it, in this case the new user would have to verify their session with each of these room moderators. Is there any shortcut or way to automate this for environments where there are many such rooms? (I know that automating this potentially lowers security as it is then easier for an attacker to gain access to a verified session...) Another option I thought about is if it was possible to define a "trusted introducer" (to reuse the term from GnuPG) or a WoT-approach, but I assume there is also nothing similar, right? |
This is incorrect. Sorry, it's not very clear from the description at the top of this issue -- the description assumes familiarity with terminology that we use internally. So, I'll try to spell it out explicitly. The plan relies on cross-signing by user identities and a TOFU for the identities themselves. Suppose Alice wants to invite Bob to a room. When Alice first meets Bob, her client records Bob's public cryptographic identity. Now, when Alice sends the invite to the new room, her client will send the details of the key bundle to any of Bob's devices which Bob has verified, provided Bob's cryptographic identity hasn't changed since Alice first saw Bob. We do not require that Alice explicitly verify Bob or any of his devices. This is consistent with our plans for encrypted messaging in general; see MSC4153. |
It seems that this is what I was missing. Thank you for your answer! Maybe one thing which made it easier for me to get confused is the behavior of a setting I have in my Element Web client that is labeled |
When you are invited to an encrypted room with the "Who can read history" option set to "members only (since the point in time of selecting this option)" (i.e.
m.room.history_visibility
=shared
), you should be able to read old messages.Currently, old messages are displayed as "You don't have access to this message".
Previously, MSC3061 provided a solution, but it was found to be impractical.
This issue includes creating a new MSC for a more practical solution, and implementing it on Element clients.
Proposed solution
Our current plan (internal notes, comparing other solutions) is closely based on MSC3061, but rather than sending the message keys as to-device messages, put them in an encrypted media blob, and then send the keys to that in a to-device message.
In other words, when you invite a user to an encrypted room then (provided they do not have an identity pinning violation):
We'll also need UI which tells the recipient who sent the keys ("history as presented by Bob", or so), since there is no way for that recipient to know that the inviter isn't lying.
Another important bit of UI is to make it clear to all members of
history_visibility: shared
rooms that messages they send now may be shared with future room members. Our experience is that different users have wildly different expectations in this respect.This obviously won't solve access to history when joining rooms without an invite; however our favoured solutions to that (#750) involve similar mechanisms, so this will provide useful groundwork.
Task list
We will start by building a prototype.
Later work may include:
Refinement
m.room_key
events.shared_history
property, but that means we will never share history from clients that do not implement the history sharing property.shared_history
default to true (ie, make history-sharing opt-out) at least at first, but it's not ideal. Also, it'll still be confusing behaviour if a paranoid user/client sets this to false everywhere.Handle Provenance of keys
Deleting the files or using a new API
Tasks
Relevant client-specific issues
Old description
The text was updated successfully, but these errors were encountered: