Вы находитесь на странице: 1из 4

4/27/2018 Understanding Cisco Cybersecurity Fundamentals

4.9 Understanding Basic Cryptography Concepts

Diffie-Hellman Key Agreement

Open Transcript

The DH key agreement method allows two parties to share information over an untrusted network and mutually compute an
identical shared secret that cannot be computed by eavesdroppers who intercept the shared information. The mathematical
operations are relatively easy to describe, expensive to compute, and intractable to reverse.

The DH key agreement method can be used in protocols such as SSL/TLS, SSH, and IKE.

https://ondemandelearning.cisco.com/cybersec-nil/secfnd/sections/4/pages/9 1/4
4/27/2018 Understanding Cisco Cybersecurity Fundamentals

Source: https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange

The figure simplifies the concept of the DH key agreement process by using colors instead of using math with very large
numbers:

• The DH key exchange begins with two parties: Alice and Bob in the example.

• Alice and Bob agree on an arbitrary common color that does not need to be kept secret, which represents a large prime
number p and a generator g that both parties agreed on.

• Each of them then selects a secret color that they keep secret to themselves. The secret color is never exchanged to the
other party, which represents the chosen secret private key of each party.

• The crucial part of the process is that Alice and Bob now mix their secret color together with the shared common color,
then publicly exchange their mixed colors to each other, which represents the public key that each party sends to the
other party. Each party's public key is calculated using the generator g, the prime number p, and their own chosen secret
private key.

• Finally, Bob and Alice each mix together the color they received from the partner with their own private color. The result
is a final color mixture that is identical to the partner's final color mixture, which represents the resulting shared secret
key between Bob and Alice. Each party calculates the shared secret using the other party's public key, each party's own
chosen secret key, and the prime number p.

• If a third party (Eve, for example) had been listening in on the exchange, it would be computationally difficult for Eve to
determine the final color mixture.

The mathematical model in the DH key exchange process:

• p = large prime number, can be known to Alice, Bob, and Eve.

• g = based or generator, can be known to Alice, Bob, and Eve.

• a = Alice's chosen private key, which is known only to Alice.


https://ondemandelearning.cisco.com/cybersec-nil/secfnd/sections/4/pages/9 2/4
4/27/2018 Understanding Cisco Cybersecurity Fundamentals

• b = Bob's chosen private key, which is known only to Bob.

• A = Alice's calculated public key using g, p, and a, can be known to Alice, Bob, and Eve. A = g^a mod p.

• B = Bob's calculated public key using g, p, and b, can be known to Alice, Bob, and Eve. B = g^b mod p.

• s = The shared secret key, which is calculated by using the other party's public key, each party's own chosen secret key,
and the prime number p, is known to both Alice and Bob, but not to Eve.

• s = B^a mod p (calculated by Alice).

• s = A^b mod p (calculated by Bob).

• s can also be calculated using the formula s = g^ab mod p which requires knowledge of both parties chosen private key.

• After each party calculates the shared secret key s independently, each party will end up with the exact same value s. All
three formulas for s will produce the same result. s = g^ab mod p = B^a mod p = A^b mod p.

Diffie-Hellman used different DH groups to determine the strength of the key that is used in the key agreement process. The
higher group numbers are more secure, but require additional time to compute the key. Each DH group specifies the values
of p and g. DH groups are supported by Cisco IOS Software and the associated size of the value of the prime p:

• DH Group 1: 768 bits

• DH Group 2: 1024 bits

• DH Group 5: 1536 bits

• DH Group 14: 2048 bits

• DH Group 15: 3072 bits

• DH Group 16: 4096 bits

• A DH key agreement can also be based on elliptic curve cryptography. Its use is included in the Suite B cryptographic
suites. DH groups 19, 20, and 24, based on elliptic curve cryptography, are also supported by Cisco IOS Software.

Note

The DH key exchanges always use the same DH private key. Each time the same two parties perform a DH key
exchange, they will end up with the same shared secret. With ephemeral Diffie-Hellman, a temporary private key is
generated for every DH key exchange, and thus the same private key is never used twice. This enables PFS, which
means that if the private key is ever exposed, any past communications are still secured.

Content Review Question

Which two parts of the Diffie-Hellman process are arbitrary items that are agreed upon by both parties before any
mathematical calculations? (Choose two.)

prime number

https://ondemandelearning.cisco.com/cybersec-nil/secfnd/sections/4/pages/9 3/4
4/27/2018 Understanding Cisco Cybersecurity Fundamentals

secret key

public key

generator

Submit

Content Review Question

Which statement about the Diffie-Hellman Key Agreement is true?

The higher the Diffie-Hellman group number indicates a smaller key size.

The higher the Diffie-Hellman group number indicates a larger key size.

The higher the Diffie-Hellman group number indicates no difference in processing requirements.

The higher the Diffie-Hellman group number indicates a smaller prime number (p).

Submit

https://ondemandelearning.cisco.com/cybersec-nil/secfnd/sections/4/pages/9 4/4

Вам также может понравиться