Diffie-Hellman Key Exchange Visualizer
A simple demonstration of secure key exchange
Protocol Parameters
Alice
Waiting to begin...
Bob
How Diffie-Hellman Works
- Alice and Bob agree on a prime number (p) and base (g)
- Alice chooses a private key (a) and calculates her public key (A = g^a mod p)
- Bob chooses a private key (b) and calculates his public key (B = g^b mod p)
- They exchange public keys over an insecure channel
- Alice calculates the shared secret (s = B^a mod p)
- Bob calculates the shared secret (s = A^b mod p)
- 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.
0 Comments