![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Lesson Four, Part 2 of online CGI courseby mdillon (Priest) |
on Jan 06, 2002 at 23:06 UTC ( [id://136698]=note: print w/replies, xml ) | Need Help?? |
What you are doing with Digest::MD5 is not actually a crypt-style MD5 digest. It is just a simple MD5 digest with a constant component (what you have erroneously called the "salt") tacked on the end of the digest source. While it is still better than storing the plain text directly, it is not as good as actual MD5 crypt. A good explanation of what MD5 crypt is beyond a simple MD5 hash, go here (read the larger presentation about bcrypt, as well, if you like). Whether your simple system actually needs to use a crypt-style system is up to you. The idea of crypt and cousins is to increase the computational cost of checking a password. The trade-off is between responsiveness for legitimate users and deterrence of brute-force and dictionary attacks. The simple MD5 hash is almost certainly lower on this scale that traditional, DES-based crypt, and definitely below MD5 crypt. In my case, I would probably choose MD5 crypt (or SHA crypt or bcrypt, if feasible), in most cases, since I like to do whatever simple things I can to make myself feel more secure. In terms of implementation, there are two possibilities that I'll mention (who knows what others there are):
Other than that complaint, I'd say what I've read of the course is generally quite well written, thought out, and researched.
In Section
Meditations
|
|