Created
April 21, 2015 08:03
-
-
Save ttdoda/61bf138badb73143c17c to your computer and use it in GitHub Desktop.
Poderosaのkexでdiffie-hellman-group1-sha1をdiffie-hellman-group14-sha1に置き換える差分
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Granados/SSH2Connection.cs b/Granados/SSH2Connection.cs | |
index d798c3b..a42853f 100644 | |
--- a/Granados/SSH2Connection.cs | |
+++ b/Granados/SSH2Connection.cs | |
@@ -1180,7 +1180,7 @@ namespace Granados.SSH2 { | |
} | |
private void SendKEXINIT(Mode mode) { | |
- const string kex_algorithm = "diffie-hellman-group1-sha1"; | |
+ const string kex_algorithm = "diffie-hellman-group14-sha1"; | |
const string mac_algorithm = "hmac-sha1"; | |
SSH2DataWriter wr = new SSH2DataWriter(); | |
wr.WritePacketType(PacketType.SSH_MSG_KEXINIT); | |
@@ -1241,7 +1241,7 @@ namespace Granados.SSH2 { | |
string kex = enc.GetString(re.ReadString()); | |
_cInfo._supportedKEXAlgorithms = kex; | |
- CheckAlgorithmSupport("keyexchange", kex, "diffie-hellman-group1-sha1"); | |
+ CheckAlgorithmSupport("keyexchange", kex, "diffie-hellman-group14-sha1"); | |
string host_key = enc.GetString(re.ReadString()); | |
_cInfo._supportedHostKeyAlgorithms = host_key; | |
@@ -1533,8 +1533,13 @@ namespace Granados.SSH2 { | |
sb.Append("29024E088A67CC74020BBEA63B139B22514A08798E3404DD"); | |
sb.Append("EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245"); | |
sb.Append("E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED"); | |
- sb.Append("EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381"); | |
- sb.Append("FFFFFFFFFFFFFFFF"); | |
+ sb.Append("EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D"); | |
+ sb.Append("C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F"); | |
+ sb.Append("83655D23DCA3AD961C62F356208552BB9ED529077096966D"); | |
+ sb.Append("670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B"); | |
+ sb.Append("E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9"); | |
+ sb.Append("DE2BCBF6955817183995497CEA956AE515D2261898FA0510"); | |
+ sb.Append("15728E5A8AACAA68FFFFFFFFFFFFFFFF"); | |
_dh_prime = new BigInteger(sb.ToString(), 16); | |
} | |
return _dh_prime; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment