static public void verificationOfDigitalSignature(long a, long[] b, long[] NumberEncrypt) { long[] LeftPart = new long[b.Length]; //Левая часть long[] RightPart = new long[b.Length]; //Правая часть PrintLog("Левая часть: ", false); for (int i = 0; i < b.Length; i++) { RightPart[i] = (long)ELGAmal.reSquaring(KeyAbonentG, NumberEncrypt[i], KeyAbonentP); Console.Write(RightPart[i] + " "); } Console.WriteLine(); PrintLog("Правая часть: ", false); for (int i = 0; i < b.Length; i++) { long temp = (long)(ELGAmal.reSquaring(KeyAbonentY, a, KeyAbonentP) * ELGAmal.reSquaring(a, b[i], KeyAbonentP)); LeftPart[i] = ELGAmal.Mod(temp, KeyAbonentP); Console.Write(RightPart[i] + " "); } Console.WriteLine("\nПроверка показала идентичность ЭЦП и открытой подписи!"); }
static public void CalculateY() { y = (long)ELGAmal.reSquaring(g, x, p); }
static public void FindFirstPart() { a = (long)ELGAmal.reSquaring(g, k, p); PrintLog($"а = {a}", false); }