Agree on a secret in public — paint analogy and real math.
Diffie-Hellman lets two parties agree on a shared secret over a public channel — without ever sending the secret. TLS and SSH use modern variants (ECDHE) on every connection.
Alice
public
her color
secret
sends mix →
Eavesdropper sees
public
Alice's mix
Bob's mix
Un-mixing paint is hard — just like reversing modular exponentiation.
Bob
public
his color
secret
← sends mix
shared secret
Each side adds its own secret color to the mix it received. Both end with the same color; the eavesdropper never had either secret.