This is a simple Java Application with Maven.
In order to Run the Program
First you need to run the server.java file (server.java file is considered as User A here) and type in the common values and the Secret key until it creates the public Key of User A.
Then you run client.java file (which is user B) and we type in the same common values that we did on User A's and also the Secret key of User B.
Finally the public Keys generated by the users will be transfered each other and find out the Key by calculating it with the secret keys of the user.