Jump to content

Preimage attack

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 89.75.117.235 (talk) at 09:31, 25 May 2010 (See also: Added link to Random oracle - The article mentions an ideal hash function, which essentially is the random oracle). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In cryptography, a preimage attack on a cryptographic hash is an attempt to find a message that has a specific hash value.
There are two types of preimage attacks:

  • First preimage attack: given a hash h, find a message m such that hash(m) = h.
  • Second preimage attack: given a fixed message m1, find a different message m2 such that hash(m2) = hash(m1).
  • For comparison, collision attack: find two arbitrarily different messages m1 and m2 such that hash(m2) = hash(m1).

For an n-bit ideal hash function, finding a first preimage or a second preimage has complexity 2n, which is considered too high for a typical output size of n=160 bits. If such complexity is the best that can be achieved by an adversary, then the hash function is considered first and second preimage resistant.

Some significant preimaging attacks have already been discovered, but they are not yet practical. If a practical preimaging attack is discovered, it would drastically affect many Internet protocols. In this case, "practical" means that it could be executed by an attacker in a meaningful amount of time for a meaningful amount of money. A preimaging attack that costs trillions of dollars and takes decades to preimage one desired hash value or one message is not practical; one that costs a few thousand dollars and takes a few weeks might be very practical.

All currently known practical or almost-practical attacks on MD5 and SHA-1 are collision attacks. A collision attack is easier to mount than a preimage attack. Actually, first and second preimage resistance can be reduced to collision resistance.[1]

See also

References

  • IETF RFC 4270: Attacks on Cryptographic Hashes in Internet Protocols
  1. ^ John Kelsey and Bruce Shneier, "Second preimages on n-bit Hash Functions for Much Less than 2n Work'", Eurocrypt, 2005. Springer [1] [2]