Speeding up Detection of SHA-1 Collision Attacks Using Unavoidable

Speeding up Detection of SHA-1 Collision Attacks Using Unavoidable

Speeding up detection of SHA-1 collision attacks using unavoidable attack conditions Marc Stevens, CWI; Daniel Shumow, Microsoft Research https://www.usenix.org/conference/usenixsecurity17/technical-sessions/presentation/stevens This paper is included in the Proceedings of the 26th USENIX Security Symposium August 16–18, 2017 • Vancouver, BC, Canada ISBN 978-1-931971-40-9 Open access to the Proceedings of the 26th USENIX Security Symposium is sponsored by USENIX Speeding up detection of SHA-1 collision attacks using unavoidable attack conditions Marc Stevens Daniel Shumow CWI Amsterdam Microsoft Research Abstract 1 Introduction Cryptographic hash functions, computing a small fixed- size hash value for a given message of arbitrary length, Counter-cryptanalysis, the concept of using cryptana- are a crucial cryptographic primitive that are used to se- lytic techniques to detect cryptanalytic attacks, was in- cure countless systems and applications. A key crypto- troduced at CRYPTO 2013 [23] with a hash collision graphic requirement is that it should be computationally detection algorithm. That is, an algorithm that detects infeasible to find collisions: two distinct messages with whether a given single message is part of a colliding mes- the same hash value. Industry’s previous de facto choices sage pair constructed using a cryptanalytic collision at- MD5 and SHA-1 are both based on the Merkle-Damgard˚ tack on MD5 or SHA-1. construction [18, 6] that iterates a compression function that updates a fixed-size internal state called the chaining Unfortunately, the original collision detection algo- value (CV) with fixed-size pieces of the input message. rithm is not a low-cost solution as it costs 15 to 224 times In 2004, MD5 was completely broken and real col- more than a single hash computation. In this paper we lisions were presented by Wang et al.[33, 35]. Their present a significant performance improvement for colli- collision attack consisted of two so-called near-collision sion detection based on the new concept of unavoidable attacks on MD5’s compression function where the first conditions. Unavoidable conditions are conditions that introduces a difference in the chaining value and the are necessary for all feasible attacks in a certain attack second eliminates this difference again. Hence, these class. As such they can be used to quickly dismiss par- so-called identical-prefix collisions had a limitation that ticular attack classes that may have been used in the con- the two colliding messages need to be identical before struction of the message. To determine an unavoidable and after these near-collision blocks. In 2007 Stevens condition one must rule out any feasible variant attack et al.[27] introduced chosen-prefix collisions for MD5 where this condition might not be necessary, otherwise that allowed arbitrary different prefixes. Irrefutable proof adversaries aware of counter-cryptanalysis could easily that hash function collisions indeed form a realistic and bypass this improved collision detection with a carefully significant threat to Internet security was presented at chosen variant attack. Based on a conjecture solidly sup- CRYPTO 2009 by Stevens et al. [29] by demonstrating a ported by the current state of the art, we show how we certificate authority that could issue two Certs with dif- can determine such unavoidable conditions for SHA-1. ferent keys that have the same hash value. We have implemented the improved SHA-1 collision More proof of the threat posed by collision attacks ap- detection using such unavoidable conditions and which is peared in 2012 when it became clear that not only aca- more than 20 times faster than without our unavoidable demic efforts have been spent on breaking hash func- condition improvements. We have measured that overall tions. Nation-state actors [20, 14, 13] have been linked our implemented SHA-1 with collision detection is only to the highly advanced espionage malware, so named a factor 1.60 slower, on average, than SHA-1. With the Flame, that was found targeting the Middle-East in May demonstration of a SHA-1 collision, the algorithm pre- 2012. As it turned out, it used a forged signature to craft sented here has been deployed by Git, GitHub, Google malicious windows updates. Drive, Gmail, Microsoft OneDrive and others, showing Despite the common knowledge that MD5 is insecure the effectiveness of this technique. for digital signatures effectively since 2004, even in 2017 USENIX Association 26th USENIX Security Symposium 881 there are still Industry issues in deprecating MD5 for sig- It is not the aim of SHA-1 collision detection to obviate natures [10]. SHA-1, designed by NSA and standardized the need to move to newer hash functions with longer di- by NIST [19], is also weak and was theoretically broken gests. Rather, SHA-1 collision detection is meant to be a in 2005 with a collision attack with an estimated com- mitigation used for deployed systems that are unable to plexity of 269 SHA-1 calls presented by Wang et al.[34]. migrate to a new hash function. In these cases, an imple- With real collisions for full SHA-1 out of reach at that mentation of SHA-1 with collision detection may be used time, there were efforts at producing collisions for re- as a drop in replacement. Such an update, that requires duced versions of SHA-1: 64 steps [3] (with a cost of 235 only changing the module responsible for hashing, is sig- SHA-1 calls), 70 steps [2] (cost 244 SHA-1), 73 steps [8] nificantly easier than redeploying an entire distributed (cost 250:7 SHA-1), the last being 75 steps [9] (cost 257:7 system, including revising protocols that currently rely SHA-1) in 2011. The cost of collisions for SHA-1 was on SHA-1. Collision detection for SHA-1 attacks is a improved to 261 SHA-1 calls at EUROCRYPT 2013 [24], thorough stop-gap solution that will provide security to together with a near-collision attack with cost 257:5 and systems and software that may not be able to migrate to a chosen-prefix collision attack with cost 277:1 SHA-1 newer hash functions before SHA-1 collisions become a calls, which remains the current state-of-the-art. Other viable security threat. The example of the well-known recent efforts focused on finding freestart collisions for version control system Git that relies very strongly on SHA-1, i.e., collisions for its compression function, with SHA-1 for integrity and even security is very amenable a 76-step freestart collision [12] (cost 250 SHA-1) and to such a solution. In fact at the time of writing, Git and more recently a freestart collision for full SHA-1 [26]. GitHub now use the improved SHA-1 collision detection Despite various efforts, an actual collision for SHA-1 re- of this paper by default. Our improved implementation mained out of reach for 11 years, but this year a SHA-1 is also being used by Google Drive, Gmail and Microsoft collision was finally announced by Stevens et al.[25]. OneDrive. This shows that SHA-1 collision attacks have finally be- Based on the latest results for the complexity of find- come practical. Furthermore, they provided several ex- ing a SHA-1 collision, the projected cost of such an at- amples of PDF file pairs that have the same SHA-1 hash, tack ranges from US$ 75 K and US$ 120 K by renting yet show distinct visual contents. low-cost computing resources on Amazon EC2 [22, 26], At CRYPTO 2013 the novel concept counter- which is significantly lower than Schneier’s 2012 es- cryptanalysis of using cryptanalytic techniques to detect timates. These projections resulted in the withdrawal cryptanalytic attacks was introduced in the form of a hash of CABForum Ballot 152 to extend issuance of SHA-1 collision detection algorithm [23]. This hash collision based HTTPS certificates, and in the deprecation of detection algorithm is able to expose cryptanalytic col- SHA-1 for digital signatures in the IETF’s TLS proto- lision attacks given only one message from a colliding col specification version 1.3. The recent SHA-1 collision message pair. It’s utility was immediately proven by us- paper further confirms these costs [25]. ing it to uncover the yet unknown chosen-prefix collision Unfortunately CABForum restrictions on the use of attack in Flame’s forged signature, regardless of the fact SHA-1 do not apply on Certification Authority certifi- that its sibling colliding file remains unknown. More- cates currently outside their CA program. E.g., it ex- over, it even enabled forensic analysis by recovering the cludes retracted CA certificates that are still supported internal differential paths, which were used in a recon- by older systems (and CA certificates have indeed been struction of the attack procedure and complexity [7]. retracted to circumvent CABForum regulations and con- In principle the collision attack detection provides tinue to issue new SHA-1 certificates 1 to serve to these strong guarantees: it guarantees detection of any variant older systems), and certificates for other TLS applica- collision attack in each tested attack class, whereas the tions including up to 10% of credit card payment sys- chance of false positives is as negligible as the chance of tems [31]. It thus remains in widespread use across the finding a random second preimage. However, so far there software industry for, e.g., digital signatures on software, is a significant cost: to detect collision attacks against documents, and many other applications, perhaps most SHA-1 (respectively MD5) costs the equivalent of hash- notably in the widely used Git versioning system. ing the message 15 (respectively 224) times, detecting It is very likely that SHA-1 is heading towards a simi- the 15 (respectively 224) best attack classes.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    19 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us