Attempting to do the following fails with a ClassCastException when BcPGKeyConverter wrongly assumes its input parameter not being ECPrivateKeyParameters means they are X25519.
X448KeyPairGenerator xkpg = new X448KeyPairGenerator();
xkpg.init(new KeyGenerationParameters(new SecureRandom(), 0));
BcPGPKeyPair kp = new BcPGPKeyPair(PublicKeyAlgorithmTags.ECDH, xkpg.generateKeyPair(), new Date());
Attempting to do the following fails with a
ClassCastExceptionwhen BcPGKeyConverter wrongly assumes its input parameter not beingECPrivateKeyParametersmeans they are X25519.