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 RFC 8308 + support several Tectia (ssh.com) algorithms #64

Merged
merged 20 commits into from
Sep 6, 2021

Conversation

norrisjeremy
Copy link
Contributor

@norrisjeremy norrisjeremy commented Aug 23, 2021

  • Added support for RFC 8308 extension negotiation and server-sig-algs extension
    • This support is enabled by default, but can be controlled via the enable_server_sig_algs config option (or jsch.enable_server_sig_algs system property)
    • When enabled and a server-sig-algs message is received from the server, the algorithms included by the server and also present in the PubkeyAcceptedKeyTypes config option will be attempted first when using publickey authentication
    • Additionally if the server is detected as OpenSSH version 7.4, the rsa-sha2-256 & rsa-sha2-512 algorithms will be added to the received server-sig-algs as a workaround for OpenSSH bug 2680
  • Added support for various algorithms supported by Tectia (ssh.com):
    • diffie-hellman-group14-sha224@ssh.com
    • diffie-hellman-group14-sha256@ssh.com
    • diffie-hellman-group15-sha256@ssh.com
    • diffie-hellman-group15-sha384@ssh.com
    • diffie-hellman-group16-sha384@ssh.com
    • diffie-hellman-group16-sha512@ssh.com
    • diffie-hellman-group18-sha512@ssh.com
    • diffie-hellman-group-exchange-sha224@ssh.com
    • diffie-hellman-group-exchange-sha384@ssh.com
    • diffie-hellman-group-exchange-sha512@ssh.com
    • hmac-sha224@ssh.com
    • hmac-sha256@ssh.com
    • hmac-sha256-2@ssh.com
    • hmac-sha384@ssh.com
    • hmac-sha512@ssh.com
    • ssh-rsa-sha224@ssh.com
    • ssh-rsa-sha256@ssh.com
    • ssh-rsa-sha384@ssh.com
    • ssh-rsa-sha512@ssh.com
  • Added support for SHA224 to FingerprintHash
  • Fixing #52
  • Deprecate void setFilenameEncoding(String encoding) in favor of void setFilenameEncoding(Charset encoding) in ChannelSftp
  • Added support for rsa-sha2-256 & rsa-rsa2-512 algorithms to ChannelAgentForwarding
  • Address #65 by adding ssh-agent support derived from jsch-agent-proxy
    • See examples/JSchWithAgentProxy.java for simple example
    • ssh-agent support requires either Java 16's JEP 380 or the addition of junixsocket to classpath
    • Pageant support is untested & requires the addition of JNA to classpath

@norrisjeremy norrisjeremy changed the title Add tests for setting DHGEX sizes RFC8308 support & support for Tectia (ssh.com) algorithms Sep 2, 2021
@norrisjeremy norrisjeremy changed the title RFC8308 support & support for Tectia (ssh.com) algorithms RFC 8308 support & support for several Tectia (ssh.com) algorithms Sep 2, 2021
@norrisjeremy norrisjeremy changed the title RFC 8308 support & support for several Tectia (ssh.com) algorithms RFC 8308 & support for several Tectia (ssh.com) algorithms Sep 2, 2021
- diffie-hellman-group14-sha224@ssh.com
- diffie-hellman-group14-sha256@ssh.com
- diffie-hellman-group15-sha256@ssh.com
- diffie-hellman-group15-sha384@ssh.com
- diffie-hellman-group16-sha384@ssh.com
- diffie-hellman-group16-sha512@ssh.com
- diffie-hellman-group18-sha512@ssh.com
- diffie-hellman-group-exchange-sha224@ssh.com
- diffie-hellman-group-exchange-sha384@ssh.com
- diffie-hellman-group-exchange-sha512@ssh.com
- hmac-sha224@ssh.com
- hmac-sha256@ssh.com
- hmac-sha256-2@ssh.com
- hmac-sha384@ssh.com
- hmac-sha512@ssh.com
- ssh-rsa-sha224@ssh.com
- ssh-rsa-sha256@ssh.com
- ssh-rsa-sha384@ssh.com
- ssh-rsa-sha512@ssh.com
@norrisjeremy norrisjeremy changed the title RFC 8308 & support for several Tectia (ssh.com) algorithms Support RFC 8308 + support for several Tectia (ssh.com) algorithms Sep 2, 2021
@norrisjeremy norrisjeremy changed the title Support RFC 8308 + support for several Tectia (ssh.com) algorithms Support RFC 8308 + support several Tectia (ssh.com) algorithms Sep 2, 2021
@norrisjeremy
Copy link
Contributor Author

FYI, in addition to testing the Tectia (ssh.com) algorithms against the AsyncSSH library, I also wrote a local integration test against the actual Tectia SSH server and the new algorithms in this PR seemed to work fine with it as well.

@mwiede
Copy link
Owner

mwiede commented Sep 6, 2021

Thanks @norrisjeremy

Comment on lines +69 to +101
* [0.1.66](https://github.com/mwiede/jsch/releases/tag/jsch-0.1.66)
* Added support for [RFC 8308](https://datatracker.ietf.org/doc/html/rfc8308) extension negotiation and server-sig-algs extension
* This support is enabled by default, but can be controlled via the enable_server_sig_algs config option (or `jsch.enable_server_sig_algs` system property)
* When enabled and a server-sig-algs message is received from the server, the algorithms included by the server and also present in the PubkeyAcceptedKeyTypes config option will be attempted first when using publickey authentication
* Additionally if the server is detected as OpenSSH version 7.4, the rsa-sha2-256 & rsa-sha2-512 algorithms will be added to the received server-sig-algs as a workaround for [OpenSSH bug 2680](https://bugzilla.mindrot.org/show_bug.cgi?id=2680)
* Added support for various algorithms supported by Tectia (ssh.com):
* diffie-hellman-group14-sha224@<!-- -->ssh.com
* diffie-hellman-group14-sha256@<!-- -->ssh.com
* diffie-hellman-group15-sha256@<!-- -->ssh.com
* diffie-hellman-group15-sha384@<!-- -->ssh.com
* diffie-hellman-group16-sha384@<!-- -->ssh.com
* diffie-hellman-group16-sha512@<!-- -->ssh.com
* diffie-hellman-group18-sha512@<!-- -->ssh.com
* diffie-hellman-group-exchange-sha224@<!-- -->ssh.com
* diffie-hellman-group-exchange-sha384@<!-- -->ssh.com
* diffie-hellman-group-exchange-sha512@<!-- -->ssh.com
* hmac-sha224@<!-- -->ssh.com
* hmac-sha256@<!-- -->ssh.com
* hmac-sha256-2@<!-- -->ssh.com
* hmac-sha384@<!-- -->ssh.com
* hmac-sha512@<!-- -->ssh.com
* ssh-rsa-sha224@<!-- -->ssh.com
* ssh-rsa-sha256@<!-- -->ssh.com
* ssh-rsa-sha384@<!-- -->ssh.com
* ssh-rsa-sha512@<!-- -->ssh.com
* Added support for SHA224 to FingerprintHash
* Fixing [#52](https://github.com/mwiede/jsch/issues/52)
* Deprecate `void setFilenameEncoding(String encoding)` in favor of `void setFilenameEncoding(Charset encoding)` in `ChannelSftp`
* Added support for rsa-sha2-256 & rsa-rsa2-512 algorithms to `ChannelAgentForwarding`
* Address [#65](https://github.com/mwiede/jsch/issues/65) by adding ssh-agent support derived from [jsch-agent-proxy](https://github.com/ymnk/jsch-agent-proxy)
* See `examples/JSchWithAgentProxy.java` for simple example
* ssh-agent support requires either [Java 16's JEP 380](https://openjdk.java.net/jeps/380) or the addition of [junixsocket](https://github.com/kohlschutter/junixsocket) to classpath
* Pageant support is untested & requires the addition of [JNA](https://github.com/java-native-access/jna) to classpath
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@norrisjeremy I think we should put release notes at the releases in the futures. Otherwise one gets lost on the readme.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean splitting them out into a ChangeLog.md?

@mwiede
Copy link
Owner

mwiede commented Sep 6, 2021 via email

@norrisjeremy
Copy link
Contributor Author

Hmm, ok. My only thought would be that would put all the burden on your shoulders, since there wouldn't be any file in the git repo itself that contained "release notes" for myself or others to include in submitted PRs.

@norrisjeremy
Copy link
Contributor Author

norrisjeremy commented Sep 6, 2021

FYI, I may have another PR submitted later today, that would enhance the new ssh-agent support to allow usage of key algorithms that are not supported in JSch due to missing algorithms support.
I.e., if ssh-agent holds an ssh-ed25519 key, allow it even if it is Java version < 15 (JSch doesn't need to generate the signature itself, so the fact that Ed25519 doesn't work for Java < 15 doesn't matter).

@mwiede
Copy link
Owner

mwiede commented Sep 6, 2021

Alright. I am fine, if we maintain a changelog.md file but I found it useful to look up release notes on the release pages

@mwiede
Copy link
Owner

mwiede commented Sep 6, 2021

ok, I will wait with the release, no problem

@norrisjeremy norrisjeremy deleted the 20210823 branch September 7, 2021 12:43
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

2 participants