It may be time to retire MD5. The MD5 Message-Digest Algorithm
RFC says that "It is conjectured that it is computationally
infeasible to produce two messages having the same message digest, or to
produce any message having a given prespecified target message
digest." At the time, this may have been true -- the RFC was written
in 1992 -- but a number of researchers are finding that MD5 hashes aren't
as unique as one might like.
Within the last year several researchers have come forward with results
that show it's possible to create meaningful collisions of MD5 hashes. Dan
Kaminsky published "MD5 to
be considered harmful someday" (PDF) in December 2004; this paper
describes the creation of two executables with the same MD5 hash using a tool
called Stripwire (available here). Kaminsky writes
that this would be an "excellent vector for malicious developers to
get unsafe code past a group of auditors, perhaps to acquire a required
third party signature."
Alternatively, build tools themselves could be compromised to embed safe
versions of dangerous payloads in each build. At some later point, the
embedded payload could be safely "activated", without the MD5
changing. This has implications for Tripwire, DRM, and several package
management architectures.
Kaminksy isn't the only one to find ways around MD5. Vlastimil Klima
published Finding MD5 Collisions
- a Toy For a Notebook in March of this year, where he describes
finding MD5 collisions in 8 hours on a notebook PC with a 1.6 GHz
Pentium. Arjen Lenstra, Xiaoyun Wang and Benne de Weger published "a method for
constructing pairs of X.509 certificates where the "to be signed" parts
of the certificates form a collision for MD5. Xiaoyun Wang and Hongbo Yu
published a paper this year on how to break
MD5 (PDF) and other hash functions.
Now Stefan Lucks and Magnus Daum have come up with a method for
creating two documents with the same digital signature. Lucks and Daum
describe creating two postscript documents, using Wang and Yu's attack,
that have meaningful content and the same MD5 hash. They describe a
scenario between "Alice and her boss" where Alice creates two postscript
documents with the same MD5 hash. One, which is presented for a digital
signature, is a letter of recommendation - the other is a document granting
"Alice" access to confidential information.
The files are available for download from the Institute for Cryptology and
IT-Security website. If one opens the files with a text editor, the
content for both the letter of recommendation and the order are present,
but manipulated so that only one letter is displayed in a normal postscript
viewer. Lucks and Daum demonstrate that the MD5 hash collision attacks are
not just hypothetical attacks with no practical applications.
Given the number of practical attacks on MD5, it may be time to move to a
Federal
Information Processing Standards (FIPS) approved hash algorithm, such
as SHA-256, or SHA-512. Note that vulnerabilities have recently
been found in SHA-1, however, and NIST is already planning to phase it out by
2010.
(
Log in to post comments)