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:
- Install the app, create an encrypted folder, saving the pass phrase.
- Uninstall the app, re-install it
- Try to access the encrypted folder. You are prompted for the pass phrase. Enter the previously used pass phrase.
- 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?
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:
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?