Examining the Features of the Diffie Hellman Key Exchange Algorithm
The Diffie-Hellman (DH) Key Exchange Algorithm was invented by Whitfield Diffie and Martin Hellman in 1976. The Diffie-Hellman algorithm derives its strength from the difficulty of calculating the discrete logarithms of very large numbers. The functional usage of this algorithm is to provide secure key exchange over insecure channels such as the Internet. DH is also often used to provide keying material for other symmetric algorithms, such as DES, 3DES, or AES.
The DH algorithm serves as the basis for many of our modern automatic key exchange methods. It is used within the Internet Key Exchange (IKE) protocol in IP Security (IPsec) virtual private networks (VPN). In this role it provides a reliable and trusted method for key exchange over untrusted channels such as the Internet.
Before the DH exchange may begin, the two parties involved must agree on two nonsecret numbers. The first number selected is used as the generator and is termed g, for generator. The second number is called p, and it serves as the modulus. There is no need to keep these numbers secret; generally they are chosen from a table of known values. In most cases g is usually a very small number, a single integer such as 2, 3, or 4, and p is a very large prime number. After these numbers are selected, each party generates its own secret value. Finally, these numbers are used together. Based on the values of g and p, as well as the secret value of each party, each party calculates its public value. The following formula is used to compute the public value:
Y=gxmod p x represents the entity's secret value, and Y is the entity's public value.
After these public values have been computed by both parties, they are exchanged. Then each party exponentiates the public value it received with its own secret value. This step computes a common shared secret value. When the algorithm finishes, each party has the same shared secret.
If an attacker is listening on the channel, he can't compute the secret value, because only g, p, Ya, and Yb are known. To calculate the shared secret value, at least one secret value is needed. Given the nature of this process, for an attacker to obtain the shared secret, he would have to be able to compute the discrete algorithm of the equation we discussed to recover Xa or XB.
Continue reading here: Components of a PKI
Was this article helpful?
Readers' Questions
-
patrick8 months ago
- Reply