Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Secrets should be stored in a java.security.KeyStore #48

Open
ThomasHabets opened this issue Jul 12, 2016 · 4 comments
Open

Secrets should be stored in a java.security.KeyStore #48

ThomasHabets opened this issue Jul 12, 2016 · 4 comments

Comments

@ThomasHabets
Copy link
Contributor

Transferred from google/google-authenticator#157

Instead of storing the secrets in the SQLite database, the SQLite database should store the alias of the SecretKey in a java.security.KeyStore. This will allow migration to more secure methods of storage in the future.

Note that you'll have to use a JCEKS instead of the default JKS.

@capi
Copy link
Contributor

capi commented Jul 13, 2016

How should the password for the keystore be protected? For the mentioned use-case where Authenticator is installed on SD-card, having a hard-coded password or one that is also stored on the SD-card would not yield any additional security.

@Manouchehri
Copy link

@capi The Android Keystore does not store passwords on an SD card in any situation as far as I'm aware.

https://developer.android.com/training/articles/keystore.html

It's much more than just a hardcoded password. On devices with hardware backed keys, extraction becomes difficult.

@capi
Copy link
Contributor

capi commented Jul 13, 2016

@Manouchehri Thanks for the clarification, my mind was set way to much to the standard Java keystore.

@scottmmjackson
Copy link

I'm guessing that not using the Android keystore was why I was able to recently restore Google Authenticator from a Titanium Backup with all my tokens intact.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants