General Security Concepts

An auditor reports that a file-integrity tool using MD5 is unsafe because two different files can be crafted with the same digest. Which drop-in replacement is the best choice?

Show the answer

Correct answerB. SHA-256

AWhy not this: Also a hash, but practical collisions have been shown, so it carries the same weakness as MD5.

BWhy this is right: A one-way hash with fixed-size output and no practical collisions, so it replaces MD5 directly.

CWhy not this: A reversible symmetric cipher that needs a key; it is not a hashing algorithm.

DWhy not this: A checksum for error detection; it is easy to forge and not cryptographically secure.

SHA-256 is a one-way hash that is still collision resistant, so it can replace MD5 directly. SHA-1 is also a hash but has demonstrated collisions, so it repeats the problem. AES-256 is reversible encryption, not a hash.