Question: Write a function birthday1() that returns a tuple (s; t; n); where s and t are different ASCII strings whose SHA-1 hashes have the same

Write a function birthday1() that returns a tuple (s; t; n); where s and t are different ASCII strings whose SHA-1 hashes have the same high-order 40 bits (same 10 initial hex digits). The last component n of the return value is the number of calls to SHA-1. Again, you can generate random ASCII strings by converting random integers to hex. By the theory of these birthday attacks, you will need to compute somewhat more than 1 million =square root of 240 =2 20 hashes to find this collision with probability greater than . The simplest way to do it is to repeatedly generate random strings s and enter the pair SHA-1(s):s in a Python dictionary structure. When you find a hash value thats already in the dictionary, youre done. Include two different colliding pairs of strings in your writeup. In addition, specify the time needed to find the collided pairs.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!