- Public Key Security
- Public Key Security Architecture
- Public Key Infrastructure
- Summary
- References
Public Key Security Architecture
Windows 2000 provides a public key security architecture to support a wide range of applications that require distributed, scalable authentication. This architecture does not replace the default Kerberos authentication protocol but rather addresses the needs of an enterprise to expand its business to the Internet. The components of this architecture seamlessly integrate with the operating system, instead of being an adjunct to it, and effectively interface with external trust infrastructures. See Figure 4-1 for an architectural diagram.
Microsoft CryptoAPI is the cornerstone of this architecture, providing the machinery to build authentication, integrity, and privacy security services into applications and supporting functions to manage public key certificates, CRLs, and PKCS messages (refer to Chapter 3 to an explanation of PKCS). CryptoAPI interfaces with installable cryptographic service providers (CSPs), discussed in the next section, to implement its functions, either in software or in hardware.
Figure 4-1 Windows 2000 public key security architecture
Other technologies layer on top of CryptoAPI. Authenticode provides accountability for distributing code in the Internet. Certificate Services functions as an in-house certification authority and provides certificate life-cycle management functions. Secure channel (SChannel) supports distributed authentication for the Internet, using the industry-standard TLS/SSL protocols. EFS provides transparent privacy and recovery services for file systems. A component of Microsoft Exchange, the Exchange Key Management Service (KMS) provides archiving and retrieval facilities for e-mail encryption keys.3 Finally, general-purpose smart card interfaces provide an application-independent framework to integrate smart cards with applications.
At the very top are a myriad of PKI-enabled applications. Internet Explorer, Internet Information Services, Outlook, Outlook Express, and Microsoft Money are examples. In addition, a number of third-party applications integrate with the Windows 2000 PKI.
Microsoft Cryptographic Application Programming Interface (CryptoAPI) enables programmers to incorporate authentication, integrity, and privacy security services into their applications. CryptoAPI supports a wide range of security mechanisms. Context functions connect to a specific CSP by name or connect to a CSP that can provide a needed class of functionality. Key generation functions generate and store cryptographic keys; key exchange functions exchange and transmit keys. Cer-tificate encode functions, decode functions, and store functions manage public key certificates. Other cryptographic functions encrypt data, decrypt data, sign messages, and verify the authenticity of signatures on messages.
The CryptoAPI provides a framework for developing portable applications. The interface gives programmers a great deal of control and flexibility over the incorporation of the required security protections into their applications. Programmers use the interface, for example, to choose the encryption algorithm and key length providing the required quality of privacy. The CryptoAPI, however, carefully restricts application access to the cryptographic internals. Applications use the CryptoAPI functions without knowing anything about the underlying implementation or being able to specify the details of cryptographic operations. As a result, CryptoAPI-based applications can run in a variety of environments with differing configurations of cryptographic service providers. Application development with CryptoAPI parallels applications that use a graphics library without knowing anything about the particular graphics hardware configuration.
The CryptoAPI enhances security by preventing an application from accidentally divulging keying material or choosing keying material from a poor random source. CryptoAPI uses underlying CSPs for the generation and management of all keys. Applications cannot directly access and expose their keys but instead reference them only through opaque handles.
Applications built on top of CryptoAPI can adapt to a system's underlying authentication capabilities. The CSP performs user authentication and manages the credential data; CryptoAPI applications do not handle user credentials or other user authentication data. As a result, applications can adjust to future CSPs with advanced authentication capabilities, such as biometrics, without needing to change their authentication model.
Cryptographic Service Providers
A cryptographic service provider (CSP) contains implementations of cryptographic standards and algorithms. CryptoAPI functions use CSPs to generate and to store cryptographic keys, to manage public key certificates, to encrypt and to decrypt data, to sign messages, and to verify signatures. At a minimum, a CSP consists of a dynamic link library that implements the CryptoAPI functions and an associated signature file. Ideally, applications based on CryptoAPI are independent of a particular CSP and run with a variety of CSPs. In reality, however, an application may have specific security requirements that require a particular CSP.
Depending on the capabilities of the underlying CSP, an application can run in a variety of security contexts without any modification. Different CSPs provide different levels of protection for cryptographic keys. Some CSPs use hardware devices, such as smart cards, to ensure that signature keys never leave the perimeter of the device, whereas other CSPs provide only software implementations of the CryptoAPI functions. CSPs also differ in their encryption strength. Some provide low-strength 512-bit RSA public keys and 40-bit encryption; others supply 1,024-bit RSA keys and 128-bit encryption.
Each CSP uses a key database to store cryptographic keys. A key database contains one or more key containers, each of which stores all the public/private key pairs belonging to a specific CryptoAPI client. CSPs store key containers in a permanent storage, such as a disk file, under a registry key, or in a hardware device. Each key container has a unique name, typically the login name of the user who owns the keys. Key stores, discussed in the next chapter, store certificates.
The Windows 2000 operating system bundles one CSP, the Microsoft Base Cryptographic Provider. This software-based CSP uses RSA signing keys of up to 16,384 bits for digital signatures and RSA key-exchange keys of up to 1,024 bits for exchanging symmetric key. It also implements the RC2, RC4, and RC5 encryption algorithms with a maximum key length of 56 bits and provides MD2, MD5, and SHA hashing algorithms. Microsoft Enhanced Cryptographic Provider provides stronger cryptographic capabilities. Refer to Table 4-1 in the section Cryptographic Algorithms and Key Lengths for further details on these two CSPs.
Certificate Services
Certificate Services, which plays a pivotal role in the overall public key security infrastructure of Windows 2000, functions as an in-house certification authority and provides certificate life-cycle management services to domain users. Certificate Services can automatically issue certificates to network computers when they boot and can publish the issued certificates into Active Directory.
The architecture of Certificate Services supports extensibility and programmability. An enterprise can replace default modules with custom modules to enforce its own local policy on certificate issuance, contents of certificate fields, certificate extensions, and external certificate storage requirements. The architecture can extend Certificate Services to support custom certificate extensions, custom certificate types, and custom transport protocols. Furthermore, an enterprise can use Certificate Services to set up a certificate hierarchy that matches its organizational structure.
Certificate Services accepts certificate enrollment requests in the standard PKCS #10 format and issues standard X.509 V3 certificates. Certificate Services is transport independent: A client application can use a variety of transport-layer protocols, such as HTTP, RPC, DCOM, e-mail, file disk, or custom transports, to submit an enrollment request and to receive a certificate.
Certificate Services issues certificates for various applications, including client authentication, Web server authentication, and secure e-mail, and provides revocation information for certificate-using applications through CRLs and CRL distribution points. Certificate Services supports hardware-based cryptography, such as issuing certificates on smart cards for domain log-on or other applications that require smart cards.
Certificate Services supports both enterprise and standalone certification authorities.4 Enterprise CAs tightly integrate with Active Directory and automatically process enrollment requests, whereas standalone CAs typically queue enrollment requests for manual processing. Chapter 5 covers enterprise and standalone CAs in more detail.
Certificate Services consists of the server engine, the server database, an intermediary, a set of customizable modules, and administration tools. The flexibility to customize Certificate Services is perhaps the most notable aspect of the architecture. The server engine provides a number of Component Object Model (COM) interfaces. An enterprise dictates its own local policy for certificate approval, certificate fields, certificate extensions, and external certificate storage requirements by customizing the default policy and exit modules, which interact with the server engine through the COM interfaces. Furthermore, the server engine can encode complex, custom extensions through an extension-handler mechanism.
Each building block of Certificate Services plays a role during the certificate enrollment process. An intermediary application receives a certificate request from a client, formats it into a PKCS #10 certificate request, and submits it to the server engine. The server engine hands over the request to the policy module. This module either approves or denies the request, optionally adjusts the certificate subject distinguished name, potentially adjusts the certificate validity period, and sets optional certificate extensions. If the policy module has approved the request, the server engine builds a certificate to fulfill the original request and the adjustments made by the policy module and stores the certificate in its database. The policy module then delivers the issued certificate to the intermediary application, which passes the certificate back to the client for installation. Finally, the exit module receives a cer-tificate issuance event notification from the server engine, if it has so requested, and performs further operations, such as publishing the certificate to Active Directory.
4. To avoid a possible naming confusion among many PKI products and services, we adopt the following conventions in this book. The terms Microsoft or Windows 2000 enterprise CA and Microsoft or Windows 2000 standalone CAs refer to Microsoft or Windows 2000 Certificate Services. We may omit Microsoft or Windows 2000 if suitable contextual information exits. The term third-party PKI product refers to a PKI product other than Microsoft PKI and its associated Certificate Services. The terms third-party commercial PKI service provider and third-party commercial CA service provider refer to third-party certification authorities that provide PKI outsourcing services.
Server Engine
The server engine builds certificates and CRLs. It communicates with clients through an intermediary, receives certificate requests, generates certificates, and delivers them back to the intermediary. The server engine communicates with a customizable policy module before issuing a certificate and notifies a customizable exit module when issuing a certificate or a CRL.
Policy Modules
Policy modules allow an enterprise to enforce its local policy on certificate issuance. Most important, a policy module determines whether the server engine should fulfill a certificate enrollment request. Exactly how a policy module arrives at this critical decision is a matter of local policy and reflects an enterprise authentication model and practice statements. The policy module can, for example, approve a request if a user has provided appropriate Windows 2000 credentials, or it can consult a third-party authentication database.
Policy modules also enable an enterprise to enforce its local policy on the content of a certificate. A policy module can make certain changes to the certificate subject distinguished name, modify the requested validity period, and add custom extensions to the certificate.
A policy module is a customizable dynamic link library. Windows 2000 ships appropriate default policy modules for both the Certificate Services enterprise and standalone CAs. The enterprise CA default policy module automatically approves authorized certificate requests, adds a set of predefined extensions to certificates, and supports smart card certificates for domain log-on. The standalone CA default policy module queues enrollment requests for manual approval and does not support many of the features of the enterprise default policy module. An enterprise can provide its own custom policy module if the default modules are unacceptable; Microsoft, however, recommends the default enterprise policy module for enterprise CAs.
Exit Modules
Exit modules deal with the storage of certificates and certificate revocation lists (CRLs) in external repositories. When it issues a certificate or a CRL, the server engine interacts with an exit module to enforce the local storage policy. Note that an exit module can only publish a certificate or a CRL into a repository but cannot make any changes to them.
An exit module is a customizable dynamic link library. Windows 2000 ships an enterprise certification authority default exit module that publishes certificates and CRLs into Active Directory. An enterprise can provide its own custom exit module if the default module is unacceptable. For an enterprise certification authority, however, an enterprise should always use the default exit module as a part of its custom exit module.
Extension Handlers
A policy module can encode domain-specific information in a certificate by adding X.509 V3 extension fields. For extensions that have date, long, or string data types, the policy module passes the required extensions and their types to the server engine, which ASN encodes the extensions and stores them in the certificate. If an extension has a type other than date, long, or string, the policy module must ASN-encode the extension before handing it over to the server engine.
An extension-handler module is a customizable dynamic link library that provides the necessary machinery to ASN-encode complex extensions. The policy module simply calls the appropriate extension-handler function to perform the ASN encoding before passing the extension to the server engine. Windows 2000 ships a default extension-handler module that encodes various complex extensions, such as alternative names, bit strings, CRL distribution points, date arrays, long arrays, and string arrays. An enterprise can write its own extension-handler module to encode custom extensions or other complex extensions.
Intermediaries
Intermediaries work as a glue between client applications and the server engine. An intermediary receives certificate enrollment requests from a client over a transport protocol, such as HTTPS, and submits them to the sever engine for processing. The intermediary locates the enterprise certification authority that should process the enrollment, submits the request, receives the issued certificate, and delivers the cer-tificate back to the client.
Microsoft Internet Information Services (IIS) is the standard HTTP intermediary application for Certificate Services. IIS receives enrollment requests over the HTTP/ HTTPS protocol from Web clients-browsers-and communicates with Certificate Services to fulfill the requests. An enterprise needs to develop intermediaries for clients that use other transport layer protocols, such as RPC or e-mail.
3. A future version of Windows will subsume KMS into the operating system.