Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I was trying to understand MD5 and got stuck with this question, its from Michael sipser's book on Information security Principles and Practice, 2nd edition

The MD5 collision in Problem 25 is said to be meaningless since the two messages appear to be random bits, that is, they do not carry any meaning. Currently, it is not possible to generate a meaningful collision using the MD5 collision attack. For this reason, it is sometimes claimed that MD5 collisions are not a significant security threat. The goal of this problem is convince you otherwise. Obtain the file MD5_collision. zip from the textbook website and unzip the folder to obtain the two Postscript files, rec2.ps and auth2.ps.

THe zip file is at this link : http://www.cs.sjsu.edu/~stamp/infosec/files/MD5_collision.zip

The question asked was:

c. Modify rec2. ps and auth2. ps so that they display different messages than they currently do, but they hash to the same value. What are the resulting hash values?

In this question, we have to modify both the files such that their hash is same again (They have the same hash before modification). The problem is that whenever I change anything and try to make it same in both files, still the hash value changes.

Technically the hash should be same, as the author is calculating the MD5 using the IV's hash value. Thus if we do not modify the value before eq{ , then it should have the same hash value if both files have same modifications.

This does not happen, please help. (I am editing it using Notepad)

share|improve this question
    
Use HxD –  fgrieu Oct 7 '13 at 6:19
    
I tried editing it with HxD, still the same problem that both the file hash to diferent values –  chettyharish Oct 7 '13 at 6:34
    
That seems to work, but I still don't understand how it works, can someone explain me what's happening. –  chettyharish Oct 7 '13 at 19:03
    
uh, it's not a homework question, I am just reading the book to learn. Anyways I will try to decipher what you said :P –  chettyharish Oct 7 '13 at 19:30
1  
Hint (reworded): Based on the structure of MD5, determine if starting from two different files of equal length, when you add the same arbitrary data to these, it is a) certain, b) probable, c) improbable, or d) impossible that the resulting files collide, depending on if the original files collide, and their length. Now, using HxD, shorten the two files to the size corresponding to three MD5 data blocks: do they collide? Conclude. –  fgrieu Oct 7 '13 at 19:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.