The key types are listed in the Java™ Cryptography Architecture Standard Algorithm Name Documentation, in a table towards the end ("Additional JSSE Standard Names"): RSA, DSA, DH_RSA, DH_DSA, EC, EC_EC and EC_RSA.
Note that you might be able to get instances of PrivateKey
this way, and re-construct some instance of KeyStore
, but you might not be able to save that keystore with the content of the private key in all cases. PrivateKey
is a class representing a private key, with method allowing it to be used as such. It doesn't necessarily contain the private key material, for example if this is a private key obtained from a PKCS#11 hardware token.