element-web icon indicating copy to clipboard operation
element-web copied to clipboard

Resetting security passphrase is too complex / error prone

Open DAlperin opened this issue 5 years ago • 12 comments

Description

If I reset my security passphrase, the passphrase I just set will be immediately rejected when I attempt to use it to verify another session

Steps to reproduce

  • Settings -> Security & Privacy -> Encryption -> Secure backup -> reset
  • Enter a security phrase -> enter code -> reenter -> download backup codes
  • Go to your profile -> click on another session to verify it -> Manually Verify by Text -> Verify Session
  • Try entering the security phrase you just set. It says Invalid Recovery Key
  • Try uploading or entering they backup codes you just downloaded. It says Wrong Recovery Key

Expected: The code I just set and the backup codes I just downloaded work Actual: they do not work

Version information

  • Platform: Tested on web and desktop

For the web app:

  • Browser: Chrome 87.0.4280.141, Firefox 84.0.2
  • OS: Ubuntu 20.04.1
  • URL: app.element.io

For the desktop app:

  • OS: Ubuntu 20.04.1
  • Version: 1.7.16

DAlperin avatar Jan 11 '21 17:01 DAlperin

Same error after resetting, after trying to enter new code i got error "Wrong Recovery Key "

ksampolski avatar Jan 11 '21 17:01 ksampolski

I have the same problem as well, which means there's no way for me to verify another session.

Azorlogh avatar Jan 25 '21 00:01 Azorlogh

@DAlperin @sierran @Azorlogh Sorry for the trouble here, can you try the following steps?

  1. Consider exporting room keys to a file as a backup in an existing session via top left menu -> Settings -> Security -> Export E2E room keys (but you've said you don't have encrypted rooms at the moment)
  2. Reset secure backup first (this should now succeed without confusingly asking for previous keys)
  3. Reset cross-signing keys (this may prompt for security key / phrase, it's expecting the new one you just made)
  4. On other sessions, you should be able to either verify the new session and receive new keys or go to Settings and "setup" Secure Backup (green button instead of the red "reset"), which maybe prompt for the new security key / phrase as part of downloading your keys

If that fails at some step, please submit debug logs and link to this issue so we investigate further.

jryans avatar Jan 25 '21 11:01 jryans

Huh, that seems to work. What's happening differently behind the hood that makes that work instead of the regular reset?

DAlperin avatar Jan 25 '21 18:01 DAlperin

It worked for me as well :+1:

Azorlogh avatar Jan 27 '21 20:01 Azorlogh

We were also affected by this issue. The workaround by @jryans worked, but it's not ideal for our users.

haslersn avatar Feb 09 '21 21:02 haslersn

I'm glad to hear the steps above are working. 🙂

What's happening differently behind the hood that makes that work instead of the regular reset?

Cross-signing and secret storage have somewhat complex, cyclical dependencies between each other. At the moment, we offer two separate targeted reset buttons:

  • You could reset just your cross-signing identity if a suspicious device was added to your account
  • You could reset your secret storage key if it was compromised somehow

However, we don't really explain any of that in the UI today, so I assume most people don't know why they'd want one vs. the other.

Because of the cyclical dependencies between the two systems mentioned above, resetting one but not the other can lead to confusing prompts asking for a security phrase, but it might want the old one or the new one, which is quite confusing.

All of this suggests it might be simpler to only offer a single reset button that always performs all of the steps outlined above. This would no longer allow for a targeted reset of e.g. just cross-signing separate from the rest, but it would simpler for most people to reason about, I assume.

For now, let's keep this issue open so it's easy to find for any others with a similar problem, and we can evaluate potential improvements to the reset flow that might resolve confusion in the future.

jryans avatar Feb 11 '21 13:02 jryans

This affects me, too (Firefox on Windows 10 and Element Desktop). I have downloaded and generated a lot of "Secure Keys" and "E2E-Keys", "Passphrases" and what not that I completely lost any concept of what's happening and how to obtain a secure and backed up system.

I am a bioinformatician by training, have a lot of experience with linux and have at least managed to set up a GPG key pair with the master key detached on an offline drive. So I would say I have at least a bit of experience with using asymmetric encryption tools, signatures etc. And yet I have no idea what I am supposed to do with this messenger :-(

On Signal, I have one backup as a file and print out a random passphase that encrypts my backup on disk. That's all to keep my encrypted chats backed up.

On Element, I have several problems:

  • I had the choice to generate a "Security Key" ("Sicherungsschlüssel" in German, default file name "security-key.txt", whatever that is, every key provides some security...?) or a "Security passphrase". But if I chose the passphase, I can "optionally" also download a key? What does that mean? Do I need it or not? For what?
  • Neither of the security keys work to "verify" my session on a new device or when I reset my password.
  • In the security options, there is a section about "Backup" and that some keys are "stored" and "cached" in the "Account data" or in a "Secure storage" ("Sicherer Speicher"). But where is that? If there is a Backup then I need to copy that to my backup drive! But I don't know where the backup is stored on disk so I cannot back up my chats reliably?
  • I have the choice of "Reset" or "Delete" my backup. What is the difference? When should I do what?
  • Then I can also download "E2E room keys". Whats the difference to the other keys? When should I do that?
  • Then there is a section called "Cross-signing" (same in German). I only understood this after reading this explanation in vector-im/element-meta#361 so no user will have any idea what this is.
  • What if I loose e.g. my phone that I used to verify other sessions? Neither of the keys have worked in the "Verify your session" dialog. I think safeguarding one key is already too much for some users, but managing multiple of them will exclude allmost all users from this messenger :-(

Please, make this simpler somehow. I am really fascinated by this project and was hoping that I can use this as a messenger for all our insitutes' PhD students. But as it is now, I cannot do it because it is much to complicated for everyone. That makes me sad :-( Sorry also that I cannot make a constructive proposal because I don't understand this system.

mlell avatar Feb 13 '21 10:02 mlell

@mlell Sorry for the confusion, but that's kind of a separate topic from this issue. I would suggest copying these concerns to https://github.com/vector-im/element-meta/issues/361 (which you already found), since that's more about the complexity and confusion of current security concepts.

jryans avatar Feb 16 '21 10:02 jryans

As mentioned in https://github.com/vector-im/element-web/issues/16879#issuecomment-816157401, there are quite a few issues where people have generally been confused by the process.

jryans avatar Apr 12 '21 12:04 jryans

All of this suggests it might be simpler to only offer a single reset button that always performs all of the steps outlined above. This would no longer allow for a targeted reset of e.g. just cross-signing separate from the rest, but it would simpler for most people to reason about, I assume.

@jryans A single master reset button is certainly the way forward, but you could also have a confirmation page for the master reset button with an Advanced dropdown menu, which reveals the two reset options for the users who know what they're doing.

opusforlife2 avatar May 16 '21 08:05 opusforlife2

I'm going to close this issue for now as the workflow has been redesigned and was release a couple of months ago. Please open a new issue for further improvement. Thank you!

kittykat avatar Dec 16 '21 17:12 kittykat