Diffie Hellman Key exchange algorithm:
Diffie Hellman algorithm is a public-key algorithm used to establish a shared secret that can be used for secret communications while exchanging data over a public network.
It is primarily used as a method of exchanging cryptography keys for use in symmetric encryption algorithms. It was Proposed in 1976 by Whitfield Diffie and Martin Hellman. Diffie-Hellman is currently used in many protocols like Secure Sockets Layer (SSL)/Transport Layer Security (TLS), Secure Shell (SSH), Internet Protocol Security (IPSec), Public Key Infrastructure (PKI).
Steps of Diffie Hellman key exchange Algorithm
:
1 Requires two large numbers, one prime (P), and (G), a primitive root of P
2 P and G are both publicly available numbers
a. P is at least 512 bits
3 Users pick private values a and b
4 Compute public values
. x = ga mod p
b. y = gb mod p
5 Public values x and y are exchanged
6 Compute shared, private key
a. ka = yamod p
b. kb = xbmod p
c. Algebraically it can be shown that ka = kb
Users now have a symmetric secret key to encrypt.
Example
- Alice and Bob get public numbers
- P = 23, G = 9
- Alice and Bob compute public values
- X = 94 mod 23 = 6561 mod 23 = 6
- Y = 93 mod 23 = 729 mod 23 = 16
- Alice and Bob exchange public numbers
- Alice and Bob compute symmetric keys
- ka = ya mod p = 164 mod 23 = 9
- kb = xb mod p = 63 mod 23 = 9
3. 9 is the shared secret.
abc
ReplyDeletedef
DeletePost a Comment