HTTP/1.1 200 OK Date: Tue, 09 Apr 2002 08:04:54 GMT Server: Apache/1.3.20 (Unix) Last-Modified: Wed, 18 Mar 1998 02:32:00 GMT ETag: "2e7bd7-718d-350f3220" Accept-Ranges: bytes Content-Length: 29069 Connection: close Content-Type: text/plain Internet Draft Editor: Blake Ramsdell, draft-ietf-smime-cert-02.txt Worldtalk March 11, 1998 Expires in six months S/MIME Version 3 Certificate Handling Status of this memo This document is an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." To learn the current status of any Internet-Draft, please check the "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast). 1. Overview S/MIME (Secure/Multipurpose Internet Mail Extensions), described in [SMIME-MSG], provides a method to send and receive secure MIME messages. In order to validate the keys of a message sent to it, an S/MIME agent needs to certify that the key is valid. This draft describes the mechanisms S/MIME uses to create and validate keys using certificates. This specification is compatible with the Cryptographic Message Syntax [CMS] in that it uses the data types defined by CMS. It also inherits all the varieties of architectures for certificate-based key management supported by CMS. Note that the method S/MIME messages make certificate requests is defined in [SMIME-MSG]. In order to handle S/MIME certificates, an agent has to follow specifications in this draft, as well as some of the specifications listed in the following documents: - "PKCS #1: RSA Encryption", [PKCS-1]. - "Cryptographic Message Syntax", [CMS]. 1.1 Definitions For the purposes of this draft, the following definitions apply. ASN.1: Abstract Syntax Notation One, as defined in ITU-T X.680-689. Attribute Certificate (AC): An X.509 AC is a separate structure from a subject's public key X.509 Certificate. A subject may have multiple X.509 ACs associated with each of its public key X.509 Certificates. Each X.509 AC binds a SEQUENCE OF Attributes with one of the subject's public key X.509 Certificates. The X.509 AC syntax is defined in [X.509] BER: Basic Encoding Rules for ASN.1, as defined in ITU-T X.690. Certificate: A type that binds an entity's distinguished name to a public key with a digital signature. This type is defined in ITU-T X.509 [X.509]. This type also contains the distinguished name of the certificate issuer (the signer), an issuer-specific serial number, the issuer's signature algorithm identifier, and a validity period. Certificate Revocation List (CRL): A type that contains information about certificates whose validity an issuer has prematurely revoked. The information consists of an issuer name, the time of issue, the next scheduled time of issue, and a list of certificate serial numbers and their associated revocation times. The CRL is signed by the issuer. The type intended by this specification is the one defined in [KEYM]. DER: Distinguished Encoding Rules for ASN.1, as defined in ITU-T X.690. 1.2 Compatibility with Prior Practice of S/MIME Appendix C contains important information about how S/MIME agents following this specification should act in order to have the greatest interoperability with earlier implementations of S/MIME. 1.3 Terminology Throughout this draft, the terms MUST, MUST NOT, SHOULD, and SHOULD NOT are used in capital letters. This conforms to the definitions in [MUSTSHOULD]. [MUSTSHOULD] defines the use of these key words to help make the intent of standards track documents as clear as possible. The same key words are used in this document to help implementors achieve interoperability. 1.4 Discussion of This Draft This draft is being discussed on the "ietf-smime" mailing list. To subscribe, send a message to: ietf-smime-request@imc.org with the single word subscribe in the body of the message. There is a Web site for the mailing list at . 2. CMS Options The CMS message format allows for a wide variety of options in content and algorithm support. This section puts forth a number of support requirements and recommendations in order to achieve a base level of interoperability among all S/MIME implementations. Most of the CMS format for S/MIME messages is defined in [SMIME-MSG]. 2.1 CertificateRevocationLists Receiving agents MUST support for the Certificate Revocation List (CRL) format defined in [KEYM]. If sending agents include CRLs in outgoing messages, the CRL format defined in [KEYM] MUST be used. All agents MUST validate CRLs and check certificates against CRLs, if available, in accordance with [KEYM]. All agents SHOULD check the nextUpdate field in the CRL against the current time. If the current time is later than the nextUpdate time, the action that the agent takes is a local decision. For instance, it could warn a human user, it could retrieve a new CRL if able, and so on. Receiving agents MUST recognize CRLs in received S/MIME messages. Clients MUST use revocation information included as a CRL in an S/MIME message when verifying the signature and certificate path validity in that message. Clients SHOULD store CRLs received in messages for use in processing later messages. Clients MUST handle multiple valid Certificate Authority (CA) certificates containing the same subject name and the same public keys but with overlapping validity intervals. 2.2 CertificateChoices Receiving agents MUST support X.509 v1 and X.509 v3 certificates. See [KEYM] for details about the profile for certificate formats. End entity certificates MUST include an Internet mail address, as described in section 3.1. Receiving agents SHOULD support X.509 attribute certificates. 2.2.1 Historical Note About CMS Certificates The CMS message format supports a choice of certificate two formats for public key content types: X.509 and PKCS #6 Extended Certificates. The PKCS #6 format is not in widespread use. In addition, proposed revisions of X.509 certificates address much of the same functionality and flexibility as was intended in the PKCS #6. Thus, sending and receiving agents MUST NOT use PKCS #6 extended certificates. 2.3 CertificateSet Receiving agents MUST be able to handle an arbitrary number of certificates of arbitrary relationship to the message sender and to each other in arbitrary order. In many cases, the certificates included in a signed message may represent a chain of certification from the sender to a particular root. There may be, however, situations where the certificates in a signed message may be unrelated and included for convenience. Sending agents SHOULD include any certificates for the user's public key(s) and associated issuer certificates. This increases the likelihood that the intended recipient can establish trust in the originator's public key(s). This is especially important when sending a message to recipients that may not have access to the sender's public key through any other means or when sending a signed message to a new recipient. The inclusion of certificates in outgoing messages can be omitted if S/MIME objects are sent within a group of correspondents that has established access to each other's certificates by some other means such as a shared directory or manual certificate distribution. Receiving S/MIME agents SHOULD be able to handle messages without certificates using a database or directory lookup scheme. A sending agent SHOULD include at least one chain of certificates up to, but not including, a Certificate Authority (CA) that it believes that the recipient may trust as authoritative. A receiving agent SHOULD be able to handle an arbitrarily large number of certificates and chains. Clients MAY send CA certificates, that is, certificates that are self- signed and can be considered the "root" of other chains. Note that receiving agents SHOULD NOT simply trust any self-signed certificates as valid CAs, but SHOULD use some other mechanism to determine if this is a CA that should be trusted. Receiving agents MUST support chaining based on the distinguished name fields. Other methods of building certificate chains may be supported but are not currently recommended. Receiving agents SHOULD support X.509 attribute certificates. At a minimum, receiving agents SHOULD at least support the decoding of X.509 attribute certificates. Please note that there is no requirement that the same CA create both the public key X.509 Certificate and X.509 attribute certificate(s) for a user. Each organization's local policy will define how X.509 attribute certificates are validated and used. The implications of performing multiple certification path validations should be considered when defining local policy. Exchanges between a subject and the CA dealing with the generation of X.509 attribute certificates are outside the scope of this specification. 3. Distinguished Names in Certificates 3.1 Using Distinguished Names for Internet Mail The format of an X.509 certificate includes fields for the subject name and issuer name. The subject name identifies the owner of a particular public key/private key pair while the issuer name is meant to identify the entity that "certified" the subject (that is, who signed the subject's certificate). The subject name and issuer name are defined by X.509 as Distinguished Names. Distinguished Names are defined by a ITU-T standard X.501 [X.501]. A Distinguished Name is broken into one or more Relative Distinguished Names. Each Relative Distinguished Name is comprised of one or more Attribute-Value Assertions. Each Attribute-Value Assertion consists of a Attribute Identifier and its corresponding value information, such as CountryName=US. Distinguished Names were intended to identify entities in the X.500 directory tree [X.500]. Each Relative Distinguished Name can be thought of as a node in the tree which is described by some collection of Attribute-Value Assertions. The entire Distinguished Name is some collection of nodes in the tree that traverse a path from the root of the tree to some end node which represents a particular entity. The goal of the directory was to provide an infrastructure to uniquely name every communications entity everywhere. However, adoption of a global X.500 directory infrastructure has been slower than expected. Consequently, there is no requirement for X.500 directory service provision in the S/MIME environment, although such provision would almost undoubtedly be of great value in facilitating key management for S/MIME. The use of Distinguished Names in accordance with the X.500 directory is not very widespread. By contrast, Internet mail addresses, as described in RFC 822 [RFC-822], are used almost exclusively in the Internet environment to identify originators and recipients of messages. However, Internet mail addresses bear no resemblance to X.500 Distinguished Names (except, perhaps, that they are both hierarchical in nature). Some method is needed to map Internet mail addresses to entities that hold public keys. Some people have suggested that the X.509 certificate format should be abandoned in favor of other binding mechanisms. Instead, S/MIME keeps the X.509 certificate and Distinguished Name mechanisms while tailoring the content of the naming information to suit the Internet mail environment. End-entity certificates MAY contain an Internet mail address as described in [RFC-822]. The address must be an "addr-spec" as defined in Section 6.1 of that specification. The email address SHOULD be in the subjectAltName extension, and SHOULD NOT be in the subject distinguished name. Receiving agents MUST recognize email addresses in the subjectAltName field. Receiving agents MUST recognize email addresses in the Distinguished Name field. Sending agents SHOULD make the address in the From or Sender header in a mail message match an Internet mail address in the signer's certificate. Receiving agents MUST check that the address in the From or Sender header of a mail message matches an Internet mail address in the signer's certificate, if mail addresses are present in the certificate. A receiving agent SHOULD provide some explicit alternate processing of the message if this comparison fails, which may be to display a message that shows the recipient the addresses in the certificate or other certificate details. All subject and issuer names MUST be non-NULL in S/MIME-compliant v3 X.509 Certificates, except that the subject DN in a user's (i.e. end- entity) certificate MAY be NULL in which case the subjectAltName extension will include the subject's identifier and MUST be marked as critical. 3.2 Required Name Attributes Receiving agents MUST support parsing of zero, one, or more instances of each of the following set of name attributes within the Distinguished Names in certificates. Guidelines for the inclusion, omission, and ordering of name attributes during the creation of a distinguished name will most likely be dictated by the policies associated with the certification service which will certify the corresponding name and public key. countryName stateOrProvinceName localityName commonName title organizationName organizationalUnitName streetAddress postalCode telephoneNumber emailAddress All attributes other than emailAddress are described in X.520 [X.520]. emailAddress is an IA5String that can have multiple attribute values. 4. Certificate Processing A receiving agent needs to provide some certificate retrieval mechanism in order to gain access to certificates for recipients of digital envelopes. There are many ways to implement certificate retrieval mechanisms. X.500 directory service is an excellent example of a certificate retrieval-only mechanism that is compatible with classic X.500 Distinguished Names. The PKIX Working Group is investigating other mechanisms. Another method under consideration by the IETF is to provide certificate retrieval services as part of the existing Domain Name System (DNS). Until such mechanisms are widely used, their utility may be limited by the small number of correspondent's certificates that can be retrieved. At a minimum, for initial S/MIME deployment, a user agent could automatically generate a message to an intended recipient requesting that recipient's certificate in a signed return message. Receiving and sending agents SHOULD also provide a mechanism to allow a user to "store and protect" certificates for correspondents in such a way so as to guarantee their later retrieval. In many environments, it may be desirable to link the certificate retrieval/storage mechanisms together in some sort of certificate database. In its simplest form, a certificate database would be local to a particular user and would function in a similar way as a "address book" that stores a user's frequent correspondents. In this way, the certificate retrieval mechanism would be limited to the certificates that a user has stored (presumably from incoming messages). A comprehensive certificate retrieval/storage solution may combine two or more mechanisms to allow the greatest flexibility and utility to the user. For instance, a secure Internet mail agent may resort to checking a centralized certificate retrieval mechanism for a certificate if it can not be found in a user's local certificate storage/retrieval database. Receiving and sending agents SHOULD provide a mechanism for the import and export of certificates, using a PKCS #7 certs-only message. This allows for import and export of full certificate chains as opposed to just a single certificate. This is described in [SMIME-MSG]. 4.1 Certificate Revocation Lists A receiving agent SHOULD have access to some certificate-revocation list (CRL) retrieval mechanism in order to gain access to certificate- revocation information when validating certificate chains. A receiving or sending agent SHOULD also provide a mechanism to allow a user to store incoming certificate-revocation information for correspondents in such a way so as to guarantee its later retrieval. However, it is always better to get the latest information from the CA than to get information stored away from incoming messages. Receiving and sending agents SHOULD retrieve and utilize CRL information every time a certificate is verified as part of a certificate chain validation even if the certificate was already verified in the past. However, in many instances (such as off-line verification) access to the latest CRL information may be difficult or impossible. The use of CRL information, therefore, may be dictated by the value of the information that is protected. The value of the CRL information in a particular context is beyond the scope of this draft but may be governed by the policies associated with particular certificate hierarchies. 4.2 Certificate Chain Validation In creating a user agent for secure messaging, certificate, CRL, and certificate chain validation SHOULD be highly automated while still acting in the best interests of the user. Certificate, CRL, and chain validation MUST be performed as per [KEYM] when validating a correspondent's public key. This is necessary when a) verifying a signature from a correspondent and, b) creating a digital envelope with the correspondent as the intended recipient. Certificates and CRLs are made available to the chain validation procedure in two ways: a) incoming messages, and b) certificate and CRL retrieval mechanisms. Certificates and CRLs in incoming messages are not required to be in any particular order nor are they required to be in any way related to the sender or recipient of the message (although in most cases they will be related to the sender). Incoming certificates and CRLs SHOULD be cached for use in chain validation and optionally stored for later use. This temporary certificate and CRL cache SHOULD be used to augment any other certificate and CRL retrieval mechanisms for chain validation on incoming signed messages. 4.3 Certificate and CRL Signing Algorithms Certificates and Certificate-Revocation Lists (CRLs) are signed by the certificate issuer. A receiving agent MUST be capable of verifying the signatures on certificates and CRLs made with id-dsa-with-sha1. A receiving agent SHOULD be capable of verifying the signatures on certificates and CRLs made with md2WithRSAEncryption, md5WithRSAEncryption and sha-1WithRSAEncryption signature algorithms with key sizes from 512 bits to 2048 bits described in [SMIME-MSG]. 4.4 X.509 Version 3 Certificate Extensions The X.509 v3 standard describes an extensible framework in which the basic certificate information can be extended and how such extensions can be used to control the process of issuing and validating certificates. The PKIX Working Group has ongoing efforts to identify and create extensions which have value in particular certification environments. As such, there is still a fair amount of profiling work to be done before there is widespread agreement on which v3 extensions will be used. Further, there are active efforts underway to issue X.509 v3 certificates for business purposes. This draft identifies the minumum required set of certificate extensions which have the greatest value in the S/MIME environment. The basicConstraints, and keyUsage extensions are defined in [X.509]. Sending and receiving agents MUST correctly handle the v3 Basic Constraints Certificate Extension, the Key Usage Certificate Extension, authorityKeyID, subjectKeyID, and the subjectAltNames when they appear in end-user certificates. Some mechanism SHOULD exist to handle the defined v3 certificate extensions when they appear in intermediate or CA certificates. Certificates issued for the S/MIME environment SHOULD NOT contain any critical extensions other than those listed here. These extensions SHOULD be marked as non-critical unless the proper handling of the extension is deemed critical to the correct interpretation of the associated certificate. Other extensions may be included, but those extensions SHOULD NOT be marked as critical. 4.4.1 Basic Constraints Certificate Extension The basic constraints extension serves to delimit the role and position of an issuing authority or end-user certificate plays in a chain of certificates. For example, certificates issued to CAs and subordinate CAs contain a basic constraint extension that identifies them as issuing authority certificates. End-user subscriber certificates contain an extension that constrains the certificate from being an issuing authority certificate. Certificates SHOULD contain a basicConstraints extension. 4.4.2 Key Usage Certificate Extension The key usage extension serves to limit the technical purposes for which a public key listed in a valid certificate may be used. Issuing authority certificates may contain a key usage extension that restricts the key to signing certificates, certificate revocation lists and other data. For example, a certification authority may create subordinate issuer certificates which contain a keyUsage extension which specifies that the corresponding public key can be used to sign end user certs and sign CRLs. If a key usage extension is included in a v3 X.509 Certificate, then it MUST be marked as critical. 4.4.3 Subject Alt Name Extension TBD 5. Security Considerations All of the security issues faced by any cryptographic application must be faced by a S/MIME agent. Among these issues are protecting the user's private key, preventing various attacks, and helping the user avoid mistakes such as inadvertently encrypting a message for the wrong recipient. The entire list of security considerations is beyond the scope of this document, but some significant concerns are listed here. When processing certificates, there are many situations where the processing might fail. Because the processing may be done by a user agent, a security gateway, or other program, there is no single way to handle such failures. Just because the methods to handle the failures has not been listed, however, the reader should not assume that they are not important. The opposite is true: if a certificate is not provably valid and associated with the message, the processing software should take immediate and noticable steps to inform the end user about it. Some of the many places where signature and certificate checking might fail include: - no Internet mail addresses in a certificate match the sender of a message - no certificate chain leads to a trusted CA - no ability to check the CRL for a certificate - an invalid CRL was received - the CRL being checked is expired - the certificate is expired - the certificate has been revoked There are certainly other instances where a certificate may be invalid, and it is the responsibility of the processing software to check them all thoroughly, and to decide what to do if the check fails. A. Object Identifiers and Syntax Sections A.1 through A.4 are adopted from [SMIME-MSG]. A.5 Name Attributes emailAddress OBJECT IDENTIFIER ::= {iso(1) member-body(2) US(840) rsadsi(113549) pkcs(1) pkcs-9(9) 1} id-at-countryName OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 6} id-at-stateOrProvinceName OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 8} id-at-localityName OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 7} id-at-commonName OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 3} id-at-title OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 12} id-at-organizationName OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 10} id-at-organizationalUnitName OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 11} id-at-streetAddress OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 9} id-at-postalCode OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 17} id-at-telephoneNumber OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) attributeType(4) 20} A.6 X.509 V3 Certificate Extensions basicConstraints OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 29 19 } The ASN.1 definition of basicConstraints certificate extension is: basicConstraints basicConstraints EXTENSION ::= { SYNTAX BasicConstraintsSyntax IDENTIFIED BY { id-ce 19 } } BasicConstraintsSyntax ::= SEQUENCE { cA BOOLEAN DEFAULT FALSE, pathLenConstraint INTEGER (0..MAX) OPTIONAL } keyUsage OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 29 15 } The ASN.1 definition of keyUsage certificate extension is: keyUsage EXTENSION ::= { SYNTAX KeyUsage IDENTIFIED BY { id-ce 15 }} KeyUsage ::= BIT STRING { digitalSignature (0), nonRepudiation (1), keyEncipherment (2), dataEncipherment (3), keyAgreement (4), keyCertSign (5), cRLSign (6)} B. References [CERTV2] "S/MIME Certificate Handling", Internet Draft draft-dusse- smime-cert [CMS] "Cryptographic Message Syntax", Internet Draft draft-housley- smime-cms [CRMF] "Certificate Request Message Format", Internet Draft draft-ietf- pkix-crmf [KEYM] "Internet Public Key Infrastructure X.509 Certificate and CRL Profile", Internet-Draft draft-ietf-pkix-ipki-part1 [MUSTSHOULD] "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119 [PKCS-1], "PKCS #1: RSA Encryption", draft has been submitted for RFC status [RFC-822], "Standard For The Format Of ARPA Internet Text Messages", RFC 822. [SMIME-MSG] "S/MIME Version 3 Message Specification ", Internet Draft draft-ietf-smime-msg [X.500] ITU-T Recommendation X.500 (1997) | ISO/IEC 9594-1:1997, Information technology - Open Systems Interconnection - The Directory: Overview of concepts, models and services [X.501] ITU-T Recommendation X.501 (1997) | ISO/IEC 9594-2:1997, Information technology - Open Systems Interconnection - The Directory: Models [X.509] ITU-T Recommendation X.509 (1997) | ISO/IEC 9594-8:1997, Information technology - Open Systems Interconnection - The Directory: Authentication framework [X.520] ITU-T Recommendation X.520 (1997) | ISO/IEC 9594-6:1997, Information technology - Open Systems Interconnection - The Directory: Selected attribute types. C. Compatibility with Prior Practice in S/MIME S/MIME was originally developed by RSA Data Security, Inc. Many developers implemented S/MIME agents before this document was published. All S/MIME receiving agents SHOULD make every attempt to interoperate with these earlier implementations of S/MIME. D. Changes from S/MIME v2 Reworded section 4.3 for signing algorithms to MUST id-dsa-with-sha1 and SHOULD all others Changed [SMIME-MSG] to draft-ietf-smime-msg Changed references to PKCS #7 and [PKCS-7] to Cryptographic Message Specification and [CMS] Section 2.2 is now "CertificateChoices" instead of "ExtendedCertificatesOrCertificate" Section 2.3 is now "CertificateSet" instead of "ExtendedCertificatesAndCertificates" Attribute certificates added Section 5.3 is now SHOULD id-dsa-with-sha1 and MAY sha- 1WithRSAEncryption Added CRMF for certificate requests in section 5 Section 4.4.2 X.509v3 key usage extension MUST be critical if present E. Acknowledgements This document is largely based on [CERTV2] written by Steve Dusse, Paul Hoffman, Blake Ramsdell, and Jeff Weinstein. Significant comments and additions were made by Michael Myers, John Pawling and Jim Schaad. F. Needed changes Algorithms for certs Names for chaining Rewrite 5.2 for CMP and id-dsa-with-sha1 Make references [PKCS-*] consistent with smime-msg spec 2.2.1 -- are they "proposed" revisions, or actual revisions? Section A.7 -- bit 7 is encipherOnly, bit 8 is decipherOnly. Are we going to use these? Challenge password -- CHOICE should be tagged for assigning values, and should UTF8 should be an option? A.7 -- certificate extensions. Are we keeping this up-to-date, or do we just refer to PKIX? subjectAltName is an extension -- we need to deal with it as such Key usage for signing / encrypting certificate explanation RFC # for PKCS #1 G. Changes from last draft Cleaned up OIDs (Phil Griffin) MUST changed to MAY for email address in certs (section 3.1) (Elliott Ginsburg) Added clarification for certificate chaining in 4.2 to refer to PKIX (John Pawling) Removed all cert request language (Paul Hoffman) Changed some CCITT to ITU-T H. Editor's address Blake Ramsdell Worldtalk 13122 NE 20th St., Suite C Bellevue, WA 98005 (425) 882-8861 blaker@deming.com