Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • It's important to note that while the crypt documentation refers to MD5, SHA256, SHA512 that they are not one application of the simple cryptographic hash function, but it uses en.wikipedia.org/wiki/Crypt_(C) which generally provide 1000 (MD5) to default of 5000 rounds of the cryptographic hash function. Commented Jun 6, 2013 at 16:16
  • @drjimbob Ah yes, should have mentioned that. :) Commented Jun 6, 2013 at 16:17
  • @drjimbob, Is this 5000 rounds of applying the same hash function to reduce the likelihood of a collision? It seems that repetitively applying the same hash function would only increase the amount of time it would take an attacker to brute force the hash rather than actually increasing the security of how the system handles passwords. Commented Jul 6, 2016 at 16:07
  • @sherrellbc - The 5000 rounds is to simply slow down brute force attacks by a factor of roughly 5000. See: en.wikipedia.org/wiki/Key_stretching The chance of salt+pw collision is extremely small -- there's an 8 character long base64 salt (64^8 ~ 2.8 x 10^14 different salts). So its quite unlikely two people would have both the same salt and password. Getting the hashes to collide by chance is negligible; if you used a billion computers each generating a trillion hashes per second, it would take over a billion years before it's likely for one pair of collisions with 256 bit hashes. Commented Jul 6, 2016 at 22:47