how diffie hellman key exchange works

(with as little math as possible)

@b0rk you can do it without maths at all. Say I want to give you my bicycle, but our schedules just will never work out for me to give you it directly. Well, we pick a place both of us can access, say outside the train station. I lock my bike up at a designated spot and go about my day. You come along with your own lock and use it to fasten the bike to the same spot without interfering with my lock, then go about your day. At some point I remove my lock, after which you can remove yours and gain a bicycle.

As I understand it, such a protocol was the inspiration for DH key exchange. Picking a spot is picking a generator. Locking is exponentiating. Locks not interfering is the commutativity property.

It's the explanation I always use when TAing cryptography