Algorithm cryptography
The program takes the size of the prime number p (in bits) as an argument during execution. Based on the size of p, is able to compute and print the values of p, the generator g, random numbers a, b โ Zโp, and other intermediate results computed in the Diffie-Hellman protocol. Note that the values of p, g, a, and b are generated randomly based on the input argument. The program finally shows the shared key generated.
Java