What Is a Preimage Attack in Cryptography?

A preimage attack is a cryptographic attack where an attacker attempts to reverse a one-way function, such as a hash function. Given a hash output (the image), the goal is to find the original input (the preimage) that produced it.

A strong hash function should be preimage resistant, meaning it is computationally infeasible to find the input. If a preimage attack is successful, it can compromise the security of systems like password storage or digital signatures.

This attack targets the fundamental security property of a hash function.

What Is a “Preimage Attack” and How Does It Differ from a Collision Attack?
What Is a ‘Pre-Image Attack’ and How Does It Relate to Collision Resistance?
How Is a Hash Function’s “Pre-Image Resistance” Relevant to Blockchain Security?
What Is “Pre-Image Resistance” in Hashing?
What Is a Second-Preimage Attack and How Does It Differ from a First-Preimage Attack?
What Is the Difference between a Hash Function and an Encryption Algorithm?
What Role Does a Cryptographic Hash Play in the Concept of a “Smart Contract”?
What Is the Difference between a Preimage Attack and a Second Preimage Attack in Cryptography?

Glossar