0

For example, I have a string s and the MD5 of s is m. So is it possible for s=m.

Now it can be found by iterating through all possible combinations but there are 2^128 combinations to check through and I do not have the resources to do so. Is any such case possible and if it is possible then what is the case?

rramakrishnaa
  • 817
  • 7
  • 19
  • 1
    Why do you think there are `36^32` (about `6,3 * 10^49`) combinations? MD5 has 128 bit therefore the number of possible values is `2^128` (about `3,4 * 10^38`). You see, your number is way too large... – Robert Jun 02 '16 at 06:48
  • MD5 has 32 characters [0-9a-z] therefore 36^32. Correct me if I am wrong. – rramakrishnaa Jun 02 '16 at 06:51
  • No, MD5 has 128 bit and one character has 8 bit. Therefore you can have 128/8 = 16 characters. Also 36 is wrong as you have more than 36 printable ASCII characters. – Robert Jun 02 '16 at 06:54
  • 4
    `hashalg(x) = x` is called a *Fixed Point*, see http://stackoverflow.com/questions/235785/is-there-an-md5-fixed-point-where-md5x-x / http://crypto.stackexchange.com/questions/19578/is-it-possible-to-demonstrate-that-md5x-x-for-any-x – Alex K. Jun 02 '16 at 10:34
  • 1
    To clear it up: MD5 returns 128bit values, so you get 2^128 possible combinations. It is usually represented [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal), so each byte results in 2 characters of the alphabet [0-9,a-f]. That makes 16^32 combinations which is exactly the same (about 3E38 combinations). – martinstoeckli Jun 02 '16 at 10:48

0 Answers0