Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In this problem, we explore the Diffie-Hellman (DH) public-key encryption algori

ID: 3619621 • Letter: I

Question

In this problem, we explore the Diffie-Hellman (DH) public-key encryption algorithm, which allow to entities to agree on a shared key. The DH algorithm makes use of a large prime number p and another large number g less than p. Both p and g are made public (so that an attacker would know them). In DH, Alice and Bob each independently choose secret keys, SA and SB, respectively. Alice then computes her public key, TA, by raising g to SA and then taking mod p. Bob similarly computes his own public key TB by raising g to to SB and then taking mod p. Alice and Bob then exchange their public keys over the internet. Alice then calculates the shared secret key S by raising TB to SA and then taking mod p. Similarly, Bob calculates the shared key S' by raising TA to SB and then taking mod p.
a. Prove that in general that Alice and Bob obtain the same symmetric key, that is, prove S =S'.
b. With p = 11 and g = 2, suppose Alice and Bob choose private keys SA = 5 and SB = 12, respectively. Calculate Alice's and Bob's public keys, TA and TB. Show all work.
c. Following up on part (b), now caculate S as the shared symmetric key. Show all work.
d. Provide a timing program that shows how Diffie-Hellman can be attacked by a man-in-the-middle. The timing diagram should have three vertical lines, one for Alice, one for Bob, and one for the attacker Trudy.

Explanation / Answer

1. Alice and Bob agree to use a prime number p=11 and base g=2. 2. Alice chooses a secret integer sa=5, then sends Bob tA = (g^sa) mod p tA = 10 3. Bob chooses a secret integer sb=12, then sends Alice tB = (g^sb) mod p o tB = 4 4. Alice computes s = (tB ^sa) mod p o 4^5 mod 11 = 1 5. Bob computes s’ = (tA ^sb) mod p o 10^12 mod 11 = 1 Hence Result proved…. S= S’

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote