Beispiel #1
0
        private void CreateEDS_Click(object sender, EventArgs e)
        {
            RSA = new AlgorithmRSA();


            var hash      = EDS.Hash(text.Text, 2873, 2765, 345);
            var signature = BigInteger.ModPow(hash, RSA.d, RSA.r);

            edstext.Text = signature.ToString();
        }
Beispiel #2
0
        public static BigInteger Hash(string mes, BigInteger p, BigInteger q, BigInteger h)
        {
            var r = p * q;

            foreach (var m in mes)
            {
                h = AlgorithmRSA.Exp(h + m, 2, r);
            }

            return(h);
        }