Suppose that Bob and Alice to use the Diffie-Hellman Algorithm to agree on a key
ID: 3731768 • Letter: S
Question
Suppose that Bob and Alice to use the Diffie-Hellman Algorithm to agree on a key. They will use the prime number 29 and g 3, which is a primitive root modulo 29, Alice will use the secret number a = 5 and Bob will use the secret number b = 6, You can use R for your computations to answer this question. (a) What is the value of the number A that Alice will sent to Bob? (b) What is the value of the number B that Bob will sent to Alice (c) After receiving the number A, Bob will compute the secret key s. Give Bob's computation of s.Explanation / Answer
Let us first try to understand what is Diffie Hellman algorithm . If we were to share a secret key directly on an insecure channel, their are chances that attacker would know the key and later when we send data through insecure channel using that key, the attacker would easily decrypt the data . But it is important for the two person to share the key with each other.
Diffie Hellman proposed the following method to exchange key between two persond, say Alice and Bob:
1) Alice and Bob both chooses a large prime number p and one of the it's generator g, value of p and g are known by Alice and Bob, both of these are public
2) Both Alice and Bob each chooses a number as their private key.
3) Alice chooses a as her private key, known by Alice only and Bob chooses b as his private key,known by Bob only
4) Alice generate her public key A = (ga)mod p and send it to Bob.
5) Bob generates his public key B = (gb)mod q and send it to Alice.
6) Alice recieves B and calculate value of share secret key as Key = (Ba)mod p .
7) Bob recieves A and calculate key as Key = (Ab)mod p .
In the given question, we have following data:
p=29
g=3
a=5
b=6
part a)
We can calculate A by following formula in above explanation:
A = (ga)mod p = (35)mod 29 = 11
part b)
From above explanation, we can calculate the value of B using formula
B = (gb)mod q = (36)mod 29 = 4
part c)
Bob will recieve A = 11, as calculated in part (a), and calculate the Key as pr the formula:
Key = (Ab)mod p = (116)mod 29 = 9
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.