Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
MD5
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Security== One basic requirement of any cryptographic hash function is that it should be [[computational complexity theory#Intractability|computationally infeasible]] to find two distinct messages that hash to the same value. MD5 fails this requirement catastrophically. On 31 December 2008, the [[CMU Software Engineering Institute]] concluded that MD5 was essentially "cryptographically broken and unsuitable for further use".<ref>{{cite web|last1=Chad R|first1=Dougherty|title=Vulnerability Note VU#836068 MD5 vulnerable to collision attacks|url=https://www.kb.cert.org/vuls/id/836068|website=Vulnerability notes database|publisher=CERT Carnegie Mellon University Software Engineering Institute|access-date=3 February 2017|date=31 Dec 2008|archive-date=26 July 2011|archive-url=https://web.archive.org/web/20110726144513/http://www.kb.cert.org/vuls/id/836068|url-status=live}}</ref> The weaknesses of MD5 have been exploited in the field, most infamously by the [[Flame malware]] in 2012. {{As of|2019}}, MD5 continues to be widely used, despite its well-documented weaknesses and deprecation by security experts.<ref name=Cimpanu2019/> A [[collision attack]] exists that can find [[collision resistance|collisions]] within seconds on a computer with a 2.6 GHz Pentium 4 processor (complexity of 2<sup>24.1</sup>).<ref>{{Cite thesis |degree=Master's |author=M.M.J. Stevens |date=June 2007 |title=On Collisions for MD5 |url=http://www.win.tue.nl/hashclash/On%20Collisions%20for%20MD5%20-%20M.M.J.%20Stevens.pdf |access-date=31 March 2010 |archive-date=17 May 2017 |archive-url=https://web.archive.org/web/20170517115509/http://www.win.tue.nl/hashclash/On%20Collisions%20for%20MD5%20-%20M.M.J.%20Stevens.pdf |url-status=live }}</ref> Further, there is also a [[chosen-prefix collision attack]] that can produce a collision for two inputs with specified prefixes within seconds, using off-the-shelf computing hardware (complexity 2<sup>39</sup>).<ref>{{Cite web |author1=Marc Stevens |author2=Arjen Lenstra |author3=Benne de Weger |date=16 June 2009 |title=Chosen-prefix Collisions for MD5 and Applications |website=École Polytechnique Fédérale de Lausanne |url=https://documents.epfl.ch/users/l/le/lenstra/public/papers/lat.pdf |access-date=31 March 2010 |archive-url=https://web.archive.org/web/20111109092157/https://documents.epfl.ch/users/l/le/lenstra/public/papers/lat.pdf |archive-date=9 November 2011 }}</ref> The ability to find collisions has been greatly aided by the use of off-the-shelf [[Graphics processing unit|GPUs]]. On an NVIDIA GeForce 8400GS graphics processor, 16–18 million hashes per second can be computed. An NVIDIA GeForce 8800 Ultra can calculate more than 200 million hashes per second.<ref>{{cite web | url = http://bvernoux.free.fr/md5/index.php | title = New GPU MD5 cracker cracks more than 200 million hashes per second. | access-date = 25 March 2011 | archive-date = 11 May 2011 | archive-url = https://web.archive.org/web/20110511121239/http://bvernoux.free.fr/md5/index.php | url-status = live }}</ref> These hash and collision attacks have been demonstrated in the public in various situations, including colliding document files<ref>{{cite web |author=Magnus Daum, [[Stefan Lucks]] |title=Hash Collisions (The Poisoned Message Attack) |work=[[Eurocrypt]] 2005 rump session |url=http://th.informatik.uni-mannheim.de/People/lucks/HashCollisions/ |archive-url=https://web.archive.org/web/20100327141611/http://th.informatik.uni-mannheim.de/people/lucks/HashCollisions/ |archive-date=27 March 2010 |df=dmy-all }}</ref><ref name=special-file-formats>{{Cite web |author1=Max Gebhardt |author2=Georg Illies |author3=Werner Schindler |title=A Note on the Practical Value of Single Hash Collisions for Special File Formats |website=National Institute of Standards and Technology |url=http://csrc.nist.gov/groups/ST/hash/documents/Illies_NIST_05.pdf |archive-url=https://web.archive.org/web/20080917182949/http://csrc.nist.gov/groups/ST/hash/documents/Illies_NIST_05.pdf |archive-date=2008-09-17 |date=31 October 2005}}</ref> and [[digital certificate]]s.<ref name="sslHarmful" /> As of 2015, MD5 was demonstrated to be still quite widely used, most notably by security research and antivirus companies.<ref>{{Cite web|title = Poisonous MD5 – Wolves Among the Sheep {{!}} Silent Signal Techblog|date = 10 June 2015|url = http://blog.silentsignal.eu/2015/06/10/poisonous-md5-wolves-among-the-sheep/|access-date = 2015-06-10|archive-date = 10 June 2015|archive-url = https://web.archive.org/web/20150610115424/http://blog.silentsignal.eu/2015/06/10/poisonous-md5-wolves-among-the-sheep/|url-status = live}}</ref> As of 2019, one quarter of widely used [[content management system]]s were reported to still use MD5 for [[password hashing]].<ref name=Cimpanu2019>{{Cite web|url=https://www.zdnet.com/article/a-quarter-of-major-cmss-use-outdated-md5-as-the-default-password-hashing-scheme/|title=A quarter of major CMSs use outdated MD5 as the default password hashing scheme|last=Cimpanu|first=Catalin|website=ZDNet|language=en|access-date=2019-06-17|archive-date=24 January 2021|archive-url=https://web.archive.org/web/20210124103125/https://www.zdnet.com/article/a-quarter-of-major-cmss-use-outdated-md5-as-the-default-password-hashing-scheme/|url-status=live}}</ref> === Overview of security issues === In 1996, a flaw was found in the design of MD5. While it was not deemed a fatal weakness at the time, cryptographers began recommending the use of other algorithms, such as [[SHA-1]], which has since been found to be vulnerable as well.<ref>{{cite web|url=http://ftp.arnes.si/packages/crypto-tools/rsa.com/cryptobytes/crypto2n2.pdf.gz|title=The Status of MD5 After a Recent Attack|author=Hans Dobbertin|work=CryptoBytes|volume=2|issue=2|date=Summer 1996|access-date=22 October 2013}}</ref> In 2004 it was shown that MD5 is not [[collision-resistant]].<ref>{{cite web|url=http://merlot.usc.edu/csac-f06/papers/Wang05a.pdf|title=How to Break MD5 and Other Hash Functions|author1=Xiaoyun Wang|author2=Hongbo Yu |work=Advances in Cryptology – Lecture Notes in Computer Science|volume=3494|pages=19–35|year=2005|access-date=21 December 2009|archive-url=https://web.archive.org/web/20090521024709/http://merlot.usc.edu/csac-f06/papers/Wang05a.pdf|archive-date=21 May 2009}}</ref> As such, MD5 is not suitable for applications like [[Transport Layer Security|SSL]] [[public key certificate|certificates]] or [[digital signature]]s that rely on this property for digital security. Researchers additionally discovered more serious flaws in MD5, and described a feasible [[collision attack]]—a method to create a pair of inputs for which MD5 produces identical [[checksum]]s.<ref name="autogenerated2">J. Black, M. Cochran, T. Highland: [http://www.cs.colorado.edu/~jrblack/papers/md5e-full.pdf A Study of the MD5 Attacks: Insights and Improvements] {{Webarchive|url=https://web.archive.org/web/20150101093005/http://www.cs.colorado.edu/%7Ejrblack/papers/md5e-full.pdf |date=1 January 2015 }}, 3 March 2006. Retrieved 27 July 2008.</ref><ref name="autogenerated1">Xiaoyun Wang, Dengguo ,k.,m.,m, HAVAL-128 and [[RIPEMD]], Cryptology ePrint Archive Report 2004/199, 16 August 2004, revised 17 August 2004. Retrieved 27 July 2008.</ref> Further advances were made in breaking MD5 in 2005, 2006, and 2007.<ref>Marc Stevens, Arjen Lenstra, Benne de Weger: [http://www.win.tue.nl/hashclash/SoftIntCodeSign/ Vulnerability of software integrity and code signing applications to chosen-prefix collisions for MD5] {{Webarchive|url=https://web.archive.org/web/20071213023720/http://www.win.tue.nl/hashclash/SoftIntCodeSign/ |date=13 December 2007 }}, 30 November 2007. Retrieved 27 July 2008.</ref> In December 2008, a group of researchers used this technique to fake [[SSL certificate]] validity.<ref name="sslHarmful">{{cite web |url=http://www.win.tue.nl/hashclash/rogue-ca/ |title=MD5 considered harmful today |last=Sotirov |first=Alexander |author2=Marc Stevens |author3=Jacob Appelbaum |author4=Arjen Lenstra |author5=David Molnar |author6=Dag Arne Osvik |author7=Benne de Weger |date=30 December 2008 |access-date=30 December 2008 |archive-date=25 March 2017 |archive-url=https://web.archive.org/web/20170325033522/http://www.win.tue.nl/hashclash/rogue-ca/ |url-status=live }} [https://events.ccc.de/congress/2008/Fahrplan/events/3023.en.html Announced] {{Webarchive|url=https://web.archive.org/web/20181116081156/https://events.ccc.de/congress/2008/Fahrplan/events/3023.en.html |date=16 November 2018 }} at the 25th [[Chaos Communication Congress]].</ref><ref name="browserflaw">{{cite web |url=http://news.cnet.com/8301-1009_3-10129693-83.html |title=Web browser flaw could put e-commerce security at risk |last=Stray |first=Jonathan |date=30 December 2008 |access-date=24 February 2009 |publisher=[[CNET.com]] |archive-date=28 August 2013 |archive-url=https://web.archive.org/web/20130828142658/http://news.cnet.com/8301-1009_3-10129693-83.html }}</ref> As of 2010, the [[CMU Software Engineering Institute]] considers MD5 "cryptographically broken and unsuitable for further use",<ref>{{cite web |url=http://www.kb.cert.org/vuls/id/836068 |title=CERT Vulnerability Note VU#836068 |publisher=Kb.cert.org |access-date=9 August 2010 |archive-date=21 March 2017 |archive-url=https://web.archive.org/web/20170321141233/http://www.kb.cert.org/vuls/id/836068 |url-status=live }}</ref> and most U.S. government applications now require the [[SHA-2]] family of hash functions.<ref>{{cite web |url=http://csrc.nist.gov/groups/ST/hash/policy.html |title=NIST.gov — Computer Security Division — Computer Security Resource Center |publisher=Csrc.nist.gov |access-date=9 August 2010 |archive-url=https://web.archive.org/web/20110609064344/http://csrc.nist.gov/groups/ST/hash/policy.html |archive-date=9 June 2011 }}</ref> In 2012, the [[Flame (malware)|Flame]] malware exploited the weaknesses in MD5 to fake a Microsoft [[digital signature]].<ref name="foo">{{cite web|url=http://blogs.technet.com/b/srd/archive/2012/06/06/more-information-about-the-digital-certificates-used-to-sign-the-flame-malware.aspx|title=Flame malware collision attack explained|access-date=7 June 2012|archive-url=https://web.archive.org/web/20120608225029/http://blogs.technet.com/b/srd/archive/2012/06/06/more-information-about-the-digital-certificates-used-to-sign-the-flame-malware.aspx|archive-date=8 June 2012}}</ref> ===Collision vulnerabilities=== {{Further|Collision attack}} In 1996, collisions were found in the compression function of MD5, and [[Hans Dobbertin]] wrote in the [[RSA Laboratories]] technical newsletter, "The presented attack does not yet threaten practical applications of MD5, but it comes rather close ... in the future MD5 should no longer be implemented ... where a collision-resistant hash function is required."<ref>{{Cite journal |url=ftp://ftp.rsasecurity.com/pub/cryptobytes/crypto2n2.pdf |journal=RSA Laboratories CryptoBytes |date=Summer 1996 |volume=2 |issue=2 |page=1 |title=The Status of MD5 After a Recent Attack |last=Dobbertin |first=Hans |access-date=10 August 2010 |quote=The presented attack does not yet threaten practical applications of MD5, but it comes rather close. ....{{sic}} in the future MD5 should no longer be implemented...{{sic}} where a collision-resistant hash function is required. }}{{Dead link|date=February 2020 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> In 2005, researchers were able to create pairs of [[PostScript]] documents<ref>{{cite web |url=http://www.schneier.com/blog/archives/2005/06/more_md5_collis.html |title=Schneier on Security: More MD5 Collisions |publisher=Schneier.com |access-date=9 August 2010 |archive-date=11 April 2021 |archive-url=https://web.archive.org/web/20210411035935/https://www.schneier.com/blog/archives/2005/06/more_md5_collis.html |url-status=live }}</ref> and [[X.509]] certificates<ref>{{cite web |url=http://www.win.tue.nl/~bdeweger/CollidingCertificates/ |title=Colliding X.509 Certificates |publisher=Win.tue.nl |access-date=9 August 2010 |archive-date=15 May 2017 |archive-url=https://web.archive.org/web/20170515022608/http://www.win.tue.nl/~bdeweger/CollidingCertificates/ |url-status=live }}</ref> with the same hash. Later that year, MD5's designer Ron Rivest wrote that "md5 and sha1 are both clearly broken (in terms of collision-resistance)".<ref>{{cite web |url=http://mail.python.org/pipermail/python-dev/2005-December/058850.html |title=[Python-Dev] hashlib — faster md5/sha, adds sha256/512 support |date=16 December 2005 |publisher=Mail.python.org |access-date=9 August 2010 |archive-date=6 May 2021 |archive-url=https://web.archive.org/web/20210506232819/https://mail.python.org/pipermail/python-dev/2005-December/058850.html |url-status=live }}</ref> On 30 December 2008, a group of researchers announced at the 25th [[Chaos Communication Congress]] how they had used MD5 collisions to create an intermediate certificate authority certificate that appeared to be legitimate when checked by its MD5 hash.<ref name="sslHarmful" /> The researchers used a [[PS3 cluster]] at the [[École Polytechnique Fédérale de Lausanne|EPFL]] in [[Lausanne]], Switzerland<ref>{{cite magazine|url=http://blog.wired.com/27bstroke6/2008/12/berlin.html|title=Researchers Use PlayStation Cluster to Forge a Web Skeleton Key|date=31 December 2008|magazine=Wired|access-date=31 December 2008|archive-date=21 April 2009|archive-url=https://web.archive.org/web/20090421023048/http://blog.wired.com/27bstroke6/2008/12/berlin.html|url-status=live}}</ref> to change a normal SSL certificate issued by [[RapidSSL]] into a working [[CA certificate]] for that issuer, which could then be used to create other certificates that would appear to be legitimate and issued by RapidSSL. [[Verisign]], the issuers of RapidSSL certificates, said they stopped issuing new certificates using MD5 as their checksum algorithm for RapidSSL once the vulnerability was announced.<ref>{{cite web|url=https://blogs.verisign.com/ssl-blog/2008/12/on_md5_vulnerabilities_and_mit.php|title=This morning's MD5 attack — resolved|last=Callan|first=Tim|date=31 December 2008|publisher=Verisign|access-date=31 December 2008|archive-url=https://web.archive.org/web/20090116180944/http://blogs.verisign.com/ssl-blog/2008/12/on_md5_vulnerabilities_and_mit.php|archive-date=16 January 2009}}</ref> Although Verisign declined to revoke existing certificates signed using MD5, their response was considered adequate by the authors of the exploit ([[Alexander Sotirov]], [[Marc Stevens (Cryptology)|Marc Stevens]], [[Jacob Appelbaum]], [[Arjen Lenstra]], David Molnar, Dag Arne Osvik, and Benne de Weger).<ref name="sslHarmful" /> Bruce Schneier wrote of the attack that "we already knew that MD5 is a broken hash function" and that "no one should be using MD5 anymore".<ref>{{cite web |author=Bruce Schneier |url=http://www.schneier.com/blog/archives/2008/12/forging_ssl_cer.html |title=Forging SSL Certificates |publisher=Schneier on Security |date=31 December 2008 |access-date=10 April 2014 |archive-date=9 November 2020 |archive-url=https://web.archive.org/web/20201109014745/https://www.schneier.com/blog/archives/2008/12/forging_ssl_cer.html |url-status=live }}</ref> The SSL researchers wrote, "Our desired impact is that Certification Authorities will stop using MD5 in issuing new certificates. We also hope that use of MD5 in other applications will be reconsidered as well."<ref name="sslHarmful" /> In 2012, according to [[Microsoft]], the authors of the [[Flame (malware)|Flame]] malware used an MD5 collision to forge a Windows code-signing certificate.<ref name="foo" /> MD5 uses the [[Merkle–Damgård construction]], so if two prefixes with the same hash can be constructed, a common suffix can be added to both to make the collision more likely to be accepted as valid data by the application using it. Furthermore, current collision-finding techniques allow specifying an arbitrary ''prefix'': an attacker can create two colliding files that both begin with the same content. All the attacker needs to generate two colliding files is a template file with a 128-byte block of data, aligned on a 64-byte boundary, that can be changed freely by the collision-finding algorithm. An example MD5 collision, with the two messages differing in 6 bytes, is: d131dd02c5e6eec4 693d9a0698aff95c 2fcab5{{Background color|#87CEEB|8}}712467eab 4004583eb8fb7f89 55ad340609f4b302 83e4888325{{Background color|#87CEEB|7}}1415a 085125e8f7cdc99f d91dbd{{Background color|#87CEEB|f}}280373c5b d8823e3156348f5b ae6dacd436c919c6 dd53e2{{Background color|#87CEEB|b}}487da03fd 02396306d248cda0 e99f33420f577ee8 ce54b67080{{Background color|#87CEEB|a}}80d1e c69821bcb6a88393 96f965{{Background color|#87CEEB|2}}b6ff72a70 d131dd02c5e6eec4 693d9a0698aff95c 2fcab5{{Background color|#87CEEB|0}}712467eab 4004583eb8fb7f89 55ad340609f4b302 83e4888325{{Background color|#87CEEB|f}}1415a 085125e8f7cdc99f d91dbd{{Background color|#87CEEB|7}}280373c5b d8823e3156348f5b ae6dacd436c919c6 dd53e2{{Background color|#87CEEB|3}}487da03fd 02396306d248cda0 e99f33420f577ee8 ce54b67080{{Background color|#87CEEB|2}}80d1e c69821bcb6a88393 96f965{{Background color|#87CEEB|a}}b6ff72a70 Both produce the MD5 hash <code>79054025255fb1a26e4bc422aef54eb4</code>.<ref>{{cite web |url=http://www.rtfm.com/movabletype/archives/2004_08.html#001055 |title=A real MD5 collision |author=Eric Rescorla |date=2004-08-17 |archive-url=https://web.archive.org/web/20140815234704/http://www.rtfm.com/movabletype/archives/2004_08.html#001055 |archive-date=2014-08-15 |work=Educated Guesswork (blog) |access-date=2015-04-13}}</ref> The difference between the two samples is that the leading bit in each [[nibble]] has been flipped. For example, the 20th byte (offset 0x13) in the top sample, 0x87, is 10000111 in binary. The leading bit in the byte (also the leading bit in the first nibble) is flipped to make 00000111, which is 0x07, as shown in the lower sample. Later it was also found to be possible to construct collisions between two files with separately chosen prefixes. This technique was used in the creation of the rogue CA certificate in 2008. A new variant of parallelized collision searching using [[Message Passing Interface|MPI]] was proposed by Anton Kuznetsov in 2014, which allowed finding a collision in 11 hours on a computing cluster.<ref>{{cite web | url=http://eprint.iacr.org/2014/871.pdf | title=An algorithm for MD5 single-block collision attack using high performance computing cluster | publisher=IACR | access-date=2014-11-03 | author=Anton A. Kuznetsov | archive-date=4 June 2016 | archive-url=https://web.archive.org/web/20160604093753/https://eprint.iacr.org/2014/871.pdf | url-status=live }}</ref> ===Preimage vulnerability=== In April 2009, an attack against MD5 was published that breaks MD5's [[preimage resistance]]. This attack is only theoretical, with a computational complexity of 2<sup>123.4</sup> for full preimage.<ref>{{Cite book|author1=Yu Sasaki |title=Advances in Cryptology - EUROCRYPT 2009 |volume=5479 |pages=134–152 |author2=Kazumaro Aoki |date=16 April 2009 |chapter=Finding Preimages in Full MD5 Faster Than Exhaustive Search |publisher=[[Springer Berlin Heidelberg]] |doi=10.1007/978-3-642-01001-9_8 |series=Lecture Notes in Computer Science |isbn=978-3-642-01000-2 }}</ref><ref>{{cite book |chapter=Construction of the Initial Structure for Preimage Attack of MD5 |publisher=[[Institute of Electrical and Electronics Engineers|IEEE]] Computer Society |year=2009|volume=1|pages=442–445|author=Ming Mao and Shaohui Chen and Jin Xu |title=2009 International Conference on Computational Intelligence and Security |doi=10.1109/CIS.2009.214|isbn=978-0-7695-3931-7 |s2cid=16512325 }}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
MD5
(section)
Add topic