Java Keystore and Truststore

Keystores and truststores are repositories that contain cryptographic artifacts like certificates and private keys that are used for cryptographic protocols such as TLS. We use a keystore and a truststore when our application needs to communicate over SSL/TLS.

Keystore and Truststore are password-protected files. The default format used for these files was JKS until Java 8. From Java 9, the default KeyStore format is PKCS12. The biggest difference between JKS and PKCS12 is that JKS is a format specific to Java, while PKCS12 is a standardized and language-neutral way of storing encrypted private keys and certificates.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store