Implementation of Diffie-Hellman key exchange protocol at a 1024-bit key strength.

The first models Alice's initial message to Bob, and outputs a secret key to be stored for later. The second models Bob's receipt of the message from Alice, and outputs a response message back to Alice. The final program models Alice's receipt of Bob's response.

dh-alice1 . Outputs decimal-formatted ( p; g; ga ) to Bob, writes (p; g; a) to a second file. dh-bob . Reads in Alice's message, outputs ( gb ) to Alice, prints the shared secret gab. dh-alice2 . Reads in Bob's message and Alice's stored secret, prints the shared secret gab.