C # generates public and private keys for DSA encryption algorithm

How to create a public and private key for the DSA algorithm in byte array format?

+2
source share
1 answer

In the DSA algorithm ( from the wiki ):

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

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

In publicKey, these are properties P, Q, G, Y

In privateKey, this is X

And do not forget to accept this answer!

+9
source

All Articles