Skip to content

Refactor PuTTY Secret Key Derivation #1003

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

Merged

Conversation

exceptionfactory
Copy link
Contributor

This pull request refactors Secret Key Derivation for PuTTY Key Files, providing clear separation for Version 3 using Argon2 from Bouncy Castle, and Version 1 using SHA-1 with standard Java Security components.

The new interface abstraction provides clearer separation of the Version 3 implementation to avoid loading Bouncy Castle classes, unless required for Version 3 handling.

Additional changes include replacing Bouncy Castle Hex class references with available ByteArrayUtils methods.

These changes maintain existing support for PuTTY Key File processing.

- Added KeyDerivationFunction interface for PuTTY Key Files
- Moved Argon2 Key Derivation to Version 3 implementation class to separate Bouncy Castle dependency references
- Replaced Bouncy Castle Hex references with ByteArrayUtils
@hierynomus hierynomus merged commit e390394 into hierynomus:master Mar 19, 2025
4 checks passed
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.

2 participants