in reply to Re^4: Would Like Recommendation for an SHA256 module
in thread Would Like Recommendation for an SHA256 module

Let's deal with 128 8-bit char strings.

For any given 16-byte md5 hash, there are (on average) 8 X 128-byte strings that will render that md5 digest.

One of these 128-byte strings is the original text.

Therefore the task is to find one of the other seven 128-byte strings that also generates the original md5, and also happens to be meaningful for your nefarious purposes.

My criteria states that the last 32-bytes of the 128-byte alternative text also happen to be hex digits.

That reduces the possible alternative texts by 32256 / 3222 by virtue of the fact that the last 32 characters have to be hex digits (0-9, a-f, A-F = 22).

Further, the fact that the remaining 96 bytes of the alternative text have to have an md5 that matches the 32 hex digits,and be meaningful for your nefarious purposes, again severally restricts the possibility that such a text exists, regardless of how hard it is for you to find it.

The thing that is being missed is that there are very few texts of any given length that will produce a given md5.

Even if you can use brute force to find them all, the probability any one of them will actually be readable english, (or executable code), never mind that it could be useful for your purposes, are fleetingly small.

Ignoring the criteria of the challenge is a little like entering a 9x9 sudoku game, but offering to only complete the center 3x3 part of the grid. It simplifies things a lot.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^5: Would Like Recommendation for an SHA256 module