Diffie-Hellman Key Exchange Visualizer

HellmanKeyExchange

Diffie-Hellman Key Exchange Visualizer

A simple demonstration of secure key exchange

Protocol Parameters

Alice

Waiting to begin...

Bob

How Diffie-Hellman Works

  1. Alice and Bob agree on a prime number (p) and base (g)
  2. Alice chooses a private key (a) and calculates her public key (A = g^a mod p)
  3. Bob chooses a private key (b) and calculates his public key (B = g^b mod p)
  4. They exchange public keys over an insecure channel
  5. Alice calculates the shared secret (s = B^a mod p)
  6. Bob calculates the shared secret (s = A^b mod p)
  7. Both now have the same secret key without ever transmitting it!

Note: This is a simplified demonstration using small numbers. Real DH uses primes with hundreds of digits.

Post a Comment

0 Comments