Diffie Hellman key exchange algorithm uses asymmetric key principles for the distribution of symmetric keys to both parties in a communication network. Key distribution is an important aspect of conventional algorithm and the entire safety is dependent on the distribution of key using secured channel. Diffie Hellman utilizes the public& private key of asymmetric key cryptography to exchange the secret key.

Before going in depth of Diffie Hellman Algorithm,we define primitive root of a prime number 'p' as one whose powers generate all the integers from 1 to p-1, i.e. if 'a' is the primitive root of a prime no 'p', then,

a mod p , a

^{2}mod p , a

^{3}mod p, .............. a

^{p-1}mod p generate all distinct integers from 1 to (p-1) in some permutation.

The steps for Diffie Hellman key exchange algorithm are:

Step 1 : GLOBAL PUBLIC ELEMENTS

Select any prime no : 'q'

Calculate the primitive root of q : 'a' such that a<q

Step 2 : ASYMMETRIC KEY GENERATION BY USER 'A'

Select a random number as the private key X

_{A}where X

_{A}< q

Calculate the public key Y

_{A}where Y

_{A}= a

^{XA}mod q

Step 3 : KEY GENERATION BY USER 'B'

Select a random number as the private key X

_{B}where X

_{B}< q

Calculate the public key Y

_{B}where Y

_{B}= a

^{XB}mod q

Step 4 : Exchange the values of public key between A & B

Step 5 : SYMMETRIC KEY (K) GENERATION BY USER 'A'

K= Y

_{B}

^{XA}mod q

Step 6 : SYMMETRIC KEY (K) GENERATION BY USER 'B'

K= Y

_{A}

^{XB}mod q

It can be easily be proved that the key K generated by this algorithm by both parties are the same.

## vBulletin Message