rsa - How to store password on Android -
i looking understand android keystore purpose of storing passwords on device. (https://developer.android.com/training/articles/keystore.html)
in article says "use android keystore provider let individual app store own credentials app can access." want.
so think way work like: 1) generate rsa key
2) store privatekey in keystore
3) store publickey in shareprefs
4) encrypt password using publickey
5) encrypt password using privatekey.
however think misunderstanding because article not show
1) how save privatekey keystore (i don't see api showing how keystore added key)
2) not show how decrypt data privatekey
infant why article talking "use privatekey in keystore create signature on data." mean create signature on data ??? (i want decrypt data privatekey). , why want verify "signature made privatekey".
so lost @ point ... article started me of in right place end confused trying achieve.
can suggest if trying makes sense @ ? or should save public , private key in own db ? (not security there best can given requirement of storing password on device).
many thanks
rgds !!!!
i quoting line using internal storage section of http://developer.android.com/training/articles/security-tips.html default, files create on internal storage accessible app. protection implemented android , sufficient applications.
now encryption: keystore api dealing encryption of data. , keys used secure communication , not storing password. passwords irreversible hashes or maps. , not require decryption needs matching.
for example: communication if send data encrypted other party involved in communication needs know data required decryption key. if have sent "hello crypted" receiver must know sent "hello crypted" message.
for password if enter passphrase or passkey needs matched stored counterpart. if "pass123" password stored "rdi#$$+!@/b" when enter password when process checking algorithm should match stored value , authenticated not required generate "pass123".
so, application can use mechanism(that generates unique , irreversible hash) generate unique key/hash when password entered , store in app data.
Comments
Post a Comment