Diffie-Hellman Protocol

This is a TOY example, for practice or entertainment purposes only

You and I (“I” being this web page) want to perform the Diffie-Hellman protocol to end up with a shared secret consisting of a number from 0 to 99 (this number would in principle become the encryption key for subsequent communications — keep in mind that if we have a “shared secret”, then it is easy to use encryption to communicate!)

The protocol in this toy example uses g = 17 as parameter (that is, we compute 17 to the power of something). You will choose a random number (let's call it x), in principle between 1 and 99, but I recommend that you choose something between 1 and 15 or 20 (otherwise, your hand calculator might not be able to deal with results as large as, say 80 to the 80, or 99 to the 99).

Ok, once you choose x. then compute 17 to the power x modulo 100 (remember that modulo 100 means that you take only the last TWO digits of the result), enter the result in the box below, and click on the button to continue:

The result of 17x modulo 100 is: