diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 diff --git a/SshNet.PuttyKeyFile.Sample/Program.cs b/SshNet.PuttyKeyFile.Sample/Program.cs index 1a16a15..10a6ae1 100644 --- a/SshNet.PuttyKeyFile.Sample/Program.cs +++ b/SshNet.PuttyKeyFile.Sample/Program.cs @@ -37,7 +37,7 @@ static void Main(string[] args) { try { - var keyStream = GetKey($"{testKey}.ppk"); + var keyStream = GetKey($"{testKey}-v3.ppk"); if (keyStream is null) throw new NullReferenceException(nameof(keyStream)); @@ -50,7 +50,7 @@ static void Main(string[] args) { key = new PuttyKeyFile(keyStream); } - using var client = new SshClient("schwanensee", "root", key); + using var client = new SshClient("localhost", Environment.GetEnvironmentVariable("USER"), key); client.Connect(); Console.WriteLine(client.RunCommand("hostname").Result.Trim()); Console.WriteLine($"Key {testKey} worked!"); diff --git a/SshNet.PuttyKeyFile.Tests/PuttyKeyFileTest.cs b/SshNet.PuttyKeyFile.Tests/PuttyKeyFileTest.cs index fc00048..35b0a68 100644 --- a/SshNet.PuttyKeyFile.Tests/PuttyKeyFileTest.cs +++ b/SshNet.PuttyKeyFile.Tests/PuttyKeyFileTest.cs @@ -14,9 +14,9 @@ public void Setup() { } - private void TestKey(string keyName, string comment, int keyLength = 0, string? pass = null) where TKey : Key, new() + private void TestKey(string keyName, string versionSuffix, string comment, int keyLength = 0, string? pass = null) where TKey : Key, new() { - var keyStream = GetKey($"{keyName}.ppk"); + var keyStream = GetKey($"{keyName}-v{versionSuffix}.ppk"); if (keyStream is null) throw new NullReferenceException(nameof(keyStream)); @@ -30,57 +30,73 @@ public void Setup() [Test] public void Test_RSA2048() { - TestKey("rsa2048", "rsa-key-20210312", 2048); - TestKey("rsa2048pass", "rsa-key-20210312", 2048, "12345"); + TestKey("rsa2048", "2", "rsa-key-20210312", 2048); + TestKey("rsa2048pass", "2", "rsa-key-20210312", 2048, "12345"); + TestKey("rsa2048", "3", "rsa-key-20210312", 2048); + TestKey("rsa2048pass", "3", "rsa-key-20210312", 2048, "12345"); } [Test] public void Test_RSA3072() { - TestKey("rsa3072", "rsa-key-20210312", 3072); - TestKey("rsa3072pass", "rsa-key-20210312", 3072, "12345"); + TestKey("rsa3072", "2", "rsa-key-20210312", 3072); + TestKey("rsa3072pass", "2", "rsa-key-20210312", 3072, "12345"); + TestKey("rsa3072", "3", "rsa-key-20210312", 3072); + TestKey("rsa3072pass", "3", "rsa-key-20210312", 3072, "12345"); } [Test] public void Test_RSA4096() { - TestKey("rsa4096", "rsa-key-20210312", 4096); - TestKey("rsa4096pass", "rsa-key-20210312", 4096, "12345"); + TestKey("rsa4096", "2", "rsa-key-20210312", 4096); + TestKey("rsa4096pass", "2", "rsa-key-20210312", 4096, "12345"); + TestKey("rsa4096", "3", "rsa-key-20210312", 4096); + TestKey("rsa4096pass", "3", "rsa-key-20210312", 4096, "12345"); } [Test] public void Test_RSA8192() { - TestKey("rsa8192", "rsa-key-20210312", 8192); - TestKey("rsa8192pass", "rsa-key-20210312", 8192, "12345"); + TestKey("rsa8192", "2", "rsa-key-20210312", 8192); + TestKey("rsa8192pass", "2", "rsa-key-20210312", 8192, "12345"); + TestKey("rsa8192", "3", "rsa-key-20210312", 8192); + TestKey("rsa8192pass", "3", "rsa-key-20210312", 8192, "12345"); } [Test] public void Test_ECDSA256() { - TestKey("ecdsa256", "ecdsa-key-20210312", 256); - TestKey("ecdsa256pass", "ecdsa-key-20210312", 256, "12345"); + TestKey("ecdsa256", "2", "ecdsa-key-20210312", 256); + TestKey("ecdsa256pass", "2", "ecdsa-key-20210312", 256, "12345"); + TestKey("ecdsa256", "3", "ecdsa-key-20210312", 256); + TestKey("ecdsa256pass","3", "ecdsa-key-20210312", 256, "12345"); } [Test] public void Test_ECDSA384() { - TestKey("ecdsa384", "ecdsa-key-20210312", 384); - TestKey("ecdsa384pass", "ecdsa-key-20210312", 384, "12345"); + TestKey("ecdsa384", "2", "ecdsa-key-20210312", 384); + TestKey("ecdsa384pass", "2", "ecdsa-key-20210312", 384, "12345"); + TestKey("ecdsa384", "3", "ecdsa-key-20210312", 384); + TestKey("ecdsa384pass", "3", "ecdsa-key-20210312", 384, "12345"); } [Test] public void Test_ECDSA521() { - TestKey("ecdsa521", "ecdsa-key-20210312", 521); - TestKey("ecdsa521pass", "ecdsa-key-20210312", 521, "12345"); + TestKey("ecdsa521", "2", "ecdsa-key-20210312", 521); + TestKey("ecdsa521pass", "2", "ecdsa-key-20210312", 521, "12345"); + TestKey("ecdsa521", "3", "ecdsa-key-20210312", 521); + TestKey("ecdsa521pass", "3", "ecdsa-key-20210312", 521, "12345"); } [Test] public void Test_ED25519() { - TestKey("ed25519", "ed25519-key-20210312", 256); - TestKey("ed25519pass", "ed25519-key-20210312", 256, "12345"); + TestKey("ed25519", "2", "ed25519-key-20210312", 256); + TestKey("ed25519pass", "2", "ed25519-key-20210312", 256, "12345"); + TestKey("ed25519", "3", "ed25519-key-20210312", 256); + TestKey("ed25519pass", "3", "ed25519-key-20210312", 256, "12345"); } private static Stream? GetKey(string keyName) diff --git a/SshNet.PuttyKeyFile.Tests/SshNet.PuttyKeyFile.Tests.csproj b/SshNet.PuttyKeyFile.Tests/SshNet.PuttyKeyFile.Tests.csproj index da722ae..d2009ce 100644 --- a/SshNet.PuttyKeyFile.Tests/SshNet.PuttyKeyFile.Tests.csproj +++ b/SshNet.PuttyKeyFile.Tests/SshNet.PuttyKeyFile.Tests.csproj @@ -1,5 +1,4 @@ - net462;net7.0 net7.0 @@ -19,6 +18,6 @@ - + \ No newline at end of file diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256-v3.ppk new file mode 100644 index 0000000..b4d1c88 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256-v3.ppk @@ -0,0 +1,10 @@ +PuTTY-User-Key-File-3: ecdsa-sha2-nistp256 +Encryption: none +Comment: ecdsa-key-20210312 +Public-Lines: 3 +AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCagnfkYmNXN +lnVjIcIAWysh4JMApD9pefvRtVDJ+SbYX9/n+yZvYbonpgKF83vBI60/l5yJG81s +5bZ78muEkkQ= +Private-Lines: 1 +AAAAIE2cC3R6C97CKiBgOLH65E1E7+8FHxBs3KZFPfuksPcM +Private-MAC: 998361d76ad4c6b6f3c16b1e0d9daa4d98541ce0c18f8118289af99c7d92495d diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256pass.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256pass-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256pass.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256pass-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256pass-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256pass-v3.ppk new file mode 100644 index 0000000..9ba8ea5 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa256pass-v3.ppk @@ -0,0 +1,15 @@ +PuTTY-User-Key-File-3: ecdsa-sha2-nistp256 +Encryption: aes256-cbc +Comment: ecdsa-key-20210312 +Public-Lines: 3 +AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHhY99vQoPVT +6F0PofvedF0lwEz0jx/b9eJTZWDdjWG3ElGV8OCoGjtSIFChASt9XXoHW4C9feuC +nKJJLfmNcbA= +Key-Derivation: Argon2id +Argon2-Memory: 8192 +Argon2-Passes: 8 +Argon2-Parallelism: 1 +Argon2-Salt: 5e5779a49886e47f0ac22e81aa756706 +Private-Lines: 1 +RYSywxzZ03mlgw4+s5nbnmrCZo+iu3S1abauEs03Xn1lzzGav9vA555vkmpwuZGW +Private-MAC: 9f5373bc1dca57a71dda7bdc879925d997328cf5bdd0233472be1ccd7a23be88 diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384-v3.ppk new file mode 100644 index 0000000..5184da6 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384-v3.ppk @@ -0,0 +1,11 @@ +PuTTY-User-Key-File-3: ecdsa-sha2-nistp384 +Encryption: none +Comment: ecdsa-key-20210312 +Public-Lines: 3 +AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBEVWztj5M3Ps +CbbdwweE3eQjigjrlJz8dCZLvjpSulzc2ck6/s3oCaX7Pg/Sbvo2piAjduLWxsio +owjJfsKz/nfaoaa9tfkOKf62aWISlOO1FfD9PbJtp3W2e06DTE1JTA== +Private-Lines: 2 +AAAAMCdESh2t29FUCB3S6dKIxBVzdb6BtVbo1CbSZohDWbVjTrSY0mAFWOKrrxMl +L4pa4A== +Private-MAC: 776be7510bbb5b7e3f05231be31b7af578f6bb1d4ba506658f6b287a2aefd90a diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384pass.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384pass-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384pass.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384pass-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384pass-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384pass-v3.ppk new file mode 100644 index 0000000..ca91130 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa384pass-v3.ppk @@ -0,0 +1,16 @@ +PuTTY-User-Key-File-3: ecdsa-sha2-nistp384 +Encryption: aes256-cbc +Comment: ecdsa-key-20210312 +Public-Lines: 3 +AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBMVJXj/SaVtm +CpcQeDLIp5oyEEy8zzBS4uh2q/uZ3qkC6i20yErTR2wuWp+E/tRFvNK2m9kuvny+ +/eZzry62NNPhJdR7+dbbfCIGN9zoTe3UpSPj2MdmU1Frmbe3DJRshQ== +Key-Derivation: Argon2id +Argon2-Memory: 8192 +Argon2-Passes: 8 +Argon2-Parallelism: 1 +Argon2-Salt: 6214750297d2ca6532a31438fab8efd9 +Private-Lines: 2 +sBCQjcGnKlHmGJtk/YrANuMFOhqKFeUwyQi1GSAi4nx3dNnv3Y/bIWb4EmtMJoCc +4bZMCc2v9qpn5RG4ni5bxQ== +Private-MAC: d7ca22c80c194755a5f61f5cce9cbfd1040a4793902a27b67a07b1b58c203012 diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521-v3.ppk new file mode 100644 index 0000000..1e401d8 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521-v3.ppk @@ -0,0 +1,12 @@ +PuTTY-User-Key-File-3: ecdsa-sha2-nistp521 +Encryption: none +Comment: ecdsa-key-20210312 +Public-Lines: 4 +AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBADYWtDlG1mj +5cUO6HTxIPXu/bWyNLJaVktlIWdivUX84gl/zjFKcLchQUG/jRgyiRBNAwxHT748 +GarGUwkAzB7KAgCfyjU0ux7egolYV5UAo/F9yXiQnPhudzvw9cImye5nOtW8Vq/2 +VlQSwe+vIFwuPGdV0/qeuPHS8tG3rPF6yB75dQ== +Private-Lines: 2 +AAAAQgFFjflZi/b4NMLFM3qzZZQmgVUjVoy3IOhciB8aSetVIjaUsSqAr3zVQNMR +G/iiK/nBoCuJ2Ycq6LenBdr+UF0pag== +Private-MAC: b1d9235de016e77bdc39bbf129a734aae25ef23d569c7eaae0c2f97ce557f7b1 diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521pass.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521pass-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521pass.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521pass-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521pass-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521pass-v3.ppk new file mode 100644 index 0000000..9af26c7 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/ecdsa521pass-v3.ppk @@ -0,0 +1,17 @@ +PuTTY-User-Key-File-3: ecdsa-sha2-nistp521 +Encryption: aes256-cbc +Comment: ecdsa-key-20210312 +Public-Lines: 4 +AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAIYjhprWSd +0x4DLK3PWgh4ww16ZVYmv5PSBEeFBJCRcifXg+E7+Qex4s1vaPJWgqNfXjDgvf8/ +gnSON/460Yx66QE1Ib1C+hymE7NwfLg5tqfFHj32wj7uWkVktWupB940Q7X/S/UO +PDI8ZpOOpUsC0+ZZIemHgGbAK0O4Ufn0yE6yVg== +Key-Derivation: Argon2id +Argon2-Memory: 8192 +Argon2-Passes: 8 +Argon2-Parallelism: 1 +Argon2-Salt: 0e64d0a6818a712f0d9eeae82ced040f +Private-Lines: 2 +gixtsyv+m1SaututHoaBlRLc60yjxfsEotQXlikpnW3yZg2LiSYNe11p8Nn8hO// +yHHndBroBenxldvTcKq5uwazGjIPNu4RoVRKHRwGEro= +Private-MAC: 3aa14fba5334a6c0e0d8c490e7423c92d9d92ca1e60275dc4a2cc783d91a0f9f diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/ed25519.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/ed25519-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519-v3.ppk new file mode 100644 index 0000000..62704a5 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519-v3.ppk @@ -0,0 +1,9 @@ +PuTTY-User-Key-File-3: ssh-ed25519 +Encryption: none +Comment: ed25519-key-20210312 +Public-Lines: 2 +AAAAC3NzaC1lZDI1NTE5AAAAIMFKb9ssb3VHYh/R/vBx/0/nYrqUGqQibN7YaAo7 +PztZ +Private-Lines: 1 +AAAAILpT/RJp+2G309qzZDX14PLle2v5bu7NBNIzIXuQ5IIf +Private-MAC: aab7fb023e77dc84046bd5ca4b0eeb53b8d2fc1260f07906dd36ceb90b62470f diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519pass.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519pass-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/ed25519pass.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/ed25519pass-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519pass-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519pass-v3.ppk new file mode 100644 index 0000000..b15800c --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/ed25519pass-v3.ppk @@ -0,0 +1,14 @@ +PuTTY-User-Key-File-3: ssh-ed25519 +Encryption: aes256-cbc +Comment: ed25519-key-20210312 +Public-Lines: 2 +AAAAC3NzaC1lZDI1NTE5AAAAIFGNsY1vMX0acPcRtrShWKqdSpWKI5omJdMiCShn +k++b +Key-Derivation: Argon2id +Argon2-Memory: 8192 +Argon2-Passes: 8 +Argon2-Parallelism: 1 +Argon2-Salt: 0c0505619dbc258cd78291c8818b6201 +Private-Lines: 1 +C7z8akdj4UE9Eioxogqd23Yx84fktOLYo6lvBWtjLqSihrOZY4HM0ankVIRVLq4x +Private-MAC: c11c0cd03e3331963c09d215401f5c564ab78321c600b47a827fb485fccc4a69 diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048-v3.ppk new file mode 100644 index 0000000..22d3279 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048-v3.ppk @@ -0,0 +1,26 @@ +PuTTY-User-Key-File-3: ssh-rsa +Encryption: none +Comment: rsa-key-20210312 +Public-Lines: 6 +AAAAB3NzaC1yc2EAAAABJQAAAQEAjfeoHlz1KHSwDhTSjnbeKSek/I/KjOSzViHe +E7018KA4/UY91LTFHEc+vnkCWIYb2tvigZHusVlAg5QZHzBLN3XfJSH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SlWInlHlkcu9P7tusX26VIKd2I3QmN8mhKkK+J+oiaEbYtDJc +E6QpMSGBOJ6jbyYXUtve8xl8TW5/2f7T8jz1WXn5bp9+7Jo= +Private-MAC: e6b1fa6b31bd32b6af59dc12eed89cbe0cdbecec0cd10491434e5763394c1401 diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048pass.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048pass-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048pass.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048pass-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048pass-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048pass-v3.ppk new file mode 100644 index 0000000..eea5c38 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa2048pass-v3.ppk @@ -0,0 +1,31 @@ +PuTTY-User-Key-File-3: ssh-rsa +Encryption: aes256-cbc +Comment: rsa-key-20210312 +Public-Lines: 6 +AAAAB3NzaC1yc2EAAAABJQAAAQEAl/v5jlT5CTLPJB8gGvcnfEMxQc8olDyZvoID +h/jdGYwGweGdDuLGQjyesadeqqPlv+zyzwQSZwK8UmPDzZz/nO6NPwvnlyNG1goy +SaNgCcYVkRhsyB0K2dXLAe+5Sccc+0rHtfetG5i2VzG/9UEJyRVLOFfEgatcH4Oe +sbYEG84xFgH0I9DwcDgAiB2ac9Vt5lxkDHAowV61LMtDE/ZPV2bhRV9HvxGC/sXc +KA3IbCGgyc2dihEYfDvt3RHq2krZiymPCyhYmTBxYpLLpNFevKoQtMZR7ujeWB4w +E94QPqSU1gMahDnxONMFcTl7QQB1mqqsGZ2bFV0LPpbJ1D6d5w== +Key-Derivation: Argon2id +Argon2-Memory: 8192 +Argon2-Passes: 8 +Argon2-Parallelism: 1 +Argon2-Salt: b7e0ec274d6484265c4c390b3a46ae97 +Private-Lines: 14 +I/qIq+/RL6dPWsy8ML+t7DWHUH2FrszL3ha33SGQactMXjCL337mavpLqsJvmn/L +GfPfbEw04noD+AX4ZnLqhadkOSJDZzvynVt1nifVTHb8/siCDJ1pJnOSD44PhiTE +Sik5l2oANdf7vibMA1luqtBxITr1pl4CiuDhvw0/fHtfSCQES9uxT6A0WbFHtWD8 +zw4yrLHVvPi8My4v2txzIw1ww/uLDeRd+6RH7Vg/M+4zgxDNBdvx9ddfG657Fjld +o1mphpjc7cPD1otn/r36YHAPMODa+8QGlhSp9QoPLLUnyYEQPqG/+7GKq5KGRjD2 +d2vHWzSDVZcdmHuZy1Fc2HTCvzgP/v0MuwPt+m6/W/wBW66/pmnlRJsNZ2t4NyPC +O0xw4djCUfUoFVU22CqLsw3+PppYpz/dhjUTKwrrdPHRSjOBwUEjFUUiJ/KtLe0s +5zvnKjccpflUb3T5rnMyfFAAVqueB7RoIvBqpyBtvuUNxUVIgazCCVdFgTWI8x44 +pC7uXZS56Aj6+wWRzNl9755+KyWBfhTPFPixlLRgo5UzERYwM5XPEzeebMMZtYgS +L19nOoeZTwiuhyCny4WWkGsMeokskKdcYzojW5qbrTp3CKlctsZIUlKTUoOaHjwf +d+LgcwvLRXWJgypGVpYKGjLlJIHe/KQ2Y8zDbZ7tcnCRXlEtmwXSN5TkgUYYS6f2 +BxjsiEd+sdnjYB5Nw7Lncq3tSJENn3RIu0wtLH18Onq5NPqorv4pplaGum6iIfSF +qj0+/PbZbVh4XwThWHy0ThmEdIAx3RR9OaNg4UnAaTdFxzFt6+hzDzNcNS+y70lD +tMOcFs4Q65jZ1Is3qjKteCLktnbPtTklXYS7yp45UQOlkyz6+I+NvIkgpVM6I9Wd +Private-MAC: 76a694aa36c651e20614ee081a165df882e4d46dc922a109dd39cf5b9777bbed diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072-v3.ppk new file mode 100644 index 0000000..8ff360b --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072-v3.ppk @@ -0,0 +1,36 @@ +PuTTY-User-Key-File-3: ssh-rsa +Encryption: none +Comment: rsa-key-20210312 +Public-Lines: 9 +AAAAB3NzaC1yc2EAAAABJQAAAYEAldr4hr+lIwILyOT103TZ7+wrTFg3QObCGlBq +tlwv/LuZitlPAc/swjVfzoZ7MfNxlKI/raiE5i077vQnqLRHTZsnas+8EFEgJmhd +gxd5gxlTjHZDMH9RP4mQrWyIw+1nd5hF4olzWD9WdsArCZ9CNb9gTQiK68fRLEQc +Krmwfijctecbfg5toLF344ojaghfDULBdLId9qIoeMLhvPfjZ3LEyPpYVTJ8TbOi +lkFSER+HyWg4RVrEJI9EI21XqkOZ3IyF253kTIdtMHQPKdSFxuEwJseDCcpAsCTU +v/MRL3T5ZuLEqaKbwCA4ZPkc5srho85hdjRCnWakwGE7gU3r4LBsf+eIWHusj3jU +hk65yvF3qJi4qFHNaZr2Pk9q+Ai7h6Ot5pE+cejmuGSxoQJBW+ekAbuMwtKfoSD5 +l1oywynZh3fbTkqzpLzJdm8veVrtSIwrvy/QzRmwgia90LJ9THQsFFW8PDPoTn2N +qUeCjWua/lJjsPAIIlX32RNedi2Z +Private-Lines: 21 +AAABgCBmskal+jEVMvsBEo6VzkG2heb+USLKHCFdfttSM+OeLwlDvg46y2hC5EhU +banvcoEAfHiTI6djue55+ryxW4ZmvGofE+faMHcBzweWX3ZKqkfiOAp8ZJgdvmqv +rt5BKyDG+lp+lXrdQyCYQKgiby43N2qaEDL6xXFa1ahfgBtHGvbl3G5ITw3826bR +wnfKdWqmpl5rs3OYrs4An4LN0E238zJfpGVysxe4IydoEb6DW6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v6NxUdylkF +Private-MAC: 8319561c08b4f407f2aaeb58b8339fec9d156ea91cb9143635f222fc57bc603b diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072pass.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072pass-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072pass.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072pass-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072pass-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072pass-v3.ppk new file mode 100644 index 0000000..1f3179d --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa3072pass-v3.ppk @@ -0,0 +1,41 @@ +PuTTY-User-Key-File-3: ssh-rsa +Encryption: aes256-cbc +Comment: rsa-key-20210312 +Public-Lines: 9 +AAAAB3NzaC1yc2EAAAABJQAAAYEArVI7zzbTLTlYNEWXkCv4MtKklNYytnHwcCcG +MKMQ+itf9q4AULLng9KqptDTuvFDekl/yWHaszXOJrB2cB263VuqybT2B1oCxMaj +yXVti4dIPV4Luz2txS4FEX8YqIXM0gfThtAwFI45XUdOEVpnnIH0ofbdGaoGAxMd +GR4rPJRQdsQAla2zDYYx/apglTOUSsptaZU7ujzERutVxpZIxJXKf9TCNY5wPsrk +N4ZY1KYuv1AB2iv+g4DgGSC1KFHw98nGSpBKIoAKv5MLIH/vCqCFTOzJSZR9qjHw +N0SEjIs8mTjnPEtlMfo/X/O9XsuHYQY7zEFBE5iA6wAI5CtplgsLlg2Id8k/MADM +9yFRk7rZiSjf77xKj80Hlc4joKtLT5mcqEmbUhIQ4CB5GMbbGezPzKTf0ICHw0yQ +tvEkaIB9QCjAQbtSr1ZAS8b+jmuxcOcCIcTNgnXZWXb37aYGf1lUM4afzPMuiQo5 +xRvpEC2xJFxV6k0/lx8t5JQSgDhH +Key-Derivation: Argon2id +Argon2-Memory: 8192 +Argon2-Pass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Q27QNgMdWukibdSKkU+GTpV6j9O5m580z8w +InF1oiXyd33jTfA/g4tYq9XzSBIXVei+bbI7eQOquTGi70/uwCv/PB4YvlwzBiMc +8j6qKz/SFdXAgkdb/bv5RTC6fnGgSGFe8JeBib7x0WeClOnCABSJFdnh8Sc+o9DY +VjVXCKdNLLt0AGMylWIcJMXbSQ+eg8Er7TB8+heV2TcdgduKVdO4kPMvoIas8YDt +JlfyFtkGKj/GhWgx4NIlIt/0wL6EDi8AdiDnyoz7/QlvbQaksRFc3wtXEYqxPIXX +juAVmsi4FXIJjlzIGbNEHjXG2uQe/O8qaZ/1PA4zKY0= +Private-MAC: ad042803a0bcb0d3cd01dcd89b36e676d0bdfec0b73f35226ac44b1ad3cd8568 diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096-v3.ppk new file mode 100644 index 0000000..f364759 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096-v3.ppk @@ -0,0 +1,46 @@ +PuTTY-User-Key-File-3: ssh-rsa +Encryption: none +Comment: rsa-key-20210312 +Public-Lines: 12 +AAAAB3NzaC1yc2EAAAABJQAAAgEArIKnfOxkOwdYah9O8q6humX4EfPoM840SadO +brf0+32wawGjbbNLmhQtrKyeEJ7TQ/M0OAjmcS5B6PxGMHAOTHF6I1x/pkj9wAK6 +IJ7wmDm3NcPtRttonXHZgd6MugF6GrwzYuNbSa58vhSxIWh2gnONzRjbw6Im8HVM +N8n2hgXt2UFsANUVMi4AosT46VZf4jeoN0JTWUAlTzwKdPJwoHax12+2CpmEiH0+ +DXpr2wYainpq4md9L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vdxH3 +c+pyfS90vpP4qjnFUW0Q83k/jOfhaT1g6jdhi2zPh16T7JPQxLkGI1Uyq2R5fDNa +c5Q= +Private-MAC: 5d08d1ec29141e9b0215d89e354e9714a8a0c1a5d3f4f3004262f7645cc2f467 diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096pass.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096pass-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096pass.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096pass-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096pass-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096pass-v3.ppk new file mode 100644 index 0000000..acecd1f --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa4096pass-v3.ppk @@ -0,0 +1,51 @@ +PuTTY-User-Key-File-3: ssh-rsa +Encryption: aes256-cbc +Comment: rsa-key-20210312 +Public-Lines: 12 +AAAAB3NzaC1yc2EAAAABJQAAAgEAz7SPEGJRVOWEgl/FcJ4yTqKf9IdKTVD3vaUF +4dSRqSI2ychAA6MW0m7JKKthekTT88l4+bOnClvPN78+4ImCPF72/eCB8ntikRS+ +nB17opqKNb1ST1XhyDpqADiKDmz6mGtq2mDkM1nKV46BSy7xi2WKcN91H6+iGa9G +cMcxzbCKsKFRLyzcby2O3IpppQfhDXmpFBuM2UBcTSP2ESAygTFp8ewCiqzcE7AX +2CRE64risC8G/1WdUFNWf8fpKGIpeh8Qc1gSXn0Fi9NUDAU05KXW+W48oMgCvhrA +9SH4wPRBMRSx4qjC5UQydBzoOk3iPv4TjOqpBFBvSHJbLboSzvhe/8uEcRwvc7DY +PCO87CNwAt8SBRAyoNlnEZgQCW5jCyRxwz3eEOqXENr9n6O2/zorJaveKQyF+7Vq +tgdNmFgjbJFkM9DH4zAbZWuKM8xHMvbc/w6Qb/D+YRdQRCAczB8WjrT6qSmTmahf +V2nJXD3PSajSWgZE1/3Oex3POk0CResh/QOrJpm3YP+wE6xgjLHZF4TdVqikbRsc +kIivaR5KmymzhDcqdgLvIS/nAmCIheq/BitPA66XL5DFL5ec53Hhqafy/SU77Ztl +u3kAXq2hh5En0AY/eFS/sYMTTvBJxPan81wcIdeosGJVF8vGuxI6pQn0B26VwWWF +mwEmQfM= +Key-Derivation: Argon2id +Argon2-Memory: 8192 +Argon2-Passes: 13 +Argon2-Parallelism: 1 +Argon2-Salt: 90d47a5ce21ffd0e19ad5a39c2fff777 +Private-Lines: 28 +7YBqlF56czaXdCg3sw0aE8VfohFXqbfbHKLXThQwWkHigO/Fs+Ix0cvQkrOlP9iI +A9IxSBBbFAXfDEbWGOtAn4e0AVDxCj1CIEw+jPKGCCcxjLhM4uW3vb4rb7jFDrmP +7gjnWIHturiZiIGM8PKLU3wJ4A41osgB2TO4fLPT3riPErw88NWgt2/VOVTOUa1V +GS1XQOS9lGynC8CjjImjwuYbgX+VELqAa0e4DtEStaBXcEDqkTzGtjmAlLZbUsDT +YA+6x0Tv0xYrIS6eyvwsvGCuUZCHW3NtQtvNu7wILZaUEZ/x8lhwgsD6qOun8Fq0 +yJvvE14SXZ2ULuJBOUMG0zuKo2D2IhsA/mEh2itXAtBN6+CCSYPi+bv2PFRBY0cs +sN/RMhnaHbpRYQNVTZ2QQspBHwFzpaNfEfkvekhbx94rJvqIlgGI68K4XnJxPFxp +yiT5JsRDEAKLUml8iFNk2rpkedJ1PsenAWCMLL/yQz9QU+Colfk1j4vbNJg8rbXW +DeAmDh0UnpbSeKVW9wnLHSt8px5b6UTOllZgEt5rIGy44smKHspnSUXYfVSQUKuR +2PGH3h1FXscE3l8czFAO3SG989awMIQmRTh9bOc5Y51HPT8RKMg+cx/3RUyMDbpK +34ap+V4c4cxpGB5xnmFXS1HePFV1i/PT+eccwVqljLiwteuo+07cStWwVe7p0ARl +3BSU5EAXblRM0EJFkssBLdjOl4xdvKOWO6qMp5M+IqNOVC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304bfa2b425b33c7f41 diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192-v3.ppk new file mode 100644 index 0000000..89fce2d --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192-v3.ppk @@ -0,0 +1,82 @@ +PuTTY-User-Key-File-3: ssh-rsa +Encryption: none +Comment: rsa-key-20210312 +Public-Lines: 22 +AAAAB3NzaC1yc2EAAAABJQAABAEAiFZ4IAxGRgk4n2DRDLLNVBGp8sqSj0KTbIrh +TexAJK5wN3j9aNOOA3P8Q8SSqYtyX4Fpdk1MZMZEa/e4PQTkOerGvdKUbd9TkuQY +OtKMgd1393rdFNp4hb9gzLSr6QeqkAP16bKymm8LZH0YymDAqHdO0IK2bt13g5HG +nbii5ok5dWx5Mt2+MOmw31qnZimt/kM/nzsHZEfd7A84HPDZZDWdxZh9A4nbANu2 +8vupED9MkFUjOupBrY1DUXoQVVSrxxL3ghzHtAcjK905yEmZNbys7DVyd/PdDWHl +DsKjv6nzAXmuvVVTlfKpQWTysq94vkLlgJIlv8xu4ON8hIhq4/K/Gr76Ko0aFlsy ++82U4lVJQelMdm30G5Tpq8IEAiyclLZmnmGlVsZyc/ox5dJ0AW7XC/RQKEX3eQws +zGdtSYROg9z8vc8gFDSxdxQuuBENAm+b3pPQonUSCkhmlMRkEF0Yh2Kiy5C2Au/Z ++3RcdomPsV3ey6mMJV+x319BiMSa2KAyByynWZhjDU/nnWh6uK3xuwSGef3Cki/q +x+4sETOlMqIt0fCzxRuQOYw4HYQHnYez8EJ3jOHT8ldAQyS8IcovtdU33D5/LrN5 +IC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c629042a34de17a7f7151bc436bedf8807 diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192pass.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192pass-v2.ppk similarity index 100% rename from SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192pass.ppk rename to SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192pass-v2.ppk diff --git a/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192pass-v3.ppk b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192pass-v3.ppk new file mode 100644 index 0000000..2e57248 --- /dev/null +++ b/SshNet.PuttyKeyFile.Tests/TestKeys/rsa8192pass-v3.ppk @@ -0,0 +1,87 @@ +PuTTY-User-Key-File-3: ssh-rsa +Encryption: aes256-cbc +Comment: rsa-key-20210312 +Public-Lines: 22 +AAAAB3NzaC1yc2EAAAABJQAABAEA8MaKLgqJdzHuXDSHe1jbhu3q4iYtQrpQMrIx +x1p9tJ5ypMsysMNppGT1lL1kQ3gFetTA4S4PlXU9pZ/scrlKItTr+HPg+0mHqW47 +WK9Ql7cqcbwhZBn51kBWF3Th83fjsQg34HlvGPNLxA+9DwVgmFGtg++wOuxm6X0r +05ZQC4AEXajr2oYtlL/AMT0401jviVOZIOCUBMLjTivA3Jd/GHLOPdqQQvnttztp +X4AUbLFL4zGnO2utOE85f8K5SWNsFSbizl9RlFOZDAuGoIgxQ3CEtXGlFSdgo5fL +SWVtJvgeMMY4TyJRvXUCNrVXbRbybz9hGKNcjalt94q8p/kP2c1vy1pLxtikc1TT +9h4jEMoz5KJD5OkdfDkZUxK0Ud0AyJFw7TVvy/ww8gOVbm9JbzKy1fLZn96+iJYG +v0mjJul8g3UbSFD84T3nsKEfrk6j8N9uZLhFEreEJZ/EmxYvu3i3ANXXXbkXZstt +nII8kEqH+tDFQpvoYjI3d3147lPq2ehqAL/+RMW/9oENa/1oCKAq+0XwWcAoNi3b +49k1szQv/tSEl+fadFybRHHPDI8u6lbAauxJTZ0xWf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VYtxblzQ43lhEjaqXckoMwbJfyc1PEcwoktC1pnrc+rxu7K +LvLlPo/8wbLVNVSNXLGaHk+NCYYgGsrzmTREZVAZW/rCorSwy7dWx0bRDlVylJMD +Private-MAC: f200685a0b973d9ecec0a31b2f3c47a4bd0facb946ceb034b8fb9c09a32d0adc diff --git a/SshNet.PuttyKeyFile.sln b/SshNet.PuttyKeyFile.sln index ee3f9a5..34bb09c 100644 --- a/SshNet.PuttyKeyFile.sln +++ b/SshNet.PuttyKeyFile.sln @@ -1,10 +1,13 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SshNet.PuttyKeyFile", "SshNet.PuttyKeyFile\SshNet.PuttyKeyFile.csproj", "{C0324CE2-D5A0-449E-BB5C-496E5E57B112}" +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33530.505 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SshNet.PuttyKeyFile", "SshNet.PuttyKeyFile\SshNet.PuttyKeyFile.csproj", "{C0324CE2-D5A0-449E-BB5C-496E5E57B112}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SshNet.PuttyKeyFile.Tests", "SshNet.PuttyKeyFile.Tests\SshNet.PuttyKeyFile.Tests.csproj", "{FEA198B4-7A1D-410B-B858-95C0FD9D008D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SshNet.PuttyKeyFile.Tests", "SshNet.PuttyKeyFile.Tests\SshNet.PuttyKeyFile.Tests.csproj", "{FEA198B4-7A1D-410B-B858-95C0FD9D008D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SshNet.PuttyKeyFile.Sample", "SshNet.PuttyKeyFile.Sample\SshNet.PuttyKeyFile.Sample.csproj", "{79FDF8EB-FD96-477C-8287-E1449741255F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SshNet.PuttyKeyFile.Sample", "SshNet.PuttyKeyFile.Sample\SshNet.PuttyKeyFile.Sample.csproj", "{79FDF8EB-FD96-477C-8287-E1449741255F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -24,5 +27,12 @@ Global {79FDF8EB-FD96-477C-8287-E1449741255F}.Debug|Any CPU.Build.0 = Debug|Any CPU {79FDF8EB-FD96-477C-8287-E1449741255F}.Release|Any CPU.ActiveCfg = Release|Any CPU {79FDF8EB-FD96-477C-8287-E1449741255F}.Release|Any CPU.Build.0 = Release|Any CPU + {3012A635-22B4-499C-B3E2-9261ECD00D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3012A635-22B4-499C-B3E2-9261ECD00D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3012A635-22B4-499C-B3E2-9261ECD00D6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3012A635-22B4-499C-B3E2-9261ECD00D6E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal diff --git a/SshNet.PuttyKeyFile/PuttyKeyFile.cs b/SshNet.PuttyKeyFile/PuttyKeyFile.cs index 2ae58ba..26fd6a0 100644 --- a/SshNet.PuttyKeyFile/PuttyKeyFile.cs +++ b/SshNet.PuttyKeyFile/PuttyKeyFile.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; @@ -11,17 +12,25 @@ using Renci.SshNet.Security.Cryptography.Ciphers.Modes; using Renci.SshNet.Security.Cryptography.Ciphers.Paddings; using SshNet.PuttyKeyFile.Extensions; +using Konscious.Security.Cryptography; namespace SshNet.PuttyKeyFile { public class PuttyKeyFile : IPrivateKeySource { + // PPK file format: https://tartarus.org/~simon/putty-snapshots/htmldoc/AppendixC.html + private static readonly Regex PuttyPrivateKeyRegex = new( @"^PuTTY-User-Key-File-(?[0-9]+): *(?[^\r\n]+)(\r|\n)+" + @"Encryption: *(?[^\r\n]+)(\r|\n)+" + @"Comment: *(?[^\r\n]+)(\r|\n)+" + @"Public-Lines: *([0-9]+)(\r|\n)+" + @"(?([a-zA-Z0-9/+=]{1,80}(\r|\n)+)+)" + + @"(?>Key-Derivation: *(?[^\r\n]+)(\r|\n)+)?" + // Putty3 + @"(?>Argon2-Memory: *(?[^\r\n]+)(\r|\n)+)?" + // Putty3 + @"(?>Argon2-Passes: *(?[^\r\n]+)(\r|\n)+)?" + // Putty3 + @"(?>Argon2-Parallelism: *(?[^\r\n]+)(\r|\n)+)?" + // Putty3 + @"(?>Argon2-Salt: *(?[^\r\n]+)(\r|\n)+)?" + // Putty3 @"Private-Lines: *([0-9]+)(\r|\n)+" + @"(?([a-zA-Z0-9/+=]{1,80}(\r|\n)+)+)" + @"Private-(?(MAC|Hash)): *(?[a-zA-Z0-9/+=]+)", @@ -49,6 +58,12 @@ public PuttyKeyFile(Stream privateKey, string? passPhrase) Open(privateKey, passPhrase); } + public static bool IsPuttyPrivateKey(string keyText) + { + var privateKeyMatch = PuttyPrivateKeyRegex.Match(keyText); + return privateKeyMatch.Success; + } + private void Open(Stream privateKey, string? passPhrase) { using var streamReader = new StreamReader(privateKey); @@ -69,33 +84,111 @@ private void Open(Stream privateKey, string? passPhrase) var macOrHash = privateKeyMatch.Result("${macOrHash}"); var hashData = privateKeyMatch.Result("${hashData}"); + var keyDerivation = privateKeyMatch.Result("${keyDerivation}"); + var argon2Memory = privateKeyMatch.Result("${argon2Memory}"); + var argon2Passes = privateKeyMatch.Result("${argon2Passes}"); + var argon2Parallelism = privateKeyMatch.Result("${argon2Parallelism}"); + var argon2Salt = privateKeyMatch.Result("${argon2Salt}"); + if (string.IsNullOrEmpty(encryption)) throw new SshException("PuTTY private key file encryption was empty"); var publicKeyData = Convert.FromBase64String(publicLines); + var macKey3 = new List(); byte[] unencryptedPrivateKeyData; switch (encryption) { case "none": + { passPhrase = null; unencryptedPrivateKeyData = Convert.FromBase64String(privateLines); break; + } case "aes256-cbc": + { if (string.IsNullOrEmpty(passPhrase)) throw new SshPassPhraseNullOrEmptyException("Private key is encrypted but passphrase is empty."); - var cipherKey = GetCipherKey(passPhrase, 32); - var cipher = new AesCipher(cipherKey, new CbcCipherMode(new byte[cipherKey.Length]), new PKCS7Padding()); - - var privateKeyData = Convert.FromBase64String(privateLines); - if (privateKeyData.Length % cipher.BlockSize != 0) - throw new SshException("Private key data not multiple of cipher block size."); + switch (fileVersion) + { + case 2: + { + var cipherKey = GetCipherKey(passPhrase, 32); + var cipher = new AesCipher(cipherKey, new CbcCipherMode(new byte[cipherKey.Length]), + new PKCS7Padding()); + + var privateKeyData = Convert.FromBase64String(privateLines); + if (privateKeyData.Length % cipher.BlockSize != 0) + throw new SshException("Private key data not multiple of cipher block size."); + + unencryptedPrivateKeyData = cipher.Decrypt(privateKeyData); + break; + } + case 3: + { + Argon2 argon2; + var passphraseBytes = Encoding.UTF8.GetBytes(passPhrase); + switch (keyDerivation) + { + case "Argon2d": + argon2 = new Argon2d(passphraseBytes); + break; + case "Argon2i": + argon2 = new Argon2i(passphraseBytes); + break; + case "Argon2id": + argon2 = new Argon2id(passphraseBytes); + break; + default: + throw new SshException($"Encryption Key Derivation {keyDerivation} is not supported."); + } + + argon2.DegreeOfParallelism = int.Parse(argon2Parallelism); + argon2.MemorySize = int.Parse(argon2Memory); + argon2.Iterations = int.Parse(argon2Passes); + argon2.Salt = StringToByteArray(argon2Salt); + + // Argon2 takes two extra string inputs in addition to the passphrase and the salt: a secret key, and some ‘associated data’. In PPK's use of Argon2, these are both set to the empty string. + //argon2.KnownSecret = new byte[0]; + //argon2.AssociatedData = new byte[0]; + + //So, for ‘aes256-cbc’, the tag length will be 32+16+32 = 80 bytes; of the 80 bytes of output data, + // the first 32 bytes are used as the 256-bit AES key, + // the next 16 as the CBC IV, + // and the final 32 bytes as the HMAC-SHA-256 key. + var cipherKeyComplete = argon2.GetBytes(80); + + var cipherKey = new byte[32]; + var crcIv = new byte[16]; + var macKey = new byte[32]; + Buffer.BlockCopy(cipherKeyComplete, 0, cipherKey, 0, cipherKey.Length); + Buffer.BlockCopy(cipherKeyComplete, 32, crcIv, 0, crcIv.Length); + Buffer.BlockCopy(cipherKeyComplete, 48, macKey, 0, macKey.Length); + macKey3.Clear(); + macKey3.AddRange(macKey); + + var cipher = new AesCipher(cipherKey, new CbcCipherMode(crcIv), new PKCS7Padding()); + + var privateKeyData = Convert.FromBase64String(privateLines); + if (privateKeyData.Length % cipher.BlockSize != 0) + throw new SshException("Private key data not multiple of cipher block size."); + + unencryptedPrivateKeyData = cipher.Decrypt(privateKeyData); + break; + } + default: + { + throw new SshException($"Encryption {encryption} is not supported."); + } + } - unencryptedPrivateKeyData = cipher.Decrypt(privateKeyData); break; + } default: + { throw new SshException($"Encryption {encryption} is not supported."); + } } byte[] macData; @@ -105,6 +198,7 @@ private void Open(Stream privateKey, string? passPhrase) macData = unencryptedPrivateKeyData; break; case 2: + case 3: { using var data = new SshDataStream(0); data.Write(keyType, Encoding.UTF8); @@ -124,10 +218,26 @@ private void Open(Stream privateKey, string? passPhrase) { case "mac": { - using var sha1 = SHA1.Create(); - var macKey = sha1.ComputeHash(Encoding.UTF8.GetBytes("putty-private-key-file-mac-key" + passPhrase)); - using var hmac = new HMACSHA1(macKey); - macOrHashData = hmac.ComputeHash(macData); + switch (fileVersion) + { + case 2: + { + using var sha1 = SHA1.Create(); + var macKey = sha1.ComputeHash(Encoding.UTF8.GetBytes("putty-private-key-file-mac-key" + passPhrase)); + using var hmac = new HMACSHA1(macKey); + macOrHashData = hmac.ComputeHash(macData); + break; + } + case 3: + { + using var hmac = new HMACSHA256(macKey3.ToArray()); + macOrHashData = hmac.ComputeHash(macData); + break; + } + default: + throw new NotSupportedException($"Private key verification algorithm {macOrHash} not supported for file version {fileVersion}"); + } + break; } case "hash" when fileVersion == 1: @@ -192,6 +302,15 @@ private void Open(Stream privateKey, string? passPhrase) _hostAlgorithms.Add(new KeyHostAlgorithm(parsedKey.ToString(), parsedKey)); } + + private static byte[] StringToByteArray(string hex) + { + return Enumerable.Range(0, hex.Length) + .Where(x => x % 2 == 0) + .Select(x => Convert.ToByte(hex.Substring(x, 2), 16)) + .ToArray(); + } + private static byte[] GetCipherKey(string? passphrase, int length) { var cipherKey = new List(); diff --git a/SshNet.PuttyKeyFile/SshNet.PuttyKeyFile.csproj b/SshNet.PuttyKeyFile/SshNet.PuttyKeyFile.csproj index 6fa196b..0e1bd04 100644 --- a/SshNet.PuttyKeyFile/SshNet.PuttyKeyFile.csproj +++ b/SshNet.PuttyKeyFile/SshNet.PuttyKeyFile.csproj @@ -21,5 +21,6 @@ + \ No newline at end of file