Alice

Parameters known by Alice:

Chooses her secret value:

Computes her public value:

Receives \( B \) from Bob:

Computes the shared secret key:

Step y/x

Before Alice and Bob can compute the shared secret key, they need two parameters: a prime number \( p \) and a generator \( g \) of the group \( \mathbb{Z}_{p}^{*} \). These are public values, chosen by a trusted third party:

  • \( p \)
  • \( g \)

Use the Left and Right arrow keys to navigate between steps.

Alice and Bob receive the prime number \( p \) and the generator \( g \) of the group \( \mathbb{Z}_{p}^{*} \).

Next, Alice chooses her secret value \( a \), and Bob chooses his secret value \( b \). Both values are integers between \( 1 \) and \( p-1 \).

First, Alice computes her public value \( A \) and sends it to Bob.

Then, Bob computes his public value \( B \) and sends it to Alice.

With their secret values \( a \) and \( b \), and the received public values \( A \) and \( B \), Alice and Bob each compute the shared secret key, which is known only to them.

Bob

Parameters known by Bob:

Chooses his secret value:

Receives \( A \) from Alice:

Computes his public value:

Computes the shared secret key: