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

full support for encrypted PuTTY v3 files #730

Merged
merged 6 commits into from
Oct 12, 2021

Conversation

jpstotz
Copy link
Contributor

@jpstotz jpstotz commented Oct 3, 2021

Based on my patch yesterday I have implemented full support for encrypted PuTTY v3 keys.

Edit 2: Finally thanks to BouncCastle Argon2 implementation no external dependencies and interface is needed anymore. Unit test is in place and works

…PuTTYArgon2 class for an easy Argon2 integration
@jpstotz
Copy link
Contributor Author

jpstotz commented Oct 3, 2021

@hierynomus Would be acceptable to add the unit test shown in my first comment?
The library testImplementation group: 'de.mkammerer', name: 'argon2-jvm', version: '2.11' contains native libraries for Linux (x86, x86_64, arm, ar64) Windows x86/x86-64 and MacOS x86_64 and arm64.

If we would include this dependency the unit tests would only be executable on these platforms by default.

@exceptionfactory
Copy link
Contributor

@jpstotz SSHJ currently includes a dependency on Bouncy Castle, which includes an Argon2 implementation, what do you think about providing an implementation based on the Bouncy Castle class Argon2BytesGenerator?

@hierynomus has mentioned attempting to avoid unnecessary dependencies on Bouncy Castle, but perhaps this is worth including?

@jpstotz
Copy link
Contributor Author

jpstotz commented Oct 5, 2021

@exceptionfactory Thanks, I did not know that BouncyCastle already contains an Argon2 implementation. That really simplifies everything.

@jpstotz
Copy link
Contributor Author

jpstotz commented Oct 5, 2021

I think this PR is finally complete and ready to merge.

The unit tests now cover all the variants and they verify that the keys has been loaded correctly.

@jpstotz jpstotz changed the title full support for encrypted PuTTY v3 files (Argon2 library not included) full support for encrypted PuTTY v3 files Oct 5, 2021
@hierynomus hierynomus merged commit b2115de into hierynomus:master Oct 12, 2021
@jpstotz jpstotz deleted the puttyv3Argon branch October 12, 2021 07:49
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