Question: For this question we will be implementing the ( unauthenticated ) Diffie - Hellman key agreement algorithm and briefly explore what can go wrong when
For this question we will be implementing the unauthenticated DiffieHellman key agreement algorithm and
briefly explore what can go wrong when we don't set it up correctly.
We have seen in class that DiffieHellman should be implemented in a primeorder subgroup of a multiplicative
group modulo another prime ; we've also seen why. In this question, we will use a less careful implementation
in the entire multiplicative group modp. This group, denoted has order which is not prime
for one thing, is divisble by DiffieHellman works the same way in a primeorder group as it does in
a compositeorder group, but the latter has some security weakness which we will see how to exploitZp As shown in the picture Using p i find the order modulo p of each of the ten elements Then, ii based on your findings, indicate for each of those ten elements whether it generates all of Zp
a large primeorder subgroup of Zp where large is of course in relation with our relatively small value of p or something else if so briefly describe
Choose one of the generators of the whole group and one of the generators of a large prime subgroup that
you have identified above, and confirm your conclusions for those two by explicitly doing all necessary
tests based on Fermats little theorem, as explained above. If you already performed those calculations
in the previous subquestion, eg using the calculatorbased method, then all you need for this subquestion
is to show your work for one generator of each kind.
Next part
Now fix p as above, and fix g to be the smallest integer amongst that is a generator of the full
group Z
p
that you should have found in the foregoing. Alice and Bob want to perform a basic DiffieHellman
key exchange agreement, and will use those p and g as the protocols common parameters.
Alice and Bob will choose their respective secret keys, a and b based onwhat else?
ID is the alice a and bob is b we get from the id anf from the ID id is wxyz where a wy and b xz
What messages do Alice and Bob send to each other? Explicitly do the calculations using the squareandmultiply algorith
What then is the session key that Alice and Bob would be agreeing on Show the calculation of the session
key from each of Alices and Bobs point of view.
NEXT PART
Performing DiffieHellman in the whole group Z
p
is generally fine, unless one is very unluckyor one of the
parties is deliberately trying to sabotage the security of the resulting shared secret with plausible deniability.
Lets say that Bob is now a malicious Bot, who probably with an ulterior motive always picks b as its secret key. Alice keeps using a
Calculate the keyexchange message that Bot with private key b
sends to Alice. Alices message
to Bob will be unchanged from above. Then complete the key exchange, showing how Alice and Bot
obtain the session key, to verify they both get the same. No need to detail any calculations.
Now, lets see what happens when Alice varies her private key, which well call alpha first with honest Bob
with key b xz as above, then with malicious Bot with key b
For this, successively redo the
key exchange between Alice and Bob, and between Alice and Bot, for the following ten different values
of Alices private key: alpha a a a a respectively. No need to show any calculation for this
question, just present the results in a table with rows one for each value of Alices private key and
four columns: Alices private key alpha ; Alices message to Bob or Bot; the resulting shared secret
between Alice and Bob; the resulting shared secret between Alice and Bot.
Based on what you see in your table, draw the obvious conclusion.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
