5 ms·
I don't think it's demonstrating anything other than: 1) many developers don't use salts / HMAC 2) MD5 is popular 3) hashed passwords end up on Google
by bad_user 15y ago
I don't think it's demonstrating anything other than:
1) many developers don't use salts / HMAC
2) MD5 is popular
3) hashed passwords end up on Google
From these 3 points I don't think it follows that MD5 is horrible.
Any hashing function would have the same issues, simply because a hashing function is a mathematical function, so for any X from the domain of definition, H(X) will always have the same value, on every call. Therefore, if a hashing method is popular enough and developers don't salt their hashes, then hashes for common passwords will inevitably end up on Google. However, if you salt your hash calls with your own key, the hashes produced will be different from everybody else's.
- carbocation 15y agoIf using your own salt is all you do, you'd still be susceptible to easy statistical attacks once someone compromises your database. But, yes, they probably wouldn't be available on google.
- seabee 15y agoIf using MD5 is all you do, you'd still be susceptible to brute force attacks. MD5 is a really fast hash to compute, salting or not. The solution is to pick a better algorithm and learn how to use it securely. That probably won't happen unless all the ridiculous PHP 'security' tutorials are erased from the history of the internet and only correct methods are shown.
- carbocation 15y agoDefinitely. I'm just saying that I could recover the common passwords with a 486 instead of a GPU :)
- dhimes 15y agoDo you have a reference that you would consider "the minimum you should know?" And, perhaps, maybe one somewhat better than that one? TIA.
- tptacek 15y agoYes: http://codahale.com/how-to-safely-store-a-password/ http://codahale.com/how-to-safely-store-a-password/ This is the answer to this question. You should bookmark it and share it with your peers when this question inevitably comes up on another thread.
- dhimes 15y agoOK, so this is still the definitive thinking. I think you've told us about this before. Thanks again.
- almost 15y agoJust remember "use bcrypt" and you should be fine. There is almost certainly a library for it for your language.
- bad_user 15y agoIf using MD5 is all you do, you'd still be susceptible to brute force attacks. Only if you know the algorithm and salt used (i.e. your source code is also compromised, not just your database). Otherwise, demonstrate to me how you can find the passwords that relate to these hashes (all of them use the same salt): 23C206503ABD36FCB575FC8F12791CF0 D82BDB4160F60B657D6F994B553D2E63 0DA0572E042F822F91772F14269548E6 CB8BF6C16029400885F9A68A17576FA7 7CE4F679810409CF1477CF142B481EF9 It should be easy, right?
- rimantas 15y agoYou ommited this: > MD5 is a really fast hash to compute, salting or not. Just spend some time thinking about this.
- bad_user 15y agoYes MD5 is fast to compute and ... NO, in the example I've given it really does not matter much. As I said, it should be easy cracking those hashes right? Prove me wrong.
- burgerbrain 15y ago"Prove me wrong." This is not how discussions in this topic work.
- JoachimSchipper 15y agoIt's somewhat optimistic to assume that the adversary knows no passwords - even if you can't create a user, phishing one isn't that hard. That makes recovering the salt much easier.
- bad_user 15y agoWell yeah, but then you're proposing a brute force against the salt and the salt can be anything of any length. So if you're assuming a salt that can contain standard latin letters and digits and is 256 in length, that's 62^256 possible variations. Do note that I'm not saying here that MD5_HMAC doesn't have flaws, but it definitely doesn't have the same flaws as MD5, cracking it ain't easy and I can't find a reference for an instance in which this was actually done.
- asharp 15y agoI don't believe you understand what the salt is for. You use a salt so that time/space tradeoff attacks are no longer viable. All you need to do is provide a few bits (say 20) of entropy to make them infeasable.
- bdhe 15y agoThink of (3) as saying without salting, with Google and the internet, the precomputed tables that are used for brute-force attacks are already out there and can be queried with a simple Ruby program.
- aparadja 15y agoPerhaps I should have written it as "unsalted MD5" instead of "plain MD5" to avoid confusion. Unsalted MD5, in my opinion, is horrible. MD5 plays it's part in the mess: it's quick to calculate, which means that anybody can churn out huge lookup databases. Missing salts make those databases universally usable.
- TillE 15y ago> huge lookup databases "Huge" being the key word here. Try searching for the md5sums of arbitrary 8-character alphanumeric passwords. You won't find many results. 62^8 is a big number.
- aparadja 15y agoCovering the whole solution space would be an enormous (as compared to just huge) undertaking. But if you limit yourself to the types of passwords people usually use, you can prune it down quite a bit. The currently available databases are surprisingly large, even if not in the scale of 62^8. Consider a random pick from decrypt.fr: "phytostrote972". It's far from a random string, but not exactly a trivial one either.
- Freaky 15y ago> Covering the whole solution space would be an enormous (as compared to just huge) undertaking A HD 5870 can churn through MD5s at about 2.8 billion/sec - 62^8 inside 24 hours on a single unremarkable GPU.
- mattmanser 15y agoYou can download rainbow tables as torrents. 8-character alphanumeric are the ones that are being offered today, it's only going to go up as GPUs get better and HD space/bandwidth increases.
- nobody3141592 15y agoI believe that with GPUs it's now faster to calculate possible MD5s on-the-fly than use rainbow tables. Hence the current advice is to use "alongpassphraseasyourpassword" rather than "L33$Pa55wd"