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

Support E2EE and device verification to enable decrypting message content #116

Closed
kevinaboos opened this issue Aug 20, 2024 · 1 comment
Closed
Labels
help wanted Looking for help from anyone!

Comments

@kevinaboos
Copy link
Member

Currently Robrix sets up the Matrix SDK to auto-decrypt messages received in E2EE rooms

There are three main parts to this:

  1. Device verification, which is done via emoji sequences.
    • This requires the user to initiate the device verification procedure using another already-logged-in client (e.g., Element).
    • We need to prompt the logged-in user of Robrix to start emoji verification (perhaps via an in-app notification) and then display instructions on how to start the procedure using another client.
  2. Saving inner session state of the Matrix SDK to disk and restoring it upon app start.
    • E2EE session data must be saved and restored by the Matrix SDK in order to maintain the ability to decrypt messages after the app is booted the next time.
  3. Supporting querying encrypted images.
    • Currently Robrix assumes that all media requests are for MXC URIs that are unencrypted. See the MediaRequest type and the usage of the Plain(OwnedMxcUri) variant.

The first step would be to test item (1) above, it should suffice to just run the emoji verification sequence and then open an E2EE room, at which point the Matrix SDK should automatically decrypt all encrypted content. If it does not, then item (1) should be considered unsuccessful.

Examples/Resources

There is an example on basic emoji verification here: https://github.com/matrix-org/matrix-rust-sdk/blob/main/examples/emoji_verification/src/main.rs

Distinguishing separate issues

This issue does not cover:

  • The ability of Robrix to act as the original device that creates the E2EE tokens/keys (unsure of the proper term).
    • Typically the client instance that you first login to or register a new account with is responsible for this, and for generating backup codes or a backup file to restore the encryption keys if device verification using another client is unavailable.
  • The ability for Robrix to serve as the "server" device for emoji verification (to verify another client).
    • For now, we only care about using another client as the "server" device to verify an instance of Robrix.
@github-project-automation github-project-automation bot moved this to Ready in Robrix Aug 20, 2024
@kevinaboos kevinaboos added the help wanted Looking for help from anyone! label Aug 20, 2024
@kevinaboos
Copy link
Member Author

Implemented in #173

@github-project-automation github-project-automation bot moved this from Ready to Done in Robrix Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Looking for help from anyone!
Projects
Status: Done
Development

No branches or pull requests

1 participant