Ars technica posted an article about the latest in cyber warfare from the stuxnet crew.

They key stretched MD5 by iterating it 10,000 times. It seems to be effective at handicapping HashCat's gpu acceleration. Had I been them I would have used bcrypt instead.

Why/When would someone prefer streched-md5 over bcrypt?
How is bcrypt superior to a strectched-MD5?

If you've got the math power $MD5(password)^n = bcrypt(password)$ solve for $N$.

  • 1
    $\begingroup$ You mention the MD5 iteration count, but not the bcrypt work-factor - in terms of security, there's a relationship between the two. The (loose) recommendation for PBKDF2 using SHA256 (a much more robust hash than MD5) in 2013 is somewhere in the order of 50000 to 100000 iterations (and increasing exponentially), so 10000 iterations of MD5 doesn't seem very secure. For low-entropy input such as passwords, Scrypt is widely considered to offer better security than Bcrypt and PBKDF2. One disadvantage of Bcrypt is that the output length is not configurable. $\endgroup$
    – hunter
    Mar 15, 2013 at 4:01
  • $\begingroup$ So what I'm pulling from comments and answers is that there isn't really reason the stuxnet crew used MD5 instead of a better password oriented hash. $\endgroup$
    – deft_code
    Mar 15, 2013 at 18:16
  • 2
    $\begingroup$ not an obvious reason, no. There are much, much stronger options which are quite commonplace, and not hard to implement. Look at the chart below; compared with PBKDF2 (using sha256, as below) key-stretching with MD5 and a similar number of iterations would be much weaker. $\endgroup$
    – hunter
    Mar 15, 2013 at 18:59

1 Answer 1


Any time there is a choice and password search is an issue, one should prefer scrypt or perhaps bcrypt to stretched-md5, or even PBKDF2.

The reason is that scrypt and bcrypt provide better security, by requiring a bigger investment in hardware (in particular, RAM) for the would-be password cracker, assuming parametrization yielding the same runtime for legitimate use. If enough RAM is available in legitimate use, the additional security obtained by using scrypt can be quite dramatic. See the following table from the paper Stronger Key Derivation via Sequential Memory-Hard Functions defining the Scrypt Password-Based Key Derivation Function.

Estimated cost of hardware to crack a password in one year

  • 1
    $\begingroup$ Best table ever. I just came across this a couple weeks ago when discussing the evernote breach and have since presented it to upper management. Also, there was a great talk on these types of hashing algorithms via Security Now #388. $\endgroup$
    – JZeolla
    Mar 21, 2013 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.