Introduction
A secure one-way hash function needs to satisfy two properties: the
Introduction
A secure one-way hash function needs to satisfy two properties: the one-way property and the collision- resistance property. The one-way property ensures that given a hash value h, it is computationally infeasible to find an input M, such that hash(M) = h. The collision-resistance property ensures that it is compu- tationally infeasible to find two different inputs M1 and M2, such that hash(M1) = hash(M2).
Several widely-used one-way hash functions have trouble maintaining the collision-resistance prop- erty. At the rump session of CRYPTO 2004, Xiaoyun Wang and co-authors demonstrated a collision attack against MD5 [1]. In February 2017, CWI Amsterdam and Google Research announced the SHAttered at- tack, which breaks the collision-resistance property of SHA-1 [3]. While many students do not have trouble understanding the importance of the one-way property, they cannot easily grasp why the collision-resistance property is necessary, and what impact these attacks can cause.
The learning objective of this lab is for students to really understand the impact of collision attacks, and see in first hand what damages can be caused if a widely-used one-way hash function’s collision-resistance property is broken. To achieve this goal, students need to launch actual collision attacks against the MD5 hash function. Using the attacks, students should be able to create two different programs that share the same MD5 hash but have completely different behaviors. This lab covers a number of topics described in the following:
One-way hash function, MD5
The collision-resistance property • Collision attacks
Readings. Detailed coverage of the one-way hash function can be found in the following:
Chapter 22 of the SEED Book, Computer & Internet Security: A Hands-on Approach, 2nd Edition,
by Wenliang Du. See details at https://www.handsonsecurity.net.
Lab Environment. This lab has been tested on our pre-built Ubuntu 20.04 VM, which can be downloaded from the SEED website. The lab uses a tool called “Fast MD5 Collision Generation”, which was written by Marc Stevens. The name of the binary is called md5collgen in our VM, and it is installed inside the /usr/bin folder. If it is not there, you can download it from the lab’s website (inside Labsetup.zip). If you are interested in installing the tool to your own machine, you can download the source code directly from https://www.win.tue.nl/hashclash/.
Acknowledgment This lab was developed with the help of Vishtasp Jokhi, a graduate student in the De- partment of Electrical Engineering and Computer Science at Syracuse University.
Copyright © 2018 by Wenliang Du.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. If you remix, transform, or build upon the material, this copyright notice must be left intact, or reproduced in a way that is reasonable to the medium in which the work is being re-published.
SEED Labs – MD5 Collision Attack Lab 2