Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JKS protection

Are JKS (Java Key Store) files encrypted? Do they provide full protection for encryption keys, or do I need to rely solely on access control?
Is there a way to ensure that the keys are protected?

I'm interested in the gritty details, including algorithm, key management, etc. Is any of this configurable?

like image 526
AviD Avatar asked Oct 06 '08 12:10

AviD


People also ask

Are JKS files secure?

Yes. The JCA API, and the JKS format, allows each privatekey to be encrypted with a separate password, which can be different from the store password.

What is the purpose of JKS file?

jks, contains the Application Server's certificate, including its private key. The keystore file is protected with a password, initially changeit. Change the password using keytool .

What is JKS type?

A Java KeyStore (JKS) is a repository of security certificates – either authorization certificates or public key certificates – plus corresponding private keys, used for instance in TLS encryption. In IBM WebSphere Application Server and Oracle WebLogic Server, a file with extension jks serves as a keystore.

What is JKS and p12?

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.


2 Answers

To be more precise:

  • PrivateKeys and SecretKeys within a JKS file are encrypted with their own password.
  • Integrity of trusted certificates is protected with a MAC using the key store password.
  • The file as a whole is not encrypted, and an attacker can list its entries without the key store password.
like image 73
erickson Avatar answered Oct 06 '22 00:10

erickson


They are encrypted.

The algorithm is provider dependent. The provider will return the key/certificate based on a password. If you need strong security, find a keystore provider that uses a strong encryption.

like image 36
Shimi Bandiel Avatar answered Oct 06 '22 00:10

Shimi Bandiel