Parameters known by Alice:

Chooses the secret value:

Computes the public value:

Receives \( B \)

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}^{*} \), which are public and chosen by a trusted third party:

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

Use the left and right arrow keys to navigate.

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

Alice then chooses the secret value \( a \) and Bob chooses the secret value \( b \) which both 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 their received public values \( A \) and \( B \) Alice and Bob computes the shared secret key, which is only known by them.


Parameters known by Bob:

Chooses the secret value:

Receives \( A \)

Computes the public value:

Computes the shared secret key: