Diffie-Hellman Visualizer

The Diffie-Hellman key exchange allows parties to establish a shared secret over an insecure channel.

⚠️ Please select a mode (2 or 3 Participants) to begin the key exchange process. This step is required to continue!

P must be a prime number, and (P-1)/2 must also be prime. Choose from the safe list for secure demo.

Alice

Alice

Private Key:

Public Key:

Shared Secret:

Bob

Bob

Private Key:

Public Key:

Shared Secret:

Charlie

Charlie

Private Key:

Public Key:

Shared Secret: