What Is the Difference between a Preimage Attack and a Collision Attack in Hashing?

A preimage attack involves finding the original input (x) that maps to a specific, known hash output (H(x)). It is a reversal of the function.

A collision attack involves finding two different inputs (x and y) that produce the same hash output (H(x) = H(y)). Both attacks compromise the integrity of a hash function but target different security properties.

Collision resistance is often considered a stronger security requirement.

Besides Pre-Image Resistance, What Is Another Crucial Security Property of a Cryptographic Hash Function?
What Is the Concept of “Deterministic” Output in Hashing?
What Is a “Preimage Attack” and How Does It Differ from a Collision Attack?
What Is ‘Collision Resistance’ in the Context of a Cryptographic Hash Function?
What Is a Hash Collision and Why Is the Avalanche Effect Key to Preventing It in Cryptocurrencies?
How Does the Birthday Paradox Affect the Probability of a Collision Attack?
What Is a Collision Resistance Property in the Context of Cryptographic Hashing?
What Is the Difference between a Preimage Attack and a Second Preimage Attack in Cryptography?

Glossar