Secret Exchange

Handshake

The public data
g
p
ga
gb
Alice's private data
a (secret)
Bob's private data
b (secret)
The shared secret
gab (secret)

If you are Alice: Enter a secret and then transmit ga to Bob.

If you are Bob: Wait for the data from Alice, read it, and enter a secret . Then send to Bob and compute the shared secret.

Alice again: Read Bob's token below and compute the shared secret.

Input/Output
Input
Output 2. Send to Bob. 5. Send to Alice.

Talk

Plaintext (secret)
Encrypted (public)