block by mpmckenna8 10f9a52991d2b86b9677d4346748beac

10f9a52991d2b86b9677

Full Screen

Diffie Hellman Key exchange example in javascript

Goal: To make a fairly simple website so people can grok what’s going on with this public key exchange to generate a private key thing which is supposed to be pretty important for modern encrypted communication.

This example isn’t great because I’m not using anything special to deal with when you start using numbers which are too big for Javascript to handle without starting to round stuff. It will tell you when it probably messed up though.

The library I ended up using to deal with pretty big integers is a bigint library https://github.com/peterolson/BigInteger.js

index.html

diffiel.js

style.css