1

I want to know whether it is possible to find out the salt of a MD5 hash? For instance we've got two MD5 hashes

helloworld -> fc5e038d38a57032085441e7fe7010b0
goodbyeworld -> b34266c1c9eda200a0ebb833281bb855

Is it possible to detect the salt world by having only the hashes?

  • No, it is not possible to detect the salt out of the hash, or hashes. – stanko Sep 6 '15 at 23:10
4

Given the hash output, one can always try to get lucky, and injecting random values until a match is found. In your example, any decent password cracker should try "helloworld" and "goodbyeworld" very quickly (like, within the first second of trying) because they are extremely classic password strings.

In a more general case: given a cryptographic hash function h, and the values h(m||x) and h(m'||x) for unknown values of m, m' and x, it is not feasible to recover m, m' or x except by being lucky in the sense of the previous paragraph (attacker tries exactly m||x as input). This holds for cryptographically secure hash function, and MD5, despite its weaknesses with regards to collisions (which are irrelevant here), is still "secure enough" for that.

(Of course, one must be aware that MD5 has no "salt", so any mention of MD5-with-a-salt really means "some custom, homemade, non-standard construction that involves MD5 and a value that the designer chooses to call 'a salt'". Generally speaking, homemade constructions shall be avoided.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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