Greetings, fellow monks
I'm creating an administrative CGI script for my neighborhood homeowners association's website, which will require login for board members. I've got it working, using MD5 crypt to encrypt the passwords stored in the database. (See update below) However, I just read that MD5 probably shouldn't be used for new development, and that SHA256 is a better choice. Looking on CPAN, it looks like my choices are between Digest::SHA::PurePerl by Mark Shelor, Digest::SHA256 by Rafael R. Sevilla, or Digest::SHA2 by Julius C. Duque.
My question is, which one of them to use (or maybe something else)? Does anyone with security experience have any recommendations?
I haven't been able to find any reviews on Perl Monks or the web at large.
Update: Sigh... Why do I even try to post just before going to bed?!?
I use crypt on the passwords before storing them in the database. During testing I noticed that only the first 8 characters of the password seemed to matter. I found on the web that that's the way crypt works. So I considered using MD5, which I'm currently using to create session IDs. While looking up info on MD5 to see if it was appropriate for that task, I found comments by Schneier (similar to ikegami's link below) that SHA256 would be a better choice.
So back to my original question, speed issues aside, is one of the CPAN modules better than another?
Thanks to syphilis for indirectly pointing out the embarrasing error in my original post!
Further Update: While doing some research this morning, I came upon this article : A Future-Adaptable Password Scheme. I haven't had a chance to read it all, but basically I think it's saying you don't want to use a fast hashing routine (which I guess MD5 is, for instance), because that makes brute force attacks quicker. You want to use a strong hash, but tune it so it makes brute forcing unacceptably slow. Food for thought, I guessTheEnigma
In reply to Would Like Recommendation for an SHA256 module by TheEnigma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |