Question: using python Problem 5: Diffie-Hellman a. Write a function DH(p,A,y) for Bob that takes as input a prime p, Alice's public key A and Bob's

using python

using python Problem 5: Diffie-Hellman a. Write a function DH(p,A,y) for Bob

Problem 5: Diffie-Hellman a. Write a function DH(p,A,y) for Bob that takes as input a prime p, Alice's public key A and Bob's private key y and returns their common secret key S. b. Test your funton as follows. Alice and Bob decide to use the prime p5 1578688457739303125028061112090659782198159468456330025929973865889630391245311692303351435940311187 and the primitive root a5 5 Alice will use the private key x5 = 570275027520750285200572075027502750275027734556789496596129569 Bob will use the private key ?5-1757838499059275927592709232479201 50723459876345649272296 5091 265016 5b.1 Compute Alice's public key A by using your function pubkey from Problem 4 5b.2 Compute Bob's public key B by using your function pubkey from Problem 4. 5b.3 Run your new function DH for the prime p5, Alice's public key A and Bob's secret key y5. Call the result shared1 5b.4 Run your new function DH for the prime p5, Bob's public key B and Alice's secret key x5. Call the result shared 2. 5b.5 Compute the difference between the answers to 5b.3 and 5b.4. Problem 5: Diffie-Hellman a. Write a function DH(p,A,y) for Bob that takes as input a prime p, Alice's public key A and Bob's private key y and returns their common secret key S. b. Test your funton as follows. Alice and Bob decide to use the prime p5 1578688457739303125028061112090659782198159468456330025929973865889630391245311692303351435940311187 and the primitive root a5 5 Alice will use the private key x5 = 570275027520750285200572075027502750275027734556789496596129569 Bob will use the private key ?5-1757838499059275927592709232479201 50723459876345649272296 5091 265016 5b.1 Compute Alice's public key A by using your function pubkey from Problem 4 5b.2 Compute Bob's public key B by using your function pubkey from Problem 4. 5b.3 Run your new function DH for the prime p5, Alice's public key A and Bob's secret key y5. Call the result shared1 5b.4 Run your new function DH for the prime p5, Bob's public key B and Alice's secret key x5. Call the result shared 2. 5b.5 Compute the difference between the answers to 5b.3 and 5b.4

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!