-
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
X25519 unsupported public key length [46] Error message #957
Comments
@Atharva-2157 This error looks like it is coming from the Curve25519DH class as part of the key agreement initialization process. Some Java Security Provider implementations have slight variations the encoded key handling, which could be an area for improvement in this class. Can you provide the specific version of Java, and the version of the Bouncy Castle library that results in this particular error? |
Java 11.0.19 Bouncy Castle - org.bouncycastle bcprov-jdk18on 1.75 org.bouncycastle bcpkix-jdk18on 1.75sshj - |
Thanks for those details @Atharva-2157, that will be helpful in attempting to reproduce the problem. |
@Atharva-2157 I was able to reproduce the problem on Java 11. The problem is the result of different behavior in the Java 11 implementation of I submitted pull request #959 to improve the behavior, making it more compatible across versions and providers. With the existing version, it seems like the Bouncy Castle Provider is not being registered, and registering it may resolve the issue without code changes. |
Closing this as #959 is merged. |
I am trying to connect to sftp server using SSHClient.
But at connect method I am getting this error - X25519 unsupported public key length [46]
I tried to find the solution online but not found any can anyone help me to solve this.
The text was updated successfully, but these errors were encountered: