Sorry noob here. I am so much confused about lot of files used client authentication certificates. Can anyone guide me on the difference between PEM vs P12 vs CRT vs JKS vs Keystore vs PKCS vs x509 certificates?
$\begingroup$
$\endgroup$
2
-
$\begingroup$ The problem is that customer gave me keystore file for client auth(which some people says same as JKS while some say different) when I use it it is not working in C#. People saying its java specific create PKCS file like p12 or pem with x509 certificate which makes me what to do these all file types for client authentication? $\endgroup$– Imran Qadir Baksh - BalochCommented Jul 29, 2020 at 10:16
-
2$\begingroup$ Except for JKS, which is Java-specific as you say, see crypto.stackexchange.com/questions/43697/… security.stackexchange.com/questions/183072/… security.stackexchange.com/questions/73156/… serverfault.com/questions/9708/… $\endgroup$– dave_thompson_085Commented Jul 30, 2020 at 0:30
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
1
I got some information from Wikipedia,
In cryptography, X.509 is a standard defining the format of public key certificates.
**Certificate filename extensions**
There are several commonly used filename extensions for X.509 certificates. Unfortunately, some of these extensions are also used for other data such as private keys.
.pem – (Privacy-enhanced Electronic Mail) Base64 encoded DER certificate, enclosed between "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----"
.cer, .crt, .der – usually in binary DER form, but Base64-encoded certificates are common too (see .pem above)
.p7b, .p7c – PKCS#7 SignedData structure without data, just certificate(s) or CRL(s)
.p12 – PKCS#12, may contain certificate(s) (public) and private keys (password protected)
.pfx – PFX, predecessor of PKCS#12 (usually contains data in PKCS#12 format, e.g., with PFX files generated in IIS)
PKCS#7 is a standard for signing or encrypting (officially called "enveloping") data. Since the certificate is needed to verify signed data, it is possible to include them in the SignedData structure. A .P7C file is a degenerated SignedData structure, without any data to sign.[citation needed]
PKCS#12 evolved from the personal information exchange (PFX) standard and is used to exchange public and private objects in a single file.[citation needed]
-
$\begingroup$ Note PEM 'wrapping', and the .pem extension, is used for many things, not only certificates. Otherwise mostly concur. $\endgroup$ Commented Jul 30, 2020 at 0:34