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
                            
                        
                    
                
                                已关闭8年。
            
                    
如何为字节数组格式的DSA算法生成公钥和私钥?

最佳答案

在DSA算法(from wiki)中:


公钥是(p,q,g,y)。
私钥是x。

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



在publicKey中是P,Q,G,Y属性

在privateKey中是X

并且不要忘记接受这个答案!

10-06 05:32