IT lexicon › Security › Preimage attack

Preimage attack

Security På svenska → Updated: 2026-10-12

An attack that tries to find a message producing a given hash value.

Given a hash value h, a preimage attack tries to find some message m such that H(m) = h. For an ideal hash function with n-bit output this takes about 2n attempts. That is harder than finding a collision, which takes about 2n/2 thanks to the birthday paradox.

For MD4 and MD5, attacks have pushed the cost below the ideal level. Against SHA-2 there are no practical preimage attacks. The gap between preimage resistance and collision resistance matters when you judge what an old hash still protects.

← Back to the lexicon