Python code for the post "Elliptic Curve Diffie-Hellman"