Collision Resistance
Cheat sheet · https://pcornel.dk/topic.php?topic=4712
Answer
Collision resistance means it is practically impossible to find two different inputs with the same hash. MD5 and SHA-1 have lost it, so use SHA-256 or stronger for signatures and integrity.
Remember
- MD5 and SHA-1 have practical collisions.
- Use SHA-256 or stronger.
- Collisions break signature trust.
First checks
- Algorithm collision status — SHA-2/3 secure, MD5/SHA-1 broken
- Signature schemes using hashes — certificate algorithms
- Use of HMAC vs plain hash — MAC design
Verify in this order
two inputs → same digest (should be infeasible)
Where it usually breaks
First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4712