7
$\begingroup$

Has there ever been a hash function that was actually used in the field, no matter how long ago, for which there is now a feasible preimage attack?

All hashes that are nowadays considered 'broken' (such as MD5 and MD4 and older, and to some extent also SHA-1) are only susceptible to collision attacks, i.e. generating two arbitrary chunks of data with the same hash.

I'm wondering if a successful preimage attack has ever been found for any hash algorithm? And I mean either kind of preimage attack:

  • Regular, i.e. given a hash output H, being able to generate some data X so hash(X) = H
  • Secondary, i.e. given data X, being able to generate some other data Y so hash(X)=hash(Y)

And with 'feasible' I mean it can be done on a reasonably powerful cluster of fast computers (with fast GPUs) within reasonable time (e.g. 6 months).

$\endgroup$

2 Answers 2

8
$\begingroup$

Any hash function? Yes, certainly. In fact, most hash functions are not even designed to be resistant to preimage attacks. This includes CRCs and standard checksums like Fletcher. Creating preimages with them is trivial. The oldest popular hash algorithm is MD2 which has a preimage attack with a complexity of 273 and a memory requirement of 273 memory blocks. The complexity is low enough that modern technology could achieve the preimage, but memory requirements make it impractical.

There have certainly been older hashes that have not gained traction which were intended to be cryptographically secure but which ended up exhibiting preimage attacks. For example, there is a 233 operation second preimage attack on the very old 3-pass Snefru hash function.

If you want a more specific answer, you'll need to narrow down what kinds of hash functions you are talking about. I could give you a dozen old or experimental hashes that were either dropped or underwent tweaks which were vulnerable to practical preimage attacks. I could also list every non-cryptographic hash I know of, but I have a feeling you aren't asking for a list of standard checksums.

$\endgroup$
9
  • $\begingroup$ Are you sure about 2^33? Is there anything better than described in this paper? $\endgroup$
    – Sjoerd
    Feb 5, 2019 at 9:53
  • 3
    $\begingroup$ My interpretation of the question is that it is only asking about hash functions which where intended to be resistant to preimage attacks when they were designed. As such CRC would be outside the scope of the question but MD2 would be an answer. I wonder if the memory usage of $2^{73}$ for that attack could be improved, which would make the answer a clear yes. $\endgroup$
    – kasperd
    Feb 5, 2019 at 10:29
  • 1
    $\begingroup$ @kasperd That's my interpretation as well. See the final sentence of the answer. $\endgroup$
    – forest
    Feb 5, 2019 at 11:24
  • 2
    $\begingroup$ I'm actually surprised to learn that even with something as old and insecure and broken as MD2, it's still extremely impractical (close to impossible) to do a preimage attack. $2^{73}$ complexity is actually still a lot nowadays in most situations (considering that a really fast setup would perform, what.. several hundreds of billions attempts per sec?) and the $2^{73}$ memory requirement makes it virtually impossible even today. $\endgroup$
    – RocketNuts
    Feb 5, 2019 at 14:34
  • 1
    $\begingroup$ @kelalaka It's not even close. The memory requirement is $2^{73}$ blocks, with each block being 512 bytes. $\endgroup$
    – forest
    Feb 6, 2019 at 3:35
1
$\begingroup$

TEA was used in the XBox and was so weak, that it allowed the XBox hackers to alter the code and still get the same hash:

https://web.archive.org/web/20090416175601/http://www.xbox-linux.org/wiki/17_Mistakes_Microsoft_Made_in_the_Xbox_Security_System

If you flip both bit 16 and 31 of a 32 bit word, the hash will be the same. We could easily patch a jump in the second bootloader so that it would not be recognized. This modified jump lead us directly into flash memory.

$\endgroup$
1
  • 4
    $\begingroup$ The attack on the XBox hash was a second-preimage attack, taking advantage of equivalent keys in TEA. TEA remains a secure (64-bit block, 128-bit key, about 124-bit effective key) block cipher. I would say: a TEA-based hash was used in the XBox and was so weak… $\endgroup$
    – fgrieu
    Jul 14, 2021 at 8:03

Your Answer

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

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