I'm trying to figure the best solution for encrypting a user's login details locally and securely while using Electron. Ideally I'd like to secure them on the client computer vs using something like dynamodb where costs can be high while not sacrificing security.

My idea, which I think is similar to LastPass is to have the user create a master password and hash it with PBKDF2 SHA-256 and salted hashes. Then since I obviously can't hash login credentials since hashing is one way, I would use AES 256 bit encryption using something like crypto-js and only decrypt the login details if the user entering the master password has a match when comparing it to the master password key hash stored locally on user's computer. Since the user's master key or details never leave the client computer, I would think this is a security advantage vs doing something like transmitting the data to an encrypted database like dynamodb, but I could be wrong.

I appreciate any feedback or suggestions!

  • What kind of system are you building that you need to store login details on the client side in the first place? Mar 2 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.