Saturday, June 1, 2024
 Popular · Latest · Hot · Upcoming
107
rated 0 times [  113] [ 6]  / answers: 1 / hits: 48655  / 13 Years ago, mon, april 25, 2011, 12:00:00

I'm creating a server which can store cookies on the web that will contain application settings. The server will accept any data, but I want to encrypt all the settings before storing them in a cookie and decrypt them when reading them out. So I can store very sensitive data like Account Usernames & Passwords in the cookies and the server cannot do anything with it.



My question is now: What is the best way to encrypt such data with a password in JavaScript on the client side? What is the most secure?



I need some code that I can embed into my site and use it from there.


More From » encryption

 Answers
49

I'd recommend using AES encryption in your JavaScript code. See Javascript AES encryption for libraries and links. The trouble you'll have is picking a key that is only available on the client side. Perhaps you can prompt the user? Or hash together some client system information that's not sent to the server.


[#92575] Friday, April 22, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jaliyahcynthiac

Total Points: 91
Total Questions: 94
Total Answers: 119

Location: Vanuatu
Member since Wed, Oct 14, 2020
4 Years ago
;