Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relationship between key store, trust store, and certificate

What is the relationship between key stores, trust stores, and certificates? Are any of these tools proprietary to certain software? What literature could I obtain to get more information on these tools and how they're used in a broader context?

Thanks!

like image 649
Wickerbough Avatar asked Mar 17 '23 16:03

Wickerbough


2 Answers

enter image description here

img credit

A Keystore and a Truststore are two types of stores used in Java to manage digital certificates and keys.

A Keystore is a storage repository for private keys and digital certificates. It is used to store the private key and the digital certificate that corresponds to a public key, allowing an application to secure and authenticate its connections. The Keystore is typically password-protected, and it is used to secure the private keys used for encryption and signing.

A Truststore, on the other hand, is a store of trusted public keys and digital certificates. It is used to validate the digital certificates presented by external entities, such as remote servers or other applications, during SSL/TLS connections. The Truststore contains the public keys of trusted certificate authorities (CAs) and the digital certificates issued by these trusted CAs. When an application receives a digital certificate from an external entity, it uses the Truststore to validate the certificate and determine if it should trust the entity.

A Certificate is a digital document that binds a public key to an identity. It is issued by a trusted certificate authority and contains information about the identity of the entity that holds the corresponding private key, such as its name and location. Certificates are used to establish trust and secure connections between entities, such as between a client and a server during an SSL/TLS connection.

like image 120
Premraj Avatar answered Mar 20 '23 05:03

Premraj


As far as I know, the keystore and truststore are very similar, in which they both store certificates/public keys. The only difference is that truststores store keys of CA (Certificate Authority) and keystores store keys of websites that are certified by CAs. Hence keystores are used/updated more often than truststores (There are not as many CAs as there are websites).

PS: These are not tools, they (truststores, keystores) are simply encrypted files.

like image 24
Long_Le Avatar answered Mar 20 '23 05:03

Long_Le