Java Keystore (JKS)

The java.security.KeyStore class is the storage facility for cryptographic keys and certificates. This class extends java.lang.Object, see as follows:

    public class KeyStore extends Object

There are three types of entries managed by a KeyStore, each implements the KeyStore.Entry interface, one of the three interfaces provided by the KeyStore class. The Entry implementations are defined in the following table:

Implementation Description
KeyStore.PrivateKeyEntry
  • Contains the PrivateKey and can store it in a protected format
  • Contains the certificate chain for the public key
KeyStore.SecretKeyEntry
  • Contains the SecretKey and can store it in a protected format
KeyStore.TrustedCertifcateEntry
  • Contains a single ...

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.