Cipher Key Generator

The purpose of this tool is to show how the Diffe-Hellman algorithm obtains a secret number that a Server and a Client agent can both share without explicitly giving the number to each other, over a network - and, for it to be ultra-hard to derive how you two came up with the number - even if an onlooker sees the entire exchange! This can be used in encryption or for authentication.

Start by picking a few numbers for the Server from these lists.

One is called the Prime Modulus, one is called the Base Root, and the other is its Private Key.

Pick the Prime Modulus and then the Base Root. 👍🏼 Then, pick your private key. (We'll pick the Client's key after this).

Prime Modulus:

Base Root:

Private Key:

Continue

The Server's Public Key was generated!


Now, we'll pass on the Prime Modulus (common), the Base Root (common), and the Server's Public Key (below) to the Client so it can generate its own key. The Server will not reveal its Private Key to the Client.


First... Pick a Private Key for the Client.

Private Key:

Generate Cipher

Here's what we have so far for the Server:

Prime Modulus (common)

Base Root (common)

Server's Public Key

Client's Public Key

Server's Private Key

(secret to Server)

Client's Private Key

(secret to Client)

Server's Cipher Key

This should match the Client's Cipher Key

Client's Cipher Key

This should match the Server's Cipher Key

The Server and Client will now use this number (much bigger, in practice) to encrypt their messages. Then, the other will know what to decrypt it with (this number). And, they did it without trading it in the open!

by Brad Ormand