How to solve this problem? MD5 is a widely used hash function, primarily used as a checksum. The function md5(s) in the code cell below takes a string and returns its MD5 digest represented as a string of 32 hexadecimal digits. You are required to write a program that finds and prints the string of 3 lowercase English alphabet characters whose MD5 digest is 0b08bd98d279b88859b628cd8c061ae0
Asked
Active
Viewed 25 times
-2
-
2MD5, like most hashing functions, is a one-way function. That is, finding `y=MD5(x)` is an easy calculation. However, finding `x=InvertMD5(y)` is not "easy". Usually, you'd have to try all different input combinations until you find the value that matches your input. If you know what your string is 3 lowercase characters, generate a list of all possible 3-letter strings, MD5 each one of them, and compare it to your hash. – Aziz May 06 '22 at 17:22
-
2The question suggests that a three character string with the matching hash exists. Just brute force all three character strings. – timgeb May 06 '22 at 17:23
-
Iterate over all possible character combinations of length 3, calculate the md5 hash via `hashlib.md5(your_string).hexdigest()` and check whether this is the given hash. – linuskmr May 06 '22 at 17:24