Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Private Key] Support more ciphers for OpenSSH private key decryption #1487

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

scott-xu
Copy link
Collaborator

@scott-xu scott-xu commented Sep 7, 2024

With this PR, SSH.NET supports below ciphers when decrypt OpenSSH private key.

  • 3des-cbc
  • aes128-cbc
  • aes192-cbc
  • aes256-cbc
  • aes128-ctr
  • aes192-ctr
  • aes256-ctr
  • aes128-gcm@openssh.com
  • aes256-gcm@openssh.com
  • chacha20-poly1305@openssh.com

The list is now the same with the output of command ssh -Q cipher.

There's a -Z option when generate key pair using ssh-keygen1.

-Z cipher
Specifies the cipher to use for encryption when writing
an OpenSSH-format private key file. The list of
available ciphers may be obtained using "ssh -Q cipher".
The default is “aes256-ctr”.

Fixes #1483

Footnotes

  1. https://www.man7.org/linux/man-pages/man1/ssh-keygen.1.html

…h.com and chacha20poly1305@openssh.com ciphers for OpenSSH private key decryption.
@scott-xu scott-xu changed the title Support more ciphers for OpenSSH private key encryption [Private Key] Support more ciphers for OpenSSH private key decryption Sep 8, 2024
@scott-xu scott-xu marked this pull request as ready for review September 8, 2024 01:38
@Rob-Hague Rob-Hague merged commit b067e75 into sshnet:develop Sep 10, 2024
1 check passed
@scott-xu scott-xu deleted the privatekey-openssh branch September 10, 2024 07:01
@scott-xu scott-xu restored the privatekey-openssh branch September 21, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception when initializing PrivateKeyFile with type aes256-gcm@openssh.com
2 participants