Pre-image resistance is the requirement that, given a digest Y = H(A), an attacker cannot feasibly recover the original input A. It is also called first pre-image resistance and expresses the one-way behavior of a hash function. section 6.2 section 6.5
A fixed-size digest compresses inputs of unlimited size, so collisions must exist in theory; pre-image resistance instead concerns the difficulty of reversing one chosen digest to its input. section 6.2 section 6.5
Keep these distinctions clear:
- Pre-image resistance asks for A when Y = H(A) is known. section 6.2
- Second pre-image resistance asks for a different B matching the digest of a known A. section 6.2
- Collision resistance asks for any pair of inputs with the same digest, without fixing the digest first. section 6.2
- Dictionary attacks weaken password secrecy by precomputing digests for likely valid passwords and performing reverse lookups. section 6.0 section 6.5
Password hash
A stored password digest should not reveal the exact password used to produce it. An attacker who obtains Y should face an infeasible search for A, although likely-password dictionaries can provide a practical attack path. section 6.2 section 6.5
Figure 6.4 Security properties of hash functions
Compare pre-image resistance with second pre-image and collision resistance in the security-property diagram. section 6.2

