element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
Apache License 2.0
10.86k stars 1.92k forks source link

Key Backup not restored automatically after verification #27009

Open aWeinzierl opened 5 months ago

aWeinzierl commented 5 months ago

Steps to reproduce

  1. Have properly verified and backed up session image
  2. Log out
  3. Log in
  4. Click verify with other device image
  5. change language
  6. Open encrypted chats, see Unable to decrypt message
  7. wait 5 Minutes, see nothing changed
  8. Click restore from Backup
  9. Type security key, click Continue
  10. See keys being restored, see readable messages
  11. After restoring keys: dialogue: image
  12. Click cancel,
  13. Click restore from Backup, see keys being restored without security key request
  14. arrive at step 1

Outcome

What did you expect?

.6. all my messages decrypted, or being decrypted .9. no request for security key .11. see success dialogue

What happened instead?

.6. messages not decryptable .9. security key was requested, despite verification .11. see request for security key again

Operating system

Windows 10

Application version

Element version: 1.11.58 Crypto version: Rust SDK 0.7.0 (691ec63), Vodozemac 0.5.0

How did you install the app?

https://element.io/get-started

Homeserver

matrix.org

Will you send logs?

Yes

richvdh commented 4 months ago

In legacy crypto, we used to download the full key backup after verification (in the background); element R no longer does this. (Element-R does try to download individual keys, but it's unclear if, for example, it will retry any UTDs that are already on-screen)

richvdh commented 4 months ago

do we need to sort out https://github.com/element-hq/element-meta/issues/2176 for this ?

richvdh commented 3 months ago

In legacy crypto, we used to download the full key backup after verification (in the background); element R no longer does this. (Element-R does try to download individual keys, but it's unclear if, for example, it will retry any UTDs that are already on-screen)

Oddly, if you verify with the security key/phrase, it seems we do attempt to restore the backup in the background. (Though we don't show that in the UI, see https://github.com/element-hq/element-web/issues/17839)

richvdh commented 3 weeks ago

Thoughts on implementing this: