JDK-8341979 : Enhance the Named framework to return algorithm-specific keys
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: java.security
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-10-11
  • Updated: 2024-10-11
Related Reports
Relates :  
Description
As the comment in NamedKeyPairGenerator says:

/// Note: A limitation of `NamedKeyPairGenerator` and `NamedKeyFactory` is
/// that the keys generated by their implementations will always be of type
/// `NamedX509Key` or `NamedPKCS8Key`. Existing implementations of algorithms
/// like EdDSA and XDH have been generating keys implementing `EdECKey` or
/// `XECKey` interfaces, and they are not rewritten with this framework.
/// `NamedParamterSpec` fields not implemented with this framework include
/// Ed25519, Ed448, X25519, and X448.

We can investigate how to solve this limitation.