element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
66 stars 11 forks source link

Epic: Users should not see UTDs for messages they are not supposed to be able to read #2312

Closed BillCarsonFr closed 2 weeks ago

BillCarsonFr commented 4 months ago

Abstract

There are cases when messages cannot be decrypted by a client, and it is expected/known that it can't.

Currently clients will display these messages, and display them as errors: unable to decrypt messages.

In some cases, these UTDs (Unable To Decrypt) can be resolved (decrypted) if the user performs some action.

The goal is to identify these type of UTDs and see if they could be hidden to the user until the action that could resolve them is performed.

Definition

A UTD is expected when a message which keys were not supposed to be (or couldn't be) shared with your current device is received.

When sending a message, the client checks for all devices in the room, then sends them the Megolm key to decrypt the message. Therefore, for example if the current device was not in the room at that point, it will create an expected UTD.

Notice that we are talking here about a device joining a room, not a user joining a room. Devices have their own life time, and is different from the user life time.

Scenarios creating avoidable UTDs:

Expected UTDs can sometimes be fixed

image

Breakdown

### Tasks
- [ ] https://github.com/element-hq/element-meta/issues/2313
- [ ] https://github.com/element-hq/element-meta/issues/2317
- [ ] Expected UTDs: Handle UTDs due to a recipient not having any device to encrypt to
BillCarsonFr commented 4 months ago

I might heavily update this issue, as it looks like I end up writing every thing we know about that could cause UTD. Instead of things we know will be in UTD until the session has been properly verified.

Updated the issue

richvdh commented 2 weeks ago

Closing this, because the two sub-issues have been resolved