public Signer GetSigner(Mode mode = Mode.Sign) { Signer result = null; String input = inputText.Text; switch (algorithmDrowdown.Text) { case "Цифровая подпись DSA": if (dsaForm == null) { dsaForm = new DSAForm(); } if (dsaForm.ShowDialog() == DialogResult.OK) { signKey = mode == Mode.Sign ? dsaForm.PrivateKey : dsaForm.PublicKey; domain = dsaForm.Domain; result = new DSASigner(dsaForm.Domain); } break; default: throw new ArgumentException("Выберите метод подписи"); } return result; }
public Signer GetSigner(Mode mode = Mode.Sign) { Signer result = null; String input = inputText.Text; switch (algorithmDrowdown.Text) { case "Цифровая подпись DSA": if (dsaForm == null) { dsaForm = new DSAForm(); } if (dsaForm.ShowDialog() == DialogResult.OK) { signKey = mode == Mode.Sign ? dsaForm.PrivateKey : dsaForm.PublicKey; domain = dsaForm.Domain; result = new DSASigner(dsaForm.Domain); } break; default: throw new ArgumentException("Выберите метод подписи"); } return(result); }
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; }
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(); }
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(); }
public DSASigner(DomainParameters domain) { numbers = new RandomNumberGenerator(); Domain = domain; }
public DSAKeyGenerator(DomainParameters domain) { numbers = new RandomNumberGenerator(); Domain = domain; GenerateKeys(); }
public DSAKeyGenerator(DomainParameters domain) { numbers = new RandomNumberGenerator(); Domain = domain; GenerateKeys(); }
public DSASigner(DomainParameters domain) { numbers = new RandomNumberGenerator(); Domain = domain; }
public Schnorr(DomainParameters domain) { numbers = new RandomNumberGenerator(); Domain = domain; T = GenerateT(); }
public Schnorr(DomainParameters domain) { numbers = new RandomNumberGenerator(); Domain = domain; T = GenerateT(); }