## Diffie-Hellman Algorithm

· Whitefield Diffie and Martin Hellman developed algorithm for key exchange in 1976.

· Diffie-Hellman system was developed to solve the problem of key distribution for private key encryption systems.

· The idea was to allow a secure method of agreeing on a private key without the expense of sending the key through another method. Therefore, they needed a secure way of deciding on a private key using the same method of communication that they were trying to protect.

· Diffie-Hellman cannot be used to encrypt or decrypt information.

· The Diffie-Hellman secret key exchange mechanism works as follows:

1. A and B select two large number p and g. p is a prime number and g <p. These numbers are not secret. A or B can select them and pass onto the other party.

2. A and B pick individually a random number. Let us say A picks r and B picks y. These numbers are secret.

3. A calculates S

_{A}= g^{x}mod p and sends this to B. Similarly B calculates S_{B}= g^{Y}mod p and sends this to A.4. A and B now can independently calculate the common secret key K which is equal to :-

K=(SB)

^{X}mod p= (g^{Y}mod p)^{X}mod p g mod p... at end AK=(SA)

^{y}mod p= (g^{X}mod p)^{y}mod p= g^{XY}mod p….. at end B5. Note that secret key K can be calculated only if x and y are known. These random numbers are never sent across by either party. A and B exchange S

_{A}and S_{B}and an intruder cannot calculate x and y from S_{A }and S_{B}.· Example of Diffie-Hellman algorithm

If A and B choose p=47, g= 3 and A pick a random number x= 8 and B picks a random number y= 10. The following calculations are done by A and B to get the secret key (K) using Diffie-Hellman key exchange algorithm :

A Calculates S

_{A}and sends it to BS

_{A}= g^{X}mod p= 3^{8}mod 47= 28B calculates S

_{B}and sends it to AS

_{B}= g^{Y}mod p= 3^{10}mod 47= 17A then calculates key (K) as

K= 17

^{8}mod 47=4B calculates key (K) as

K= 28

^{10}mod 47= 4_{}

^{}

## No comments:

## Post a Comment