Skip to content

Support v3 PuTTY keys - #716

Merged
hierynomus merged 4 commits into
hierynomus:masterfrom
BerndSchuller:master
Sep 20, 2021
Merged

hierynomus merged 4 commits into
hierynomus:masterfrom
BerndSchuller:master

Conversation

@BerndSchuller

Copy link
Copy Markdown
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
Copy Markdown
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

BerndSchuller commented Sep 1, 2021 •

Copy link
Copy Markdown
Contributor Author

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

jpstotz commented Sep 26, 2021 •

Copy link
Copy Markdown
Contributor

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.

3 participants