In: Computer Science
Let’s assume A and B are creating a secret key using Diffie
Hellman key exchange. Assume q = 13 and A’s secret is 10 and B’s
secret is 5.
⦁ Find all primitive roots of q = 13. (Show the
table)
⦁ Find the secret key generated when the primitive root
6 is used.
⦁ Let’s say there is C, that uses a secret AC = 8 with
A and secret BC = 12 with B. Find the shared keys it generates with
A and B.
⦁ Draw the man in the middle attack with the numbers
above.
A) b)
Step 1: Alice and Bob get public numbers P = 13, G = 6 Step 2: Alice selected a private key a = 10and Bob selected a private key b = 5 Step 3: Alice and Bob compute public values Alice: x =(6^10 mod 13) = (60466176 mod 13) = 4 Bob: y = (6^5mod 13) = (7776 mod 13) = 2 Step 4: Alice and Bob exchange public numbers Step 5: Alice receives public key y =2 and Bob receives public key x = 4 Step 6: Alice and Bob compute symmetric keys Alice: ka = y^a mod p = 2^10 mod 13 = 10 Bob: kb = x^b mod p = 4^5 mod 13 = 10 Step 7: 10 is the shared secret.
C) secret key between a and b= (6^12) ^8 mod 13 = 1^8 mod 13= 8
D)
This is how Diffie-Hellman works:
And this is how the man-in-the-middle attack works in Diffie-Hellman:
There are two D-H key exchange, Alice and Attacker share the same key with k1, while Bob and Attacker share the other same key with k2.
Because Alice and Bob had no prior knowledge of each other.
But the Attacker must keep listening and forwarding.