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. ...

Get Learning Network Programming with Java now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.