Exemplo n.º 1
0
        private void Generate()
        {
            int minQ = (int)sbMinQ.Value;
            int maxQ = (int)sbMaxQ.Value;

            Domain     = DomainParameters.GenerateDomainParameters(minQ, maxQ);
            generator  = new DSAKeyGenerator(Domain);
            PrivateKey = generator.PrivateKey;
            PublicKey  = generator.PublicKey;
        }
Exemplo n.º 2
0
        private void btnGenerateSchnorr_Click(object sender, EventArgs e)
        {
            domain  = DomainParameters.GenerateDomainParameters(100000, 999999);
            schnorr = new Schnorr(domain);

            tbP.Text = domain.P.ToString();
            tbQ.Text = domain.Q.ToString();
            tbH.Text = domain.H.ToString();
            tbG.Text = domain.G.ToString();
            tbT.Text = schnorr.T.ToString();

            ResetForm();
        }