I have an app in Android and I've some certificates and public/private keys stored in the KeyStore. This KeyStore is protected by a password. The code is like this:
File keyStoreFile = new File(getContext().getFilesDir(),
"TheKeyStoreFile.bks");
char[] keystorePassword = "S0m3Tr9ck9P4ss".toCharArray();
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(new FileInputStream(keyStoreFile), keystorePassword);
My qüestion is: where I should save my password "S0m3Tr9ck9P4ss"? Where is the safest place to save it? Should I use another KeyStore to store it?
Sorry it's not a duplicate. My question is where I should store safely the KeyStore password. Not any password or certificate or public/private key. These ones are stored in the KeyStore. But what about the password that protects the KeyStore itself? Where I should store this particular password.
Thanks in advance for your comments.