Re:Passwords in plain text
by jacobparker on Sunday June 22, 2014 @09:17AM
(#7927729)
Try to avoid directly invoking "SHA256" in your own security-related code.
good: http://en.wikipedia.org/wiki/PBKDF2
gooder: http://en.wikipedia.org/wiki/Scrypt
Maybe avoid using SHA256 with them because of Bitcoin ASICs. If your passwords get leaked in hashed form, even with these, you'll still want to tell your users and advise/force them to change their passwords. Forcing makes more sense if you have 2FA to something not likely to be accessible with their previous password (SMS maybe?)
At minimum, you need to add unique salt to each password. It forces the attacker to run dictionary on each account separately. It is also recommended to use different slower hash function or iterate MD5/SHA1 thousands times, so he will be much slower.