install:
virtualenv dh pip install -r requirements.txt
run:
python server.py
test:
python tests.py
common info:
check tests.py for example implementation
reference: http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
basically -
- get "/common_base" for common paint
- compute mixture for public transmission using pow(2, client_secret, common_paint)
- send mixture to server and receive server's one in response
- compute common secret via pow(server_mixture, client_secret, common_paint)
- (optional) get /check/ to see if server and client secrets match