Diffie–Hellman key exchange

Classroom demonstration of the Diffie–Hellman key exchange. Both parties agree on public values g and p, pick private secrets a and b, and arrive at the same shared secret using the identity (ga mod p)b mod p = (gb mod p)a mod p = gab mod p.

Public parameters
Alice's secret a
Bob's secret b

← Return to max.pm