https://news.ycombinator.com/item?id=614079
However, it appears no one has actually discovered it yet, if it exists.
A more tractable question might be to find a cycle in the MD5 hash space, like a->b->c->d->a. So one might ask, what is the shortest MD5 cycle found so far?
Assuming MD5 is random, this is the birthday problem. Since MD5 is 128 bits, you need about 10^19 hashes to get a repeat. [1]
The MD5 hashrate on an RTX 3090 is about 65 billion hashes per second. [2]
Dividing that out, about 4 GPU-years would be needed to find a repeat in this brute-force way.
[1] https://en.wikipedia.org/wiki/Birthday_attack#Mathematics
[2] https://gist.github.com/Chick3nman/e4fcee00cb6d82874dace7210...
As long as you can keep 31 partial hashes in memory at a time, which is trivial, you don't have to rerun the work so far to increment the last digit by 1. I think I may have written the code for this at one point. I'll have to look around and see if I can find it.
I think the math still works if you do that. But the cycle would have to be contained entirely within one of the individual runs. So that could potentially take longer.
The tricky part would be combing through the 160 exabytes of output to find the cycle.
I guess it should be pretty likely to exist if you try them all, but the search is likely very computationally difficult unless I'm forgetting some particular weakness in md5 (quite possible).