示例#1
0
        private void VerifyHostKeyByDSS(SSH2DataReader pubkey, byte[] sigbody, byte[] hash) {
            BigInteger p = pubkey.ReadMPInt();
            BigInteger q = pubkey.ReadMPInt();
            BigInteger g = pubkey.ReadMPInt();
            BigInteger y = pubkey.ReadMPInt();
            Debug.Assert(pubkey.Rest == 0);

            DSAPublicKey pk = new DSAPublicKey(p, g, q, y);
            pk.Verify(sigbody, new SHA1CryptoServiceProvider().ComputeHash(hash));
            _cInfo._hostkey = pk;
        }
示例#2
0
文件: DSA.cs 项目: luozhiping1987/nfx
 public DSAKeyPair(BigInteger p, BigInteger g, BigInteger q, BigInteger y, BigInteger x)
 {
     _publickey = new DSAPublicKey(p, g, q, y);
     _x         = x;
 }
示例#3
0
文件: DSA.cs 项目: PavelTorgashov/nfx
 public DSAKeyPair(BigInteger p, BigInteger g, BigInteger q, BigInteger y, BigInteger x) {
     _publickey = new DSAPublicKey(p, g, q, y);
     _x = x;
 }