Home > Articles > Security > Software Security

  • Print
  • + Share This
This chapter is from the book

2.7 Certificates

Certificates offer a way of providing assurance about a public key. In general, they consist of the following components:

  • The public key

  • Some associated information such as an identity or access authorization

  • A date of issuance and expiration

  • An authenticating digital signature by a "certification authority" over this information

Anyone knowing and trusting the public key of this "authority" and having the certificate can have confidence that the public key inside the certificate is associated with the identity or should have the access indicated. See Figure 2-6.

Figure 2-6Figure 2-6 Certificate

This verification can be continued through a "chain" of certificates. Cert-1 signed by entity-1 can provide trust in the public key of entity-2, whose private key can then be used to sign Cert-2, which provides trust in the public key of entity-3, whose private key can be used to sign Cert-3, and so on. If one or only a few globally known and trusted public keys exist, a hierarchical model results, as shown in Figure 2-7. Top-level certification authorities control the private keys corresponding to these top-level or "root" public keys. These authorities sign certificates for lower-level certification authorities, possibly through several levels, ending with bottom-level "user" certificates.

Figure 2-7Figure 2-7 Certificate hierarchies

The alternative to this hierarchical model is a mesh model, as shown in Figure 2-8. With a mesh, various entities sign one another's certificates. A user can then start from a few trusted public keys and, subject to any criterion desired, chain through available certificates to gain trust in other public keys.

Figure 2-8Figure 2-8 A certificate mesh

The most common type of certificates are X.509v3 [ISO 9594] certificates. Derived from the OSI X.500 Directory standard, they were originally intended to authenticate update authority and the like on the hypothetical global X.500 directory. The original X.509 certificates bound a public key to an X.500 identity. X.509v3 (version 3) generalizes X.509 certificates in various ways to allow for other types of more reasonable identities (such as e-mail and IP addresses) and extensions.

Soapbox

X.500 identities are baroque hierarchical names, in which each level of the hierarchy consists of an arbitrary, unordered set of attribute–value pairs. They are just one of the complexities and false assumptions (such as the assumption that everyone would allow themselves to be listed in one global public directory, including companies listing all their employees) that doomed the X.500 Directory as originally conceived.

In theory, you can have an X.509v3 mesh. In fact, such certificates are normally used in a hierarchical mode. A common root is a commercial certification authority. An intermediate-level certification authority might be a company that obtained a certificate from a root and then issued certificates to its employees. All X.509 certificates and X.500 names appear in the binary ASN.1 BER or DER encoding. While it might seem odd to use such binary non-XML complexities to support XML Security, most of the existing public key infrastructures and commercial certification authorities work with X.509v3 so it is convenient to be able to use such certificates in XML Security.

Other types of certificates exist as well. Pretty Good Privacy [RFC 2440] has its own certificates that are almost always used in a mesh, although they can be employed hierarchically. A recent attempt to develop simpler standard certificates in the Internet Engineering Task Force (IETF) produced the Simplified Public Key Infrastructure (SPKI) certification system [RFC 2693]. Many people had hoped that SPKI (pronounced "spooky") would provide a greatly simplified and rationalized direct replacement for X.509v3. Instead, SPKI, while simple, made some radical changes. As a result, it has seen only limited deployment.

Certificate Revocation Lists

Compromised private keys really do happen. For example, a private key owner may accidentally release the key or someone may steal, guess, or compute a copy of the private key and erroneously issue certificates. In this case, a certification authority issues a certificate for the wrong entity. In theory, the problem of compromised private keys or erroneously issued certificates is handled by a "revocation" mechanism. Whoever signed the original certificate signs and distributes a revocation of that certificate. In reality, such revocation systems require communication from the revoking entity to the entity trusting the certificate, and an adversary can block that communication.

To provide revocation, X.509 defines a certificate revocation list (CRL) structure. This structure is dated and carries a version number. It lists revoked certificates as of that date and time from a particular certificate issuer (except for certificates that have already expired). It also gives a date before or at which the next CRL version will be issued. Thus, for example, if you receive a signature that you trust based on a chain of certificates, you should get CRLs for all issuers in the chain. Furthermore, for any issuers for which you have only a CRL issued before the signature date, you should wait until the next CRL to see whether the certificate becomes revoked. This system is not terribly convenient, so most implementations, including the most popular browsers, ignore certificate revocation and CRLs entirely.

History

In January 2001, Verisign, Inc., the largest commercial certification authority, issued two of its highest-assurance-level X.509v3 certificates to some person or persons unknown who impersonated Microsoft Corporation. Thus, unless they took special precautions or obtained and followed Verisign's relevant CRL, anyone who trusted Verisign would trust these imposters to speak for Microsoft.

Online Certificate Status Protocols

Certificates were designed in a time when offline verification was virtually the norm. With modern, always-connected technology, it should be possible to dispense with the entire certificate structure and ask a trusted online server to provide or verify trust in a key. (See Chapter 14 for a proposed XML way of achieving this goal.)

The Online Certificate Status Protocol (OCSP) represents a halfway step toward this end. It eliminates CRLs by utilizing a trusted online server to indicate whether a given certificate submitted to it remains valid [RFC 2560]. A client of such a server would have to know and trust the public key of that server. But, because such servers shield the client from complexity, the client probably needs to know only the key for one server. That server can then contact others on behalf of the client, if necessary, and forward any responses, providing its own signature to authenticate them.

For some systems (see Chapter 12), a signature may be more easily enforceable if you have checked and saved "proof" that all certificates you used to verify the signature were valid at the time. The trusted server signs and dates OCSP responses, which can be saved like CRLs.

  • + Share This
  • 🔖 Save To Your Account