开发者

C# generate a public and private keys for the DSA encryption algorithm [closed]

开发者 https://www.devze.com 2023-04-08 01:36 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

How do I generate a public and a private key for t开发者_开发技巧he DSA algorithm in byte array format?


In DSA algorithm (from wiki):

  • Public key is (p, q, g, y).
  • Private key is x.

        var dsa = new DSACryptoServiceProvider();            
        var privateKey = dsa.ExportParameters(true); // private key
        var publicKey = dsa.ExportParameters(false); // public key
    

In publicKey it's P, Q, G, Y propertyes

In privateKey it's X

And don't forget to accept this answer!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号