# Definition:Diffie-Hellman-Merkle Key Exchange

## Definition

The Diffie-Hellman-Merkle key exchange is a safe method of exchanging a key.

Suppose Alice and Bob with to communicate securely.

They decide to use the order $p - 1$ cyclic group $G$ of multiplication modulo $p$ consisting of the non-zero elements of a finite field of order $p$

They choose a generator $g$ of $G$.

Alice chooses an integer $a$ and calculates $A = g^a$ modulo $p$.

Bob chooses an integer $b$ and calculates $B = g^b$ modulo $p$.

Both can calculate the key $g^{a b}$ modulo $p$:

- $K = B^a$, calculated by Alice

and:

- $K = A^b$, calculated by bob.

An eavesdropper may know $p$, $g$, $A$ and $B$ but cannot calculate $K$ without solving the discrete logarithm problem.

If $p$ is large, the discrete logarithm problem is very difficult to solve.

So $K$ can be used as the basis of a private key for Alice and Bob.

## Also see

- Results about
**the Diffie-Hellman-Merkle key exchange**can be found**here**.

## Source of Name

This entry was named for Bailey Whitfield Diffie, Martin Edward Hellman and Ralph Charles Merkle.

## Historical Note

The **Diffie-Hellman-Merkle key exchange** was invented by Bailey Whitfield Diffie, Martin Edward Hellman and Ralph Charles Merkle in $1976$.

## Sources

- 2008: David Nelson:
*The Penguin Dictionary of Mathematics*(4th ed.) ... (previous) ... (next):**Diffie-Hellman-Merkle key exchange**