Skip to content

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

Description

@ardevd

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions