bituniverse / bitshares_wallet

The bitshares wallet app for Android devices.
https://play.google.com/store/apps/details?id=com.bitshares.bitshareswallet
MIT License
30 stars 45 forks source link

suggestion: don't force user to type in private key #5

Open o5j5vg55bv5hv5j5f8799f9 opened 6 years ago

o5j5vg55bv5hv5j5f8799f9 commented 6 years ago

Official client now generates private key for users that are ~50 character long alphanumerics.

Typing that in every time obviously very difficult.

Storing clear text alpha numeric or storing locally encrypted with software chosen key would be unsecure!

Solution:

  1. User would have to give the app their private key first time regardless.

  2. Ask user for a local pin number or short password - lets call it UNLOCK_KEY (e.g. 943615)

  3. Use Symmetric cryptographic algorithm like AES-256 to encrypt the private key with UNLOCK_KEY for storage on phone. symmetric ofc means same UNLOCK_KEY is used for encryption and decryption.

  4. When user exist the app and returns, request user to enter his UNLOCK_KEY, and use the UNLOCK_KEY to decrypt the stored encrypted private key to use in the active wallet.

Result: after first putting in private key when first setting up wallet, in all following uses a user only has to put in his pin number for example to access wallet - something they can remember (e.g. 943615)

protects user from keyloggers after 1st set up in the following uses doesn't force user to memorize private key or make it too simple doesn't require to type complicated cap-lowcap-numeric passwords every time doesn't rely on clear text stored private key which would be bad

Android/java package example for symmetric encryption:

o5j5vg55bv5hv5j5f8799f9 commented 6 years ago

this might actually be important for security:

don't make user type (private key and pin number) using random keyboards, that can be key logged.

have to make your own keyboard interface, especially for pin number big clear numbers can be really nice

plus it solves the issue of random android keyboards covering up screen in really annoying manner forcing you to hit back out of them and sometimes closing app