Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 pairsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started