SHAttered: first practical collision for full SHA-1
CWI Amsterdam and Google published two different PDF files with the same SHA-1 hash (38762cf7f55934b34d179ae6a4c80cadccbb7f0a), the first public collision for the full hash function. The computation took about 2^63.1 SHA-1 compressions: roughly 6,500 CPU-years for the first block and about 110 GPU-years for the second, run on Google infrastructure.
Broken math. This entry concerns mathematics, algorithm design or parameter justification. Its stated scope distinguishes an attack from a defect in a security argument; a proof or accounting error alone does not establish practical key recovery.
Background
The attack implemented Stevens' 2013 identical-prefix design with GPU techniques from the 2015 freestart work. Both PDFs share a crafted prefix and differ only in two 512-bit collision blocks (bytes 193-320 of each file; 62 bytes actually differ), which steer how a JPEG embedded in the PDF is parsed and therefore which image is displayed. Because SHA-1 is Merkle-Damgard, the published prefix and blocks can be reused with other image pairs (within format constraints) at essentially no cost. The authors estimated the GPU phase alone would cost about US$110k on EC2 spot instances or US$560k on demand. Real-world impact came immediately: the WebKit Subversion repository broke within a day, Git and GitHub adopted collision detection, and Firefox finished disabling SHA-1 certificates the next day. What it did not do: break SHA-1 preimage resistance, HMAC-SHA-1, or let attackers collide with an existing third-party hash; it is an identical-prefix attack, so both documents must be prepared by the attacker. Google withheld attack code for 90 days and added detection to Gmail and G Suite.
Sources
- paperThe first collision for full SHA-1 (CRYPTO 2017)IACR ePrint, eprint.iacr.org
- announcementAnnouncing the first SHA1 collisionGoogle Online Security Blog, security.googleblog.com
- announcementSHAtteredCWI / Google, shattered.io