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

E2E: Private key decryption fails on fresh install. IV mismatch #2156

Closed
ardevd opened this issue Feb 12, 2018 · 2 comments
Closed

E2E: Private key decryption fails on fresh install. IV mismatch #2156

ardevd opened this issue Feb 12, 2018 · 2 comments
Labels
E2E feature: encryption (client-side) AKA: E2E / E2EE needs info Waiting for info from user(s). Issues with this label will auto-stale.

Comments

@ardevd
Copy link
Collaborator

ardevd commented Feb 12, 2018

I've tested the following on API level 23 with the code from master and on API level 27 with #2154 and the same issue happens on both.

Steps to reproduce:

  1. Install the app, create an encrypted folder, saving the pass phrase.
  2. Uninstall the app, re-install it
  3. Try to access the encrypted folder. You are prompted for the pass phrase. Enter the previously used pass phrase.
  4. Decryption fails. The user is hinted about the pass phrase possibly being incorrect.

Debugging reveals that the pass phrase is being parsed correctly and matches the one used to encrypt the private key in step 1. However, the IV is completely different. It's not clear to me how the IV is retrieved across re-installs of the app so that they can match up. Is the IV stored server-side along with the salt?

Currently, this means that it's impossible to recover your encrypted files should you ever change devices or re-install the app.

What am I missing here?

@ardevd
Copy link
Collaborator Author

ardevd commented Feb 12, 2018

I'm assuming you are the guy to ask @tobiasKaminsky ?

@AndyScherzinger AndyScherzinger added needs info Waiting for info from user(s). Issues with this label will auto-stale. E2E labels Feb 12, 2018
@ardevd
Copy link
Collaborator Author

ardevd commented Feb 13, 2018

Turns out this is related to #2153 An old private key was stored on the server and even though the server returned 200 OK it didnt replace the old private key with the new one associated with the new public key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E feature: encryption (client-side) AKA: E2E / E2EE needs info Waiting for info from user(s). Issues with this label will auto-stale.
Projects
None yet
Development

No branches or pull requests

3 participants