Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 344 Bytes

File metadata and controls

23 lines (13 loc) · 344 Bytes

dh

Only for demonstration purposes.

Interactive Diffie-Hellman key exchange with GNU MP

Compile it:

g++ main.cpp -odh -O3 -Wall -lgmp -lgmpxx

Use it:

./dh

Generate suitable primes

g++ prime.cpp -oprime -O3 -Wall -std=c++0x -lgmp -lgmpxx

./prime 500

... to create a prime with 500 decimal digits.