-
Notifications
You must be signed in to change notification settings - Fork 602
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 for aesXXX-gcm@openssh.com ciphers #217
Comments
The server I'm trying to connect to only supports So can't use SSHJ to connect to it. It would really help if sshj supported these ciphers out of the box. I wonder if there is a way for me to add this kind of cypher support myself? e.g. via some special configuration options? |
@kdvolder Normally I'd say yes, unfortunately, the GCM ciphers and chacha20-poly1305 should be implemented as they influence how the package needs to be decoded and encoded. The packet formats are slightly different. Implementing this is something that has been on my todo list for quite some time indeed. |
Thanks for the response. I'll take your word for that as I know very little about how any of these cipher's work. Luckily for us I was able to convince someone who has control over this at the server's side to loosen up a bit and add a few more cypher's that sshj does support out of the box. Still would be nice if sshj supported them, but at least my problem is solved for now. |
@hierynomus, |
Just a heads-up, this affects Cyberduck and Mountain Duck as Iterate is using this implementation in both. |
As a developer of Amaze File Manager I had been using sshj to do SFTP since 2018 ;) and we have requests to add support for AES-GCM ciphers too. I have ported Apache MINA-SSHD's AES-GCM support to sshj, after seeing their recent PR apache/mina-sshd#132 by @jvz. It connects to OpenSSH and MINA-SSHD current master when restricting ciphers to Let me do some more tests (as |
* Implement AES-GCM cipher support Fixes #217. A port of AES-GCM cipher support from Apache MINA-SSHD, based on apache/mina-sshd#132. Included tests for decoding SSH packets sent from Apache MINA-SSHD and OpenSSH (Version 7.9p1 as used by Debian 10). Manual tests also done on OpenSSH server 7.9p1 running Debian 10 with its available ciphers, including 3des-cbc, aes128-cbc, aes192-cbc, aes256-cbc, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com and aes256-gcm@openssh.com. * Changes per PR feedback - Fixed variable/statement whitespaces and add back missing braces per coding standard requirement - Moved Buffer.putLong() and Buffer.getLong() into GcmCipher.CounterGCMParameterSpec since it's the only user - Moved BaseCipher.authSize into GcmCipher since it is the only cipher that would return a non-zero. BaseCipher will keep return 0 instead - Made BaseCipher.cipher protected instead of making it publicly accessible - Combined the three decoding modes in Decoder.decode() into one single method, to reduce code duplication - Added integration test for the ciphers, along with the newly implemented AES-GCM ciphers
SSHJ should add support for the following ciphers:
I believe these ciphers are provided by the BouncyCastle and Java 8 security providers.
The text was updated successfully, but these errors were encountered: