Digital Certificates

In a public/private key system, the problem of having to distribute a secret key and still maintaining the ability of keeping it secret has been resolved.  The public and private key pair makes up the entire secret key, but instead of distributing the entire key, only half is distributed while the other half is not.  In this case, the public key is distributed and the private key is not -- making the private key easier to secure.  The public key can be published and freely distributed without any concern of making it secret.  Together, the public/private key pair makes up one key because both are required to secure and un-secure the document.  For example, a document encrypted using the public key requires the private key to decrypt the same document.  A document signed using the private key requires the public key to verify the same document.  A secure transmission can be established between multiple trading partners just by distributing the public key between them.

Public Private Key Pair

A digital certificate comprise of:


Figure 1. Diagram shows how public and private keys come into play when exchanging documents. This scenario only shows trading partner A possessing a certificate and is able to completely secure transactions with partner B.  To mandate secure transactions, partner B would have to own a digital certificate as well.

 

Impersonation

Digital certificates makes it easier to manage keys and this feature of simple key management allows secure transactions with multiple trading partners possible.  However, simple key management does not address one of the key security issue of digital certificates: impersonation.  Impersonation allows a malicious third party to pretend that it is an established trading partner of the organization when in reality it is not, and in so doing intercepts any secure documents that may have been intended for the actual trading partner without the knowledge of both legal parties.

Consider the following scenario where trading partner A wants secure communication with trading partner B.


Figure 2. Diagram showing flow of how a malicious entity can impersonate trading partner A.

Impersonation begins when a malicious entity C can intercept documents between trading partners A and B unbeknownst to both parties.

Certificate Authority (CA)

To overcome the problem of impersonation, a Certificate Authority (CA) has to be used.  The CA provides the digital certificate for the trading partners and is "stamped with certification" by signing the issued certificates with the private key of the CA.  It also sets itself as the issuer of the certificate. Any trading partner requiring verification of the certificate can easily obtain and use the public key of the CA to verify the certificate.  For example in the previous scenario, as soon as trading partner B received the certificate from C it would verify if it actually came from partner A.  The certificate of trading partner A has been signed by a CA so it contains a signature that only the CA can verify.  The certificate from entity C may have a signature but it will not be the signature produced by the CA for A, so when B verifies the signature, the verification will fail - protecting B from incorrectly using a different public key.

Self-Signed Certificates

Self-signed certificates are digital certificates that have been created without a CA.  The entity that created the certificate is the same entity that has signed and certified it.  The most important aspect about digital certificates is the presence of a CA, and, without it, the certificate is not secure.  Thus self-signed certificates should only be used for testing.  In some instances, self-signed certificates may be used between bi-lateral trading partners, where there are other outside form of communication and verification that can mitigate the risk of impersonation.

X.509 Digital Certificates and Cryptographic Service Providers

The Cryptographic Service Provider (CSP) system in Windows (R) operating systems (except Windows 95 (R)) supports the X.509 Digital Certificate format.  Framework EDI (FREDI) provides the capability to import and export valid digital certificates to certificate stores in the operating system.  The certificates can then be used for cryptographically encrypting, decrypting, signing and verifying documents.

Digital certificates can also be created using FREDI, but, absent of a CA, they can only be used for testing.  There are two ways to create a digital certificate:

  1. Using the eSecurityConsole utility.
  2. Programmatically creating the Test Certificate.

The principle method of creating the digital certificate is to take the public key from a key container in a CSP and storing it in a certificate.  The key container can contain at most two public/private key pairs.  The test certificate can use any of the public key in the public/private key pairs.

Procedure for Creating a Test X.509 Test Certificate