Prerequisites:

Compile (this downloads and extracts crypto pieces from the SUPERCOP benchmarking framework, and takes a few minutes for crypto self-tests):

   make

Create the server’s secret key and public key:

   ./mctiny-master state

Run the server:

   ./mctiny-server state 127.0.0.1 12345 &

Run the client using the server’s public key:

   ./mctiny-client state/public/* 127.0.0.1 12345

The client prints some performance information, finishes the connection, and terminates. The server continues running to handle any number of clients. As a sanity check, the client and the server each print two bytes of the session key.

To run the client on another machine, copy the state/public/* file to the other machine, and replace both occurrences of 127.0.0.1 with the server’s name or IP address.

To rotate the server cookie keys once:

   ./mctiny-rotate state

Rotation keeps the last 8 keys. If, e.g., mctiny-rotate is run every minute then each cookie expires between 7 and 8 minutes after being generated.

Internal documentation

hash library

packet library

pacing library

mctiny library