Diffie-Hellman Case Study - 1DS18TE075
Diffie-Hellman Case Study - 1DS18TE075
Report on
Bachelor of Engineering
In
Telecommunication Engineering
By
Gaurav Agarwal
1DS18TE075
2021-22
Diffie-Hellman Key Exchange Algorithm 2021-22
INTRODUCTION
DIFFIE–HELLMAN ALGORITHM
This algorithm uses arithmetic modulus as the basis of its calculation. Suppose
Alice and Bob follow this key exchange procedure with Eve acting as a man in
middle interceptor .
Here are the calculation steps followed in this algorithm that make sure that eve
never gets to know the final keys through which actual encryption of data takes
place.
1. First, both Alice and Bob agree upon a prime number and another number that
has no factor in common. Lets call the prime number as p and the other
number as g. Note that g is also known as the generator and p is known as
prime modulus.
2. Now, since eve is sitting in between and listening to this communication so
eve also gets to know p and g.
3. Now, the modulus arithmetic says that r = (g to the power x) mod p. So r will
always produce an integer between 0 and p.
4. The first trick here is that given x (with g and p known) , its very easy to
find r. But given r (with g and p known) its difficult to deduce x.
5. One may argue that this is not that difficult to crack but what if the value
of p is a very huge prime number? Well, if this is the case then
deducing x (if r is given) becomes almost next to impossible as it would take
thousands of years to crack this even with supercomputers.
6. This is also called the discrete logarithmic problem.
7. Coming back to the communication, all the three Bob, Alice and eve now
know g and p.
DESCRIPTION
Diffie–Hellman key exchange establishes a shared secret between two parties that
can be used for secret communication for exchanging data over a public network.
An analogy illustrates the concept of public key exchange by using colors instead
of very large numbers:
The process begins by having the two parties, Alice and Bob, publicly agree on an
arbitrary starting color that does not need to be kept secret (but should be different
every time ). In this example, the color is yellow. Each person also selects a secret
color that they keep to themselves – in this case, red and blue-green. The crucial
part of the process is that Alice and Bob each mix their own secret color together
with their mutually shared color, resulting in orange-tan and light-blue mixtures
respectively, and then publicly exchange the two mixed colors. Finally, each of
them mixes the color they received from the partner with their own private color.
The result is a final color mixture (yellow-brown in this case) that is identical to
their partner's final color mixture.
If a third party listened to the exchange, it would only know the common color
(yellow) and the first mixed colors (orange-tan and light-blue), but it would be
difficult for this party to determine the final secret color (yellow-brown). Bringing
the analogy back to a real-life exchange using large numbers rather than colors,
this determination is computationally expensive. It is impossible to compute in a
practical amount of time even for modern supercomputers.
ADVANTAGES
• The sender and receiver don’t need any prior knowledge of each other.
• Once the keys are exchanged, the communication of data can be done
through an insecure channel.
• The sharing of the secret key is safe.
LIMITATIONS
• The algorithm can not be sued for any asymmetric key exchange.
• Similarly, it can not be used for signing digital signatures.
• Since it doesn’t authenticate any party in the transmission, the Diffie
Hellman key exchange is susceptible to a man-in-the-middle attack.
OUTPUT