Question: Need this in Python language Problem 1: Basic birthday attack on a 40-bit hash - Finding collision of any two messages Write a function birthday10)

Need this in Python language Problem 1: Basic birthday attack on aNeed this in Python language

Problem 1: Basic birthday attack on a 40-bit hash - Finding collision of any two messages Write a function birthday10) 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 = 220 hashes to find this collision with probability greater than y. 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 that's already in the dictionary, you're done. Include two different colliding pairs of strings in your writeup. In addition, specify the time needed to find the collided pairs. Problem 1: Basic birthday attack on a 40-bit hash - Finding collision of any two messages Write a function birthday10) 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 = 220 hashes to find this collision with probability greater than y. 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 that's already in the dictionary, you're 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!