mirror of
https://github.com/zach-sb/SENG2250_Assignment3.git
synced 2025-11-09 05:07:35 +11:00
39 lines
748 B
Java
39 lines
748 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();
|
|
|
|
toolbox.fastModularExpon(5, 117, 19);
|
|
}
|
|
|
|
} |