2021-11-05 18:02:46 +11:00

39 lines
781 B
Java

public class Q2 {
//Setup_Request: Hello
//SETUP: Server's RSA public key
//Client_Hello:IDc
//Server_Hello: IDs , SID
//Ephemeral DH exchange
//Finished, check the shared key
//Data exchange
/**
* Opens the client and server in seperate terminals
* @param args
*/
public static void main(String[] args)
{
// try
// {
// Runtime.getRuntime().exec("cmd /c start cmd.exe /K \"java Q2Server\"");
// Thread.sleep(500); //Just to ensure the server has enough time to open
// Runtime.getRuntime().exec("cmd /c start cmd.exe /K \"java Q2Client\"");
// }
// catch (Exception e)
// {
// e.printStackTrace();
// }
Q2Tools toolbox = new Q2Tools();
System.out.println(toolbox.fastModularExpon("3785", "8395", "65537"));
}
}