Deffie hellman key
exchange algorithm
Symmetric key cryptography
• Uses same key for encryption and decryption
• Uses common key = K for both the operation
Alice Bob
• For encrypton : C= Ek (M)
• For Decryption : P=Dk (Ek (M))
• Means
• {0,1} ^ n * {0,1}^k -----> {0,1}^n
The function take n bit of input with k bit of key and we got cipher text as a n
bit
Problems in Symmetric key
encryption
• 1) exchange of key on unsecure channel to the receiver.
Key exchange
2) Required n(n-1)/2 key in symmetric key encryption and maintain
these much of key always not possible
• Solution for the first problem is Deffie Hellman Key Exchange
Algorithm .
• How they agree on common key K using Deffie Hellman.
• Setup Phase
• 1) First agree with Large Prime no ‘P’ and make P public to all.
:. Zp* =zp-{0}
2) Let g be the generator of cyclic group Zp*.
also g has to be primitive root to P
:. (P,g) are public keys
• 3) Now Alice will choose ‘a’ secrete key i.e. 0<a<P-1.
• 4) Now Bob will choose ‘b’ a secrete key i.e. 0<b<P-1.
• 5) Now Alice will compute A= ( g^a mod P) and it A will send to the Bob
• 6) similarly Bob will compute B= (g^b mod P) and B will send to the Alice
• 7) Now at Alice Side Alice will again compute B^a mod P
similarly Bob will compute A^a mod P
8) After computing these value we will found equal value fro these both
computation
• B^a mod P = A^b mod P
• :.g^ ab mod P = g^ba mod P = K(Common Key)
• Here (P,g,A,B) are public keys
• And (a,b) are private key