-
Notifications
You must be signed in to change notification settings - Fork 236
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
Is ssh ed25519 key supported? #16
Comments
Thats correct. The underlying ssh library JSch does not support it( only supports DSA and RSA ). But I have plans to add both ECDSA and ED25519 in future. |
Sounds great. Thank you @subhra74 ! |
Keeping an eye on this as all my servers only use ed25519. A shame really. |
Jsch plans in next milestone to support ED25519 : But no planned date, nothing since v0.1.55 in 2018-11, code since not really updated actually... May be https://github.com/hierynomus/sshj as replacement ? Actively maintained and supports ED25519 |
there are forks of JSCH supporting ED25519 so it must make the switch simple since API must be the same : https://github.com/mwiede/jsch/blob/master/Readme.md#changes-since-fork
https://github.com/sschlib/sschlib#features
|
I can speak for the JSch fork available at mwiede/jsch: it should fully support ssh-ed25519 keys starting in release 0.1.61, with the caveat that you must be using Java 15 or newer (as that is the first Java release with EdDSA support from JEP 339). As the original contributor of the ssh-ed25519 support, If you encounter any issues with it, please raise an issue at mwiede/jsch, making sure to ping me, to ensure that I see it. |
@norrisjeremy thanks for your explanation, I didn't notice the fact it was thanks to the JEP 339 recently added into Java 15. I cannot speak for snowflake team, just want to help to find a solution, so I don't know if java 15 is a problem or not. I was looking at some backport of the JEP 339 in older Java versions. https://java.com/en/jre-jdk-cryptoroadmap.html
https://github.com/openjsse/openeddsa
So there is some chance lower versions of Java can benefit it too ? |
Hmm, it might be possible to get it to work using something like openjsse/openeddsa, but it would take some work. The implementation I contributed to mwiede/jsch compiles the ssh-ed25519 support as Java 15 class files and bundles it as part of a multi-release jar. Something else to note as well: the implementation of the curve25519-sha256 Kex & [email protected] Cipher I contributed to mwiede/jsch are compiled as Java 11 class files since they are part of JEP 324 & JEP 329. I'm not sure if the openjsse/openeddsa also includes a backport for those algorithms as well? |
I should also note: the implementation of [email protected] only uses the ChaCha20 implementation from JEP 329 (not the full ChaCha20-Poly1305 implementation). OpenSSH implemented this cipher differently than the how it is done in TLS for RFC8439, and it's not possible to fully create an OpenSSH compatible implementation in Java purely using JEP 329, since the JEP 329 version is only compatible with RFC8439. To overcome this hurdle, we combined the ChaCha20 base cipher from JEP 329 with the Poly1305 implementation from OpenJAX located here: https://github.com/openjax/security/blob/master/nacl/src/main/java/org/openjax/security/nacl/Poly1305.java. |
@subhra74 , can I ask if you are willing to switch to the fork of Jcsh with ed25519 support? I am sure one of us would be willing to PR this feature provided it is acceptable to depend on a different Jcsh as well as JDK 15 if necessary. I will note that JDK 16 strongly encapsulates JDK internals by default, so if muon has any libraries which require such access users would have to run with |
I have many existing ssh connections for long time and used to connect with terminal. Now I'm trying to migrate to snowflake but could not even create the very first connection. All my keys are ed25519 format.
And I just tried with one rsa key, it worked. So I'm thinking about if the ed25519 is not supported (yet).
The text was updated successfully, but these errors were encountered: