chainconnect / phoenix-wallet

A Solana non-custodial wallet implementation
1 stars 0 forks source link

Encrypt/decrypt private key for localstorage #5

Open kranthicodes opened 2 years ago

kranthicodes commented 2 years ago

Problem

When someone creates / Imports a wallet with phoenix app, we currently store their private key in localstorage so that when they revisit the app, we can show their wallet using the private key. But this is not safe though we store it in user's machine and would need to be encrypted followed by password based auth mechanism flow similar to phantom or metamask.

Research

https://stackoverflow.com/questions/28364430/best-way-to-store-private-crypto-key-in-browser#:~:text=You%20should%20use%20a%20symmetric,e.g.%20second%20layer%20of%20AES).

https://crypto.stackexchange.com/questions/35530/where-and-how-to-store-private-keys-in-web-applications-for-private-messaging-wi

kranthicodes commented 2 years ago

will keep updating this issue as i find more ways to do this