Skip to content

2024.2.0.4

Choose a tag to compare

@darinkes darinkes released this 21 Jul 11:28
· 5 commits to main since this release

SSH.NET extension to generate and export authentication keys in OpenSSH and PuTTY v2/v3 format.

Features

  • OpenSSH certificate signing — SshCertificateBuilder mints *-cert-v01@openssh.com user/host certificates (principals, validity window, critical options, extensions) signed with a CA key via .SignWith(caKey). Pairs with SshNet.Agent, which now presents certificate identities.
  • SSH signatures (SSHSIG) — sign data or files with keyFile.Signature(data) / keyFile.SignatureFile(path) and verify with SshSignature.Verify(...) / SshSignature.VerifyFile(...), interoperable with ssh-keygen -Y sign / -Y verify (namespace defaults to file).
  • .NET key interop — import an existing RSA / ECDsa (or PEM / PKCS#8) key with SshKey.FromKey(...) and export it to OpenSSH or PuTTY format.

Improvements

  • Dropped the vendored Chaos.NaCl copy in favor of SSH.NET's own ED25519Key — one less bundled crypto implementation.
  • SshKey.Generate leaves the caller's stream open instead of disposing it.
  • RandomNumberGenerator used for the OpenSSH check-int.

Fixes / Hardening

  • SSH string fields are encoded as UTF-8 instead of ASCII — ASCII silently mangled non-ASCII text. Follows the 2024.2.0.3 passphrase fix.
  • Non-NIST curves are rejected in SshKey.FromKey instead of producing an unusable key.
  • Nonce and validity window are validated in SshCertificateBuilder.

Testing / CI

  • Certificate, signature and .NET-key-interop tests, including round-trips through the real ssh-keygen.
  • net48 curve-rejection assertion covering the case where CNG hides the curve OID.

NuGet: https://www.nuget.org/packages/SshNet.Keygen/2024.2.0.4

Full changelog: 2024.2.0.3...2024.2.0.4