Beispiel #1
0
 public void CreateLink(CDH CDH)
 {
     SetParameters();
     int SetG;
     long SetP;
     GetParameters(out SetG, out SetP);
     CDH.SetParameters(SetG, SetP);
     SetPublicKey(CDH.MakePublicKey());
     CDH.SetPublicKey(MakePublicKey());
     MakeSecretKey();
     CDH.MakeSecretKey();
 }
Beispiel #2
0
 public static void Diffie_Hellman()
 {
     CDH Alice = new CDH();
     CDH Bob = new CDH();
     Alice.CreateLink(Bob);
     Console.ReadKey();
 }