apache / mina-sshd

Apache MINA sshd is a comprehensive Java library for client- and server-side SSH.
https://mina.apache.org/sshd-project/
Apache License 2.0
913 stars 360 forks source link

Add support for JDK 22-native edec key support #585

Open mattrpav opened 3 months ago

mattrpav commented 3 months ago

Description

Currently, elliptical curve key support is available through a 3rd party library that is seemingly unmaintained (latest release 2018).

JDK 22 add support for edec keys natively

Motivation

Remove reliance on 3rd-party library, use JDK-default key for up-and-comming ssh key format

Alternatives considered

No response

Additional context

No response

JDK 22 support: ref: https://javaalmanac.io/jdk/22/apidiff/21/

3rd party library:

<dependency>
  <groupId>net.i2p.crypto</groupId>
  <artifactId>eddsa</artifactId>
  <optional>true</optional>
  <scope>provided</scope>
</dependency>
tomaswolf commented 3 months ago

Actually ed25519 is supported as of Java 15. Bouncy Castle also supports it.

Unfortunately, changing the current implementation so that it would work with any of these is not possible without API breaks. It's also a lot of work.