Diffie Hellman Color Mixing Playground (Ch 4)¶
The Diffie Hellman Color Mixing Playground is a JavaScript app that allows you to experiment with the shared secret algorithm from chapter 4. It demonstrates both the “paint mixing” version of the algorithm as well as the final version using exponents and modular arithmetic.
How To Use The Playground
Initially, you will see a series of interconnected colored boxes, each representing a different mixed color. Behind the black “walls” are your color and Arnold’s color, which can only be seen from their corresponding views. In the middle is the public color, which is always visible. The boxes overlapping the public color, are your and Arnold’s public/private colors (the private color mixed with the public color). Notice how those boxes extend past the wall and into each corner. The overlap between the private color, and the other person’s public/private color, shows the shared secret color.
Additionally, You can enable the use of “clock math”, which will show you the calculations used to derive a shared secret number.
Use the color selectors in the top left corner to change the public and private colors.
Click the radio buttons to change views.
Click the “Show Clock Math” checkbox to enable calculations
With clock math enabled, use the lower text boxes to change your private number, the public base, and public clock.
Diffie-Hellman Color Mixing Demo Application by Samuel S. Jennings