The three resistance properties
A cryptographic hash function must satisfy three distinct properties — each strictly weaker than the next:
- Preimage resistance (one-wayness): given , it is infeasible to find any such that . Cost: .
- Second-preimage resistance: given , it is infeasible to find such that . Cost: .
- Collision resistance: it is infeasible to find any pair with and . Cost: by birthday paradox.
Collision resistance is hardest to achieve and hardest to prove. MD5 and SHA-1 are collision-broken — real collisions are known and constructible in minutes. Never use them for integrity or signatures; they remain acceptable only for non-security checksums.
