WordPress password hashing
-
So out of curiosity I went digging through the code today to figure out how wordpress was storing passwords. I was a little surprised to find that the underlying hash function used in the phpass class was md5.
The reason given in the code is as follows:
We’re kind of forced to use MD5 here since it’s the only cryptographic primitive available in all versions of PHP currently in use
Keep in mind that this class was written in 2006 (according to the comments).
The sha1 function was introduced in PHP 4.3 (in 2002), which is also the minimum version of PHP required by wordpress. I wonder if it is time to consider updating that code.
To be honest I’m not certain of the issues that would arise from changing password storage method.
If you look at the code there is a lot going on beyond md5, but I still wonder how much more collision resistant the resulting hash is compared to md5. From wikipedia:
The security of the MD5 hash function is severely compromised. A collision attack exists that can find collisions within seconds on a computer with a 2.6Ghz Pentium4 processor (complexity of 2^24.1)
- The topic ‘WordPress password hashing’ is closed to new replies.