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

Support v3 PuTTY keys #716

Merged
merged 4 commits into from
Sep 20, 2021
Merged

Support v3 PuTTY keys #716

merged 4 commits into from
Sep 20, 2021

Conversation

BerndSchuller
Copy link
Contributor

Hi!
With the latest PuTTY, the header line has changed to "PuTTY-User-Key-File-3".
This trivial patch will parse both old and new PuTTY key files correctly.

@hierynomus
Copy link
Owner

Is that the only change? There is no format change involved?

Would it be possible to add a unit test with a new key type in there, so that we can verify this will keep on working.

@BerndSchuller
Copy link
Contributor Author

BerndSchuller commented Sep 1, 2021

Is that the only change? There is no format change involved?

Would it be possible to add a unit test with a new key type in there, so that we can verify this will keep on working.

yes, it's the only change. Test added.

@hierynomus hierynomus merged commit 2e1ef9d into hierynomus:master Sep 20, 2021
@jpstotz
Copy link
Contributor

jpstotz commented Sep 26, 2021

This PR seems to enable support for unencrypted Putty v3 private keys.

But the new file format also comes with a different encryption using a Argon2 based key derivation function. This is not supported by sshj therefore it should better throw an exception if the PPK key file contains an Key-Derivation entry as even with the correct password sshj will never be able to decrypt the key.

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.

None yet

3 participants