androidcryptographysymmetric-key

How to store a symmetric key in the Android Keystore


I would like to provide the security to symmetric key which I have used for encryption and decryption. I would like to Encrypt the symmetric key and store in shared preferences. How can I do this?


Solution

  • Actually this is not a very advisable strategy. You should never store keys in your app, since you can not trust a delivered app.

    The only way to do this is to have a trusted server wich has user accounts, that use the apis that need to be secured.

    Collection of all reasons Reasons why google does not advice to do so, and counter measures