Tmds.Ssh icon indicating copy to clipboard operation
Tmds.Ssh copied to clipboard

Add support for encrypted private keys.

Open jborean93 opened this issue 1 year ago • 1 comments

Adds support for using encrypted private keys with user authentication. This implementation support private keys encrypted with the PKCS#1 and OpenSSH PEM formats. The AES and ChaCha20-Poly1305 ciphers allowed by each format has been implemented in this change.

Fixes: https://github.com/tmds/Tmds.Ssh/issues/202

jborean93 avatar Jul 26 '24 05:07 jborean93

I tried my best to clean up the Bcrypt KDF implementation from SSH.NET but I'm sure there are probably further optimisations that could be implemented. The good news is it works with some test vectors I found and the tests when they run.

jborean93 avatar Jul 26 '24 05:07 jborean93

@jborean93 thanks for working on this! I've added some high level comments about code organization. I'll try to do a more in depth review in the coming week.

tmds avatar Aug 04 '24 05:08 tmds

Thanks a lot @jborean93!

tmds avatar Aug 12 '24 08:08 tmds

Thanks for the review and looking through the changes!

jborean93 avatar Aug 12 '24 11:08 jborean93