1. Alan and Bill agree (through a public exchange) on using the Diffie-Hellman a
ID: 3805311 • Letter: 1
Question
1.Alan and Bill agree (through a public exchange) on using the Diffie-Hellman algorithm to create a common secret key. They also agree on two public numbers: q (large prime number), a (generator mod q):
q = 7, a = 2
Alan generates a random CA =6, use CA to calculate DA and then sends DA to Bill. Alan has also received a value DB from Bill.
Bill generates a random CB =7, use CB to calculate DB and then sends DB to Alan. Bill has also received the value DA sent from Alan as mentioned above.
(a)What is DA? (i.e. DA =?) (4 points)
(b)What is DB? (i.e. DB =?) (4 points)
What is the common secret key between Alan and Bill? (4
Explanation / Answer
Given :
q = 7
a = 2
Formula to find DA & DB:
^ ---- Find the power of succeeding value
mod ---- Find the modulo function and returns remainder value
DA = a^CA mod q = (2)6 mod 7 = 64 % 2 = 1
DB = a^CB mod q = (2)7 mod 7 = 128 % 7 = 2
Formula to find the secret key s:
s = DB^CA mod q = (2)6 mod 7 = 64 % 7 = 1
s = DA^CB mod q = (1)7 mod 7 = 1 % 7 = 1
Solution:
DA = 1
DB = 2
Secret Key = 1
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.