Creating a keystore
A keystore stores cryptographic keys and certificates and is frequently used in conjunction with servers and clients. A keystore is usually a file, but it can be a hardware device. Java supports the following types of keystore entries:
PrivateKey: This is used in asymmetric cryptography
Certificate: This contains a public key
SecretKey: This is used in symmetric cryptography
There are five different types of keystores that are supported by Java 8: JKS, JCEKS, PKCS12, PKCS11, and DKS:
JKS: This is the Java KeyStore (JKS) that usually has an extension of
jks
.JCEKS: This is the Java Cryptography Extension KeyStore (JCE). It can store all three keystore entity types, provides stronger protection for keys, and uses a
jceks
extension.PKCS12: In contrast to JKS and JCEKS, this keystore can be used with other languages. It can store all three keystore entity types, and it uses an extension of
p12
orpfx
.PKCS11: This is a hardware keystore type.
DKS: This is the Domain KeyStore...