0
$\begingroup$

My intuition is that this is probably fairly unfeasible, but I'd like to ask anyway to see if I'm missing anything.

I have a list of 8-byte input (e.g. in hexadecimals: 00 00 00 00 00 00 4d ef). They were all appended at the end with the same but unknown 32-byte key, which is then passed through MD5 to generate hashes (for non-cryptographic purposes). And in case it matters, all the 8-byte inputs I know of start with 6 bytes set to zero.

In other words I have a series of entries calculated using $h_i = \text{MD5}(m_i \| k)$, for which I only know the input message $m$ and the hash output $h$ but not the key, which is the same for all entries.

My goal: I don't necessarily need to figure out the key. I would like to figure out what the MD5 hash would be for any 8-byte input message $m$ appended with the same 32-byte key $k$. Is there any feasible way to compute that?

$\endgroup$
3
  • 1
    $\begingroup$ "Hex" means "hexadecimals". Hexadecimals are a way to display or encode 4 bits (i.e. a nibble) as a character, usually for human consumption. According to your description the input is hexdecimal encoded when it is put into the MD5 function, and according to the example it would be lower case hexadecimals with spaces as separators. It is however unclear if you mean to do this or if the input is simply fed into MD5 as bytes, as binary and hex are often confused. $\endgroup$
    – Maarten Bodewes
    Commented Jun 30 at 11:11
  • $\begingroup$ @MaartenBodewes, I intended to feed them directly into MD5 as bytes $\endgroup$
    – nayfaan
    Commented Jun 30 at 17:28
  • 1
    $\begingroup$ I've edited your question to indicate how that should probably be worded. You are welcome to edit or rollback if you want to change anything of course. $\endgroup$
    – Maarten Bodewes
    Commented Jun 30 at 18:56

1 Answer 1

1
$\begingroup$

In this situation, the least impractical attack known is guessing the 32-byte (256-bit) key and checking that guess against the examples at hand. A successful guess is plain infeasible if said key is chosen anywhere near uniformly at random.

Even if the key was a 32-hex-characters key, that would still be 128-bit, and practically impossible to find, even with dedicated ASICs.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.