My situation:
Login password from a POST request is left in browser memory in clear text as long as cache is not cleared (manually/closing browser).
Connection is HTTPS.
Possible Solution:
- Generate public-key and private-key on server for each login request.
- Send public-key to browser.
- Use JavaScript to encrypt the password with the public-key and send to server.
- Decrypt using the private-key and validate.
- Delete keys after login.
My question is, is this feasible? Pros and Cons? Are there any security vs. performance considerations?
I've gone over a few questions like:
The first one doesn't really answer my question as I'm suggesting generating a new pair of keys on every request (which honestly is my biggest worry as far as feasibility and performance). The other two links seem to suggest that javascript crypto is basically pointless as long as you have an HTTPS connection. Thoughts?