3 ms·
Surely storing the passwords in plain text and making them available to users are two separate points? If you really did want to be able to recover passwords t
by arethuza 16y ago
Surely storing the passwords in plain text and making them available to users are two separate points?
If you really did want to be able to recover passwords then at least encrypt them and store the key(s) outside of the database (with options varying from "in a configuration file somewhere" through to hardware security modules at the other extreme).
[Edit: for the avoidance of doubt I think storing passwords in any recoverable form is highly dubious]
- rmc 16y agoIf your encryption key is stored with the databases you haven't gained much. The best thing to do is hash the passwords. It's quite common for people to say "encrypt the passwords" when they mean "hash the passwords".
- StavrosK 16y agoBut then they're not recoverable, which is what the GP is talking about.
- roc 16y agoThere's no benefit to recovering a current password. If you can determine that the requesting user should be able to receive the current password, you can skip that step and just ask them to set a new one.
- arethuza 16y agoYou can probably do rather better than the usual approach of a general purpose hashing algorithm and a salt: http://codahale.com/how-to-safely-store-a-password/ http://codahale.com/how-to-safely-store-a-password/