private void button2_Click(object sender, EventArgs ea)
{
ECGost3410Signer signer = new ECGost3410Signer();
ECPublicKeyParameters pubKey = new ECPublicKeyParameters(
"ECGOST3410",
new FpPoint(curve,
new FpFieldElement(mod_p, TextBoxToBigInteger16(tbValPublicX)), // x
new FpFieldElement(mod_p, TextBoxToBigInteger16(tbValPublicY))), // y
parameters);
BigInteger H = TextBoxToBigInteger16(tbH);
BigInteger rs = TextBoxToBigInteger16(tbrs);
BigInteger ss = TextBoxToBigInteger16(tbss);
BigInteger q = parameters.N;
//FpPoint G = (FpPoint)parameters.G;
//FpPoint Q = new FpPoint(curve, new FpFieldElement(mod_p, TextBoxToBigInteger16(tbValPublicX)), new FpFieldElement(mod_p, TextBoxToBigInteger16(tbValPublicY)));
BigInteger e = H.Mod(q);
byte[] ee = e.ToByteArray();
byte[] message = H.ToByteArray();
Array.Reverse(message);
signer.Init(false, pubKey);
MessageBox.Show(signer.VerifySignature(message, rs, ss).ToString(), "Проверка подписи");
//FpPoint C = (FpPoint)(G.Multiply(e.ModInverse(q).Multiply(ss).Mod(q)).Subtract(Q.Multiply(e.ModInverse(q).Multiply(rs).Mod(q))));
//BigInteger x = C.X.ToBigInteger();
}