Graph
Preimage Resistance

🔒Preimage Resistance

NEW

The difficulty of finding any input that hashes to a given output.

DESCRIPTION

Preimage resistance is a core property of cryptographic hash functions, ensuring it is computationally infeasible to find a message producing a specific hash value. It underpins password storage, signatures, and integrity checks. Strong preimage resistance depends on hash algorithm design and output length. Weaknesses enable attacks like rainbow tables or specialized hardware brute force. NIST standards define and recommend approved algorithms.

ALTERNATIVE DEFINITIONS

NIST FIPS 180-4

Given a hash value h, it is computationally infeasible to find any message m such that H(m) = h.

Formal property definition within Secure Hash Standard.

Source

Wikipedia

A preimage attack in cryptography is a method to find a message that has a given hash value.

Defines the attack counterpart to the resistance property.

Source

OWASP

Cryptographic hash functions should be one-way, making it infeasible to recover the original password from its hash.

Practical guidance linking one-wayness to secure password storage.

Source

Cryptographic Hash Function SHA-256 One-Way Function OWASP Digital Signature MAC Entropy Brute-Force Attack

COMPETING TERMS

Second Preimage Resistance Collision Resistance

KNOWLEDGE AREAS

Data Security Software Engineering Infrastructure

TARGET AUDIENCE

Security Architect Cybersecurity Engineer Chief Information Security Officer Software Developer DevOps Engineer Cloud Architect

EXTERNAL SOURCES

  • Wikipedia - Preimage attack
  • NIST - Secure Hash Standard defining properties
  • IETF - SHA implementations and guidance
  • OWASP - Security best practices overview

TOP QUESTIONS

What is Preimage Resistance in hashing?

It means it is computationally infeasible to find any input that produces a specific hash output, supporting one-way properties.

Category: Definition

How does Preimage Resistance differ from Collision Resistance?

Preimage targets matching a given hash; collision resistance prevents finding two distinct inputs with the same hash.

Category: Distinction

Why is Preimage Resistance important?

It is critical for password storage, digital signatures, and integrity verification, preventing reversal or targeted forging.

Category: Relevancy

What attacks threaten Preimage Resistance?

Brute force, rainbow tables, and algorithm-specific weaknesses reduce the effective difficulty of finding preimages.

Category: Risks

How do longer hash outputs affect Preimage Resistance?

Longer outputs exponentially increase search space, strengthening resistance against brute-force attacks.

Category: Opinion

Which standards define Preimage Resistance?

NIST FIPS 180-4 and SP 800-107 provide definitions and usage recommendations for approved hash algorithms.

Category: Overview

How can developers enhance Preimage Resistance in systems?

Use approved algorithms, proper salting and key stretching, and avoid outdated hashes like MD5 or SHA-1.

Category: Best-Practices

Is Preimage Resistance enough for password storage?

No. Use memory-hard functions (bcrypt, scrypt, Argon2) and strong policies to mitigate offline attacks.

Category: Requirements

How to monitor for hashing weaknesses in production?

Track vulnerability advisories, enforce library updates, run security audits, and deprecate weak algorithms promptly.

Category: Observability