drum
drum

Reputation: 5651

How to get MD5 original message if partial message is known?

Suppose I have m1 and md5(m1+m2). How do I recover m2?

Upvotes: 1

Views: 335

Answers (2)

user515430
user515430

Reputation: 3351

Nick's answer is correct.

I just want to point out that if you know the length of m2 and if is not too long, you could in principle try all possible values of m2 until you find a match with md5(m1+m2). For example if m1 is the salt of a password and m2 is the actual password what I just outlined is indeed possible. In most cases the length of m2 would be 8-12 characters. If you restrict yourself to characters you can enter from a standard keyboard, the above is very possible and is indeed used to crack passwords.

Upvotes: 6

Nick Johnson
Nick Johnson

Reputation: 101149

You can't. Secure hashes, by design, cannot be reversed. Quite apart from which, there are fewer MD5 hashes (2^128) than there are possible values for m2 (effectively infinite), so it's impossible for there to be a single unique correct answer anyway.

Upvotes: 7

Related Questions