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

A preimage attack seeks to find the original input that generated a specific, known output hash. The attacker knows the output and wants the input.

A collision attack, conversely, seeks to find two different inputs that produce the same hash output. The specific output value is not pre-determined.

Both attacks target weaknesses in hash function security, but their goals and implications differ significantly for various cryptographic applications.

What Is a Second-Preimage Attack and How Does It Differ from a First-Preimage Attack?
What Is the Difference between a Preimage Attack and a Second Preimage Attack in Cryptography?
What Is ‘Collision Resistance’ in the Context of a Cryptographic Hash Function?
What Is a ‘Collision Resistance’ Property in Hashing and Why Is It Vital for Bitcoin?
What Is a Hash Collision and Is It a Threat to Blockchain Security?
What Is a Collision Attack and How Does It Relate to Hash Function Security?
What Is a Hash Collision and Why Is the Avalanche Effect Key to Preventing It in Cryptocurrencies?
What Is a Hash Collision and Why Is a 256-Bit Output Size Considered Resistant to It?

Glossar