Skip to main content

What Is a ‘Pre-Image Attack’ and How Does It Relate to Collision Resistance?

A pre-image attack is an attempt to find the original input data (the pre-image) that produced a given hash output. There are two types: first pre-image resistance (finding the input for a known hash) and second pre-image resistance (finding a different input that produces the same hash as a known input).

Collision resistance is a stronger property, requiring it to be hard to find any two inputs that hash to the same output. SHA-256 is designed to be resistant to all three.

What Is the Difference between a Preimage Attack and a Second Preimage Attack in Cryptography?
Besides Pre-Image Resistance, What Is Another Crucial Security Property of a Cryptographic Hash Function?
What Is “Pre-Image Resistance” in Hashing?
What Is the “Birthday Problem” in Cryptography and How Does It Relate to the Risk of Hash Collisions in SHA-256?