home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2510.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  158.4 KB  |  4,036 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                            C. Adams
  8. Request for Comments: 2510                           Entrust Technologies
  9. Category: Standards Track                                      S. Farrell
  10.                                                                       SSE
  11.                                                                March 1999
  12.  
  13.  
  14.                 Internet X.509 Public Key Infrastructure
  15.                     Certificate Management Protocols
  16.  
  17. Status of this Memo
  18.  
  19.    This document specifies an Internet standards track protocol for the
  20.    Internet community, and requests discussion and suggestions for
  21.    improvements.  Please refer to the current edition of the "Internet
  22.    Official Protocol Standards" (STD 1) for the standardization state
  23.    and status of this protocol.  Distribution of this memo is unlimited.
  24.  
  25. Copyright Notice
  26.  
  27.    Copyright (C) The Internet Society (1999).  All Rights Reserved.
  28.  
  29. Abstract
  30.  
  31.    This document describes the Internet X.509 Public Key Infrastructure
  32.    (PKI) Certificate Management Protocols. Protocol messages are defined
  33.    for all relevant aspects of certificate creation and management.
  34.    Note that "certificate" in this document refers to an X.509v3
  35.    Certificate as defined in [COR95, X509-AM].
  36.  
  37.    The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT",
  38.    "RECOMMENDED", "MAY", and "OPTIONAL" in this document (in uppercase,
  39.    as shown) are to be interpreted as described in [RFC2119].
  40.  
  41. Introduction
  42.  
  43.    The layout of this document is as follows:
  44.  
  45.    - Section 1 contains an overview of PKI management;
  46.    - Section 2 contains discussion of assumptions and restrictions;
  47.    - Section 3 contains data structures used for PKI management messages;
  48.    - Section 4 defines the functions that are to be carried out in PKI
  49.      management by conforming implementations;
  50.    - Section 5 describes a simple protocol for transporting PKI messages;
  51.    - the Appendices specify profiles for conforming implementations and
  52.      provide an ASN.1 module containing the syntax for all messages
  53.      defined in this specification.
  54.  
  55.  
  56.  
  57.  
  58. Adams & Farrell             Standards Track                     [Page 1]
  59.  
  60. RFC 2510          PKI Certificate Management Protocols        March 1999
  61.  
  62.  
  63. 1 PKI Management Overview
  64.  
  65.    The PKI must be structured to be consistent with the types of
  66.    individuals who must administer it.  Providing such administrators
  67.    with unbounded choices not only complicates the software required but
  68.    also increases the chances that a subtle mistake by an administrator
  69.    or software developer will result in broader compromise. Similarly,
  70.    restricting administrators with cumbersome mechanisms will cause them
  71.    not to use the PKI.
  72.  
  73.    Management protocols are REQUIRED to support on-line interactions
  74.    between Public Key Infrastructure (PKI) components.  For example, a
  75.    management protocol might be used between a Certification Authority
  76.    (CA) and a client system with which a key pair is associated, or
  77.    between two CAs that issue cross-certificates for each other.
  78.  
  79. 1.1 PKI Management Model
  80.  
  81.    Before specifying particular message formats and procedures we first
  82.    define the entities involved in PKI management and their interactions
  83.    (in terms of the PKI management functions required).  We then group
  84.    these functions in order to accommodate different identifiable types
  85.    of end entities.
  86.  
  87. 1.2 Definitions of PKI Entities
  88.  
  89.    The entities involved in PKI management include the end entity (i.e.,
  90.    the entity to be named in the subject field of a certificate) and the
  91.    certification authority (i.e., the entity named in the issuer field
  92.    of a certificate). A registration authority MAY also be involved in
  93.    PKI management.
  94.  
  95. 1.2.1 Subjects and End Entities
  96.  
  97.    The term "subject" is used here to refer to the entity named in the
  98.    subject field of a certificate; when we wish to distinguish the tools
  99.    and/or software used by the subject (e.g., a local certificate
  100.    management module) we will use the term "subject equipment". In
  101.    general, the term "end entity" (EE) rather than subject is preferred
  102.    in order to avoid confusion with the field name.
  103.  
  104.    It is important to note that the end entities here will include not
  105.    only human users of applications, but also applications themselves
  106.    (e.g., for IP security). This factor influences the protocols which
  107.    the PKI management operations use; for example, application software
  108.    is far more likely to know exactly which certificate extensions are
  109.    required than are human users. PKI management entities are also end
  110.    entities in the sense that they are sometimes named in the subject
  111.  
  112.  
  113.  
  114. Adams & Farrell             Standards Track                     [Page 2]
  115.  
  116. RFC 2510          PKI Certificate Management Protocols        March 1999
  117.  
  118.  
  119.    field of a certificate or cross-certificate. Where appropriate, the
  120.    term "end-entity" will be used to refer to end entities who are not
  121.    PKI management entities.
  122.  
  123.    All end entities require secure local access to some information --
  124.    at a minimum, their own name and private key, the name of a CA which
  125.    is directly trusted by this entity and that CA's public key (or a
  126.    fingerprint of the public key where a self-certified version is
  127.    available elsewhere). Implementations MAY use secure local storage
  128.    for more than this minimum (e.g., the end entity's own certificate or
  129.    application-specific information). The form of storage will also vary
  130.    -- from files to tamper-resistant cryptographic tokens.  Such local
  131.    trusted storage is referred to here as the end entity's Personal
  132.    Security Environment (PSE).
  133.  
  134.    Though PSE formats are beyond the scope of this document (they are
  135.    very dependent on equipment, et cetera), a generic interchange format
  136.    for PSEs is defined here - a certification response message MAY be
  137.    used.
  138.  
  139. 1.2.2 Certification Authority
  140.  
  141.    The certification authority (CA) may or may not actually be a real
  142.    "third party" from the end entity's point of view. Quite often, the
  143.    CA will actually belong to the same organization as the end entities
  144.    it supports.
  145.  
  146.    Again, we use the term CA to refer to the entity named in the issuer
  147.    field of a certificate; when it is necessary to distinguish the
  148.    software or hardware tools used by the CA we use the term "CA
  149.    equipment".
  150.  
  151.    The CA equipment will often include both an "off-line" component and
  152.    an "on-line" component, with the CA private key only available to the
  153.    "off-line" component. This is, however, a matter for implementers
  154.    (though it is also relevant as a policy issue).
  155.  
  156.    We use the term "root CA" to indicate a CA that is directly trusted
  157.    by an end entity; that is, securely acquiring the value of a root CA
  158.    public key requires some out-of-band step(s). This term is not meant
  159.    to imply that a root CA is necessarily at the top of any hierarchy,
  160.    simply that the CA in question is trusted directly.
  161.  
  162.    A "subordinate CA" is one that is not a root CA for the end entity in
  163.    question. Often, a subordinate CA will not be a root CA for any
  164.    entity but this is not mandatory.
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Adams & Farrell             Standards Track                     [Page 3]
  171.  
  172. RFC 2510          PKI Certificate Management Protocols        March 1999
  173.  
  174.  
  175. 1.2.3 Registration Authority
  176.  
  177.    In addition to end-entities and CAs, many environments call for the
  178.    existence of a Registration Authority (RA) separate from the
  179.    Certification Authority. The functions which the registration
  180.    authority may carry out will vary from case to case but MAY include
  181.    personal authentication, token distribution, revocation reporting,
  182.    name assignment, key generation, archival of key pairs, et cetera.
  183.  
  184.    This document views the RA as an OPTIONAL component - when it is not
  185.    present the CA is assumed to be able to carry out the RA's functions
  186.    so that the PKI management protocols are the same from the end-
  187.    entity's point of view.
  188.  
  189.    Again, we distinguish, where necessary, between the RA and the tools
  190.    used (the "RA equipment").
  191.  
  192.    Note that an RA is itself an end entity. We further assume that all
  193.    RAs are in fact certified end entities and that RAs have private keys
  194.    that are usable for signing. How a particular CA equipment identifies
  195.    some end entities as RAs is an implementation issue (i.e., this
  196.    document specifies no special RA certification operation). We do not
  197.    mandate that the RA is certified by the CA with which it is
  198.    interacting at the moment (so one RA may work with more than one CA
  199.    whilst only being certified once).
  200.  
  201.    In some circumstances end entities will communicate directly with a
  202.    CA even where an RA is present. For example, for initial registration
  203.    and/or certification the subject may use its RA, but communicate
  204.    directly with the CA in order to refresh its certificate.
  205.  
  206. 1.3 PKI Management Requirements
  207.  
  208.    The protocols given here meet the following requirements on PKI
  209.    management.
  210.  
  211.       1. PKI management must conform to the ISO 9594-8 standard and the
  212.          associated amendments (certificate extensions)
  213.  
  214.       2. PKI management must conform to the other parts of this series.
  215.  
  216.       3. It must be possible to regularly update any key pair without
  217.          affecting any other key pair.
  218.  
  219.       4. The use of confidentiality in PKI management protocols must be
  220.          kept to a minimum in order to ease regulatory problems.
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Adams & Farrell             Standards Track                     [Page 4]
  227.  
  228. RFC 2510          PKI Certificate Management Protocols        March 1999
  229.  
  230.  
  231.       5. PKI management protocols must allow the use of different
  232.          industry-standard cryptographic algorithms, (specifically
  233.          including RSA, DSA, MD5, SHA-1) -- this means that any given
  234.          CA, RA, or end entity may, in principle, use whichever
  235.          algorithms suit it for its own key pair(s).
  236.  
  237.       6. PKI management protocols must not preclude the generation of
  238.          key pairs by the end-entity concerned, by an RA, or by a CA --
  239.          key generation may also occur elsewhere, but for the purposes
  240.          of PKI management we can regard key generation as occurring
  241.          wherever the key is first present at an end entity, RA, or CA.
  242.  
  243.       7. PKI management protocols must support the publication of
  244.          certificates by the end-entity concerned, by an RA, or by a CA.
  245.          Different implementations and different environments may choose
  246.          any of the above approaches.
  247.  
  248.       8. PKI management protocols must support the production of
  249.          Certificate Revocation Lists (CRLs) by allowing certified end
  250.          entities to make requests for the revocation of certificates -
  251.          this must be done in such a way that the denial-of-service
  252.          attacks which are possible are not made simpler.
  253.  
  254.       9. PKI management protocols must be usable over a variety of
  255.          "transport" mechanisms, specifically including mail, http,
  256.          TCP/IP and ftp.
  257.  
  258.       10. Final authority for certification creation rests with the CA;
  259.           no RA or end-entity equipment can assume that any certificate
  260.           issued by a CA will contain what was requested -- a CA may
  261.           alter certificate field values or may add, delete or alter
  262.           extensions according to its operating policy. In other words,
  263.           all PKI entities (end-entities, RAs, and CAs) must be capable
  264.           of handling responses to requests for certificates in which
  265.           the actual certificate issued is different from that requested
  266.           (for example, a CA may shorten the validity period requested).
  267.           Note that policy may dictate that the CA must not publish or
  268.           otherwise distribute the certificate until the requesting
  269.           entity has reviewed and accepted the newly-created certificate
  270.           (typically through use of the PKIConfirm message).
  271.  
  272.       11. A graceful, scheduled change-over from one non-compromised CA
  273.           key pair to the next (CA key update) must be supported (note
  274.           that if the CA key is compromised, re-initialization must be
  275.           performed for all entities in the domain of that CA). An end
  276.           entity whose PSE contains the new CA public key (following a
  277.           CA key update) must also be able to verify certificates
  278.           verifiable using the old public key. End entities who directly
  279.  
  280.  
  281.  
  282. Adams & Farrell             Standards Track                     [Page 5]
  283.  
  284. RFC 2510          PKI Certificate Management Protocols        March 1999
  285.  
  286.  
  287.           trust the old CA key pair must also be able to verify
  288.           certificates signed using the new CA private key.  (Required
  289.           for situations where the old CA public key is "hardwired" into
  290.           the end entity's cryptographic equipment).
  291.  
  292.       12. The Functions of an RA may, in some implementations or
  293.           environments, be carried out by the CA itself. The protocols
  294.           must be designed so that end entities will use the same
  295.           protocol (but, of course, not the same key!) regardless of
  296.           whether the communication is with an RA or CA.
  297.  
  298.       13. Where an end entity requests a certificate containing a given
  299.           public key value, the end entity must be ready to demonstrate
  300.           possession of the corresponding private key value. This may be
  301.           accomplished in various ways, depending on the type of
  302.           certification request. See Section 2.3, "Proof of Possession
  303.           of Private Key", for details of the in-band methods defined
  304.           for the PKIX-CMP (i.e., Certificate Management Protocol)
  305.           messages.
  306.  
  307. PKI Management Operations
  308.  
  309.    The following diagram shows the relationship between the entities
  310.    defined above in terms of the PKI management operations. The letters
  311.    in the diagram indicate "protocols" in the sense that a defined set
  312.    of PKI management messages can be sent along each of the lettered
  313.    lines.
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Adams & Farrell             Standards Track                     [Page 6]
  339.  
  340. RFC 2510          PKI Certificate Management Protocols        March 1999
  341.  
  342.  
  343.       +---+     cert. publish        +------------+      j
  344.       |   |  <---------------------  | End Entity | <-------
  345.       | C |             g            +------------+      "out-of-band"
  346.       |   |                            | ^                loading
  347.       | e |                            | |      initial
  348.       | r |                          a | | b     registration/
  349.       | t |                            | |       certification
  350.       |   |                            | |      key pair recovery
  351.       | / |                            | |      key pair update
  352.       |   |                            | |      certificate update
  353.       | C |  PKI "USERS"               V |      revocation request
  354.       | R | -------------------+-+-----+-+------+-+-------------------
  355.       | L |  PKI MANAGEMENT    | ^              | ^
  356.       |   |    ENTITIES      a | | b          a | | b
  357.       |   |                    V |              | |
  358.       | R |             g   +------+    d       | |
  359.       | e |   <------------ | RA   | <-----+    | |
  360.       | p |      cert.      |      | ----+ |    | |
  361.       | o |       publish   +------+   c | |    | |
  362.       | s |                              | |    | |
  363.       | i |                              V |    V |
  364.       | t |          g                 +------------+   i
  365.       | o |   <------------------------|     CA     |------->
  366.       | r |          h                 +------------+  "out-of-band"
  367.       | y |      cert. publish              | ^         publication
  368.       |   |      CRL publish                | |
  369.       +---+                                 | |    cross-certification
  370.                                           e | | f  cross-certificate
  371.                                             | |       update
  372.                                             | |
  373.                                             V |
  374.                                           +------+
  375.                                           | CA-2 |
  376.                                           +------+
  377.  
  378.                            Figure 1 - PKI Entities
  379.  
  380.    At a high level the set of operations for which management messages
  381.    are defined can be grouped as follows.
  382.  
  383.       1 CA establishment: When establishing a new CA, certain steps are
  384.         required (e.g., production of initial CRLs, export of CA public
  385.         key).
  386.  
  387.       2 End entity initialization: this includes importing a root CA
  388.         public key and requesting information about the options
  389.         supported by a PKI management entity.
  390.  
  391.  
  392.  
  393.  
  394. Adams & Farrell             Standards Track                     [Page 7]
  395.  
  396. RFC 2510          PKI Certificate Management Protocols        March 1999
  397.  
  398.  
  399.       3 Certification: various operations result in the creation of new
  400.         certificates:
  401.  
  402.         3.1 initial registration/certification: This is the process
  403.             whereby  an end entity first makes itself known to a CA or
  404.             RA, prior to the CA issuing a certificate or certificates
  405.             for that end entity. The end result of this process (when it
  406.             is successful) is that a CA issues a certificate for an end
  407.             entity's public key, and returns that certificate to the end
  408.             entity and/or posts that certificate in a public repository.
  409.             This process may, and typically will, involve multiple
  410.             "steps", possibly including an initialization of the end
  411.             entity's equipment. For example, the end entity's equipment
  412.             must be securely initialized with the public key of a CA, to
  413.             be used in validating certificate paths.  Furthermore, an
  414.             end entity typically needs to be initialized with its own
  415.             key pair(s).
  416.  
  417.         3.2 key pair update:  Every key pair needs to be updated
  418.             regularly (i.e., replaced with a new key pair), and a new
  419.             certificate needs to be issued.
  420.  
  421.         3.3 certificate update: As certificates expire they may be
  422.             "refreshed" if nothing relevant in the environment has
  423.             changed.
  424.  
  425.         3.4 CA key pair update: As with end entities, CA key pairs need
  426.             to be updated regularly; however, different mechanisms are
  427.             required.
  428.  
  429.         3.5 cross-certification request:  One CA requests issuance of a
  430.             cross-certificate from another CA.  For the purposes of this
  431.             standard, the following terms are defined.  A "cross-
  432.             certificate" is a certificate in which the subject CA and
  433.             the issuer CA are distinct and SubjectPublicKeyInfo contains
  434.             a verification key (i.e., the certificate has been issued
  435.             for the subject CA's signing key pair).  When it is
  436.             necessary to distinguish more finely, the following terms
  437.             may be used: a cross-certificate is called an "inter-domain
  438.             cross-certificate" if the subject and issuer CAs belong to
  439.             different administrative domains; it is called an "intra-
  440.             domain cross-certificate" otherwise.
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Adams & Farrell             Standards Track                     [Page 8]
  451.  
  452. RFC 2510          PKI Certificate Management Protocols        March 1999
  453.  
  454.  
  455.    Notes:
  456.  
  457.    Note 1. The above definition of "cross-certificate" aligns with the
  458.    defined term "CA-certificate" in X.509.  Note that this term is not
  459.    to be confused with the X.500 "cACertificate" attribute type, which
  460.    is unrelated.
  461.  
  462.    Note 2. In many environments the term "cross-certificate", unless
  463.    further qualified, will be understood to be synonymous with "inter-
  464.    domain cross-certificate" as defined above.
  465.  
  466.    Note 3. Issuance of cross-certificates may be, but is not
  467.    necessarily, mutual; that is, two CAs may issue cross-certificates
  468.    for each other.
  469.  
  470.         3.6 cross-certificate update: Similar to a normal certificate
  471.             update but involving a cross-certificate.
  472.  
  473.       4 Certificate/CRL discovery operations: some PKI management
  474.         operations result in the publication of certificates or CRLs:
  475.  
  476.         4.1 certificate publication: Having gone to the trouble of
  477.             producing a certificate, some means for publishing it is
  478.             needed.  The "means" defined in PKIX MAY involve the
  479.             messages specified in Sections 3.3.13 - 3.3.16, or MAY
  480.             involve other methods (LDAP, for example) as described in
  481.             the "Operational Protocols" documents of the PKIX series of
  482.             specifications.
  483.  
  484.         4.2 CRL publication: As for certificate publication.
  485.  
  486.       5 Recovery operations: some PKI management operations are used
  487.         when an end entity has "lost" its PSE:
  488.  
  489.         5.1 key pair recovery:  As an option, user client key materials
  490.             (e.g., a user's private key used for decryption purposes)
  491.             MAY be backed up by a CA, an RA, or a key backup system
  492.             associated with a CA or RA. If an entity needs to recover
  493.             these backed up key materials (e.g., as a result of a
  494.             forgotten password or a lost key chain file), a  protocol
  495.             exchange may be needed to support such recovery.
  496.  
  497.       6 Revocation operations: some PKI operations result in the
  498.         creation of new CRL entries and/or new CRLs:
  499.  
  500.         6.1 revocation request:  An authorized person advises a CA of an
  501.             abnormal situation requiring certificate revocation.
  502.  
  503.  
  504.  
  505.  
  506. Adams & Farrell             Standards Track                     [Page 9]
  507.  
  508. RFC 2510          PKI Certificate Management Protocols        March 1999
  509.  
  510.  
  511.       7 PSE operations: whilst the definition of PSE operations (e.g.,
  512.         moving a PSE, changing a PIN, etc.) are beyond the scope of this
  513.         specification, we do define a PKIMessage (CertRepMessage) which
  514.         can form the basis of such operations.
  515.  
  516.    Note that on-line protocols are not the only way of implementing the
  517.    above operations.  For all operations there are off-line methods of
  518.    achieving the same result, and this specification does not mandate
  519.    use of on-line protocols.  For example, when hardware tokens are
  520.    used, many of the operations MAY be achieved as part of the physical
  521.    token delivery.
  522.  
  523.    Later sections define a set of standard messages supporting the above
  524.    operations.  The protocols for conveying these exchanges in different
  525.    environments (file based, on-line, E-mail, and WWW) is also
  526.    specified.
  527.  
  528. 2. Assumptions and restrictions
  529.  
  530. 2.1 End entity initialization
  531.  
  532.    The first step for an end entity in dealing with PKI management
  533.    entities is to request information about the PKI functions supported
  534.    and to securely acquire a copy of the relevant root CA public key(s).
  535.  
  536. 2.2 Initial registration/certification
  537.  
  538.    There are many schemes that can be used to achieve initial
  539.    registration and certification of end entities. No one method is
  540.    suitable for all situations due to the range of policies which a CA
  541.    may implement and the variation in the types of end entity which can
  542.    occur.
  543.  
  544.    We can however, classify the initial registration / certification
  545.    schemes that are supported by this specification. Note that the word
  546.    "initial", above, is crucial - we are dealing with the situation
  547.    where the end entity in question has had no previous contact with the
  548.    PKI. Where the end entity already possesses certified keys then some
  549.    simplifications/alternatives are possible.
  550.  
  551.    Having classified the schemes that are supported by this
  552.    specification we can then specify some as mandatory and some as
  553.    optional. The goal is that the mandatory schemes cover a sufficient
  554.    number of the cases which will arise in real use, whilst the optional
  555.    schemes are available for special cases which arise less frequently.
  556.    In this way we achieve a balance between flexibility and ease of
  557.    implementation.
  558.  
  559.  
  560.  
  561.  
  562. Adams & Farrell             Standards Track                    [Page 10]
  563.  
  564. RFC 2510          PKI Certificate Management Protocols        March 1999
  565.  
  566.  
  567.    We will now describe the classification of initial registration /
  568.    certification schemes.
  569.  
  570. 2.2.1 Criteria used
  571.  
  572. 2.2.1.1 Initiation of registration / certification
  573.  
  574.    In terms of the PKI messages which are produced we can regard the
  575.    initiation of the initial registration / certification exchanges as
  576.    occurring wherever the first PKI message relating to the end entity
  577.    is produced. Note that the real-world initiation of the registration
  578.    / certification procedure may occur elsewhere (e.g., a personnel
  579.    department may telephone an RA operator).
  580.  
  581.    The possible locations are at the end entity, an RA, or a CA.
  582.  
  583. 2.2.1.2 End entity message origin authentication
  584.  
  585.    The on-line messages produced by the end entity that requires a
  586.    certificate may be authenticated or not. The requirement here is to
  587.    authenticate the origin of any messages from the end entity to the
  588.    PKI (CA/RA).
  589.  
  590.    In this specification, such authentication is achieved by the PKI
  591.    (CA/RA) issuing the end entity with a secret value (initial
  592.    authentication key) and reference value (used to identify the
  593.    transaction) via some out-of-band means. The initial authentication
  594.    key can then be used to protect relevant PKI messages.
  595.  
  596.    We can thus classify the initial registration/certification scheme
  597.    according to whether or not the on-line end entity -> PKI messages
  598.    are authenticated or not.
  599.  
  600.    Note 1: We do not discuss the authentication of the PKI -> end entity
  601.    messages here as this is always REQUIRED. In any case, it can be
  602.    achieved simply once the root-CA public key has been installed at the
  603.    end entity's equipment or it can be based on the initial
  604.    authentication key.
  605.  
  606.    Note 2: An initial registration / certification procedure can be
  607.    secure where the messages from the end entity are authenticated via
  608.    some out- of-band means (e.g., a subsequent visit).
  609.  
  610. 2.2.1.3 Location of key generation
  611.  
  612.    In this specification, "key generation" is regarded as occurring
  613.    wherever either the public or private component of a key pair first
  614.    occurs in a PKIMessage. Note that this does not preclude a
  615.  
  616.  
  617.  
  618. Adams & Farrell             Standards Track                    [Page 11]
  619.  
  620. RFC 2510          PKI Certificate Management Protocols        March 1999
  621.  
  622.  
  623.    centralized key generation service - the actual key pair MAY have
  624.    been generated elsewhere and transported to the end entity, RA, or CA
  625.    using a (proprietary or standardized) key generation request/response
  626.    protocol (outside the scope of this specification).
  627.  
  628.    There are thus three possibilities for the location of "key
  629.    generation":  the end entity, an RA, or a CA.
  630.  
  631. 2.2.1.4 Confirmation of successful certification
  632.  
  633.    Following the creation of an initial certificate for an end entity,
  634.    additional assurance can be gained by having the end entity
  635.    explicitly confirm successful receipt of the message containing (or
  636.    indicating the creation of) the certificate. Naturally, this
  637.    confirmation message must be protected (based on the initial
  638.    authentication key or other means).
  639.  
  640.    This gives two further possibilities: confirmed or not.
  641.  
  642. 2.2.2 Mandatory schemes
  643.  
  644.    The criteria above allow for a large number of initial registration /
  645.    certification schemes. This specification mandates that conforming CA
  646.    equipment, RA equipment, and EE equipment MUST support the second
  647.    scheme listed below. Any entity MAY additionally support other
  648.    schemes, if desired.
  649.  
  650. 2.2.2.1 Centralized scheme
  651.  
  652.    In terms of the classification above, this scheme is, in some ways,
  653.    the simplest possible, where:
  654.  
  655.    - initiation occurs at the certifying CA;
  656.    - no on-line message authentication is required;
  657.    - "key generation" occurs at the certifying CA (see Section 2.2.1.3);
  658.    - no confirmation message is required.
  659.  
  660.    In terms of message flow, this scheme means that the only message
  661.    required is sent from the CA to the end entity. The message must
  662.    contain the entire PSE for the end entity. Some out-of-band means
  663.    must be provided to allow the end entity to authenticate the message
  664.    received and decrypt any encrypted values.
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Adams & Farrell             Standards Track                    [Page 12]
  675.  
  676. RFC 2510          PKI Certificate Management Protocols        March 1999
  677.  
  678.  
  679. 2.2.2.2 Basic authenticated scheme
  680.  
  681.    In terms of the classification above, this scheme is where:
  682.  
  683.    - initiation occurs at the end entity;
  684.    - message authentication is REQUIRED;
  685.    - "key generation" occurs at the end entity (see Section 2.2.1.3);
  686.    - a confirmation message is REQUIRED.
  687.  
  688.    In terms of message flow, the basic authenticated scheme is as
  689.    follows:
  690.  
  691.       End entity                                          RA/CA
  692.       ==========                                      =============
  693.            out-of-band distribution of Initial Authentication
  694.            Key (IAK) and reference value (RA/CA -> EE)
  695.       Key generation
  696.       Creation of certification request
  697.       Protect request with IAK
  698.                     -->>--certification request-->>--
  699.                                                      verify request
  700.                                                      process request
  701.                                                      create response
  702.                     --<<--certification response--<<--
  703.       handle response
  704.       create confirmation
  705.                     -->>--confirmation message-->>--
  706.                                                      verify confirmation
  707.  
  708.    (Where verification of the confirmation message fails, the RA/CA MUST
  709.    revoke the newly issued certificate if it has been published or
  710.    otherwise made available.)
  711.  
  712. 2.3 Proof of Possession (POP) of Private Key
  713.  
  714.    In order to prevent certain attacks and to allow a CA/RA to properly
  715.    check the validity of the binding between an end entity and a key
  716.    pair, the PKI management operations specified here make it possible
  717.    for an end entity to prove that it has possession of (i.e., is able
  718.    to use) the private key corresponding to the public key for which a
  719.    certificate is requested.  A given CA/RA is free to choose how to
  720.    enforce POP (e.g., out-of-band procedural means versus PKIX-CMP in-
  721.    band messages) in its certification exchanges (i.e., this may be a
  722.    policy issue).  However, it is REQUIRED that CAs/RAs MUST enforce POP
  723.    by some means because there are currently many non-PKIX operational
  724.    protocols in use (various electronic mail protocols are one example)
  725.    that do not explicitly check the binding between the end entity and
  726.    the private key.  Until operational protocols that do verify the
  727.  
  728.  
  729.  
  730. Adams & Farrell             Standards Track                    [Page 13]
  731.  
  732. RFC 2510          PKI Certificate Management Protocols        March 1999
  733.  
  734.  
  735.    binding (for signature, encryption, and key agreement key pairs)
  736.    exist, and are ubiquitous, this binding can only be assumed to have
  737.    been verified by the CA/RA. Therefore, if the binding is not verified
  738.    by the CA/RA, certificates in the Internet Public-Key Infrastructure
  739.    end up being somewhat less meaningful.
  740.  
  741.    POP is accomplished in different ways depending upon the type of key
  742.    for which a certificate is requested. If a key can be used for
  743.    multiple purposes (e.g., an RSA key) then any appropriate method MAY
  744.    be used (e.g., a key which may be used for signing, as well as other
  745.    purposes, SHOULD NOT be sent to the CA/RA in order to prove
  746.    possession).
  747.  
  748.    This specification explicitly allows for cases where an end entity
  749.    supplies the relevant proof to an RA and the RA subsequently attests
  750.    to the CA that the required proof has been received (and validated!).
  751.    For example, an end entity wishing to have a signing key certified
  752.    could send the appropriate signature to the RA which then simply
  753.    notifies the relevant CA that the end entity has supplied the
  754.    required proof. Of course, such a situation may be disallowed by some
  755.    policies (e.g., CAs may be the only entities permitted to verify POP
  756.    during certification).
  757.  
  758. 2.3.1 Signature Keys
  759.  
  760.    For signature keys, the end entity can sign a value to prove
  761.    possession of the private key.
  762.  
  763. 2.3.2 Encryption Keys
  764.  
  765.    For encryption keys, the end entity can provide the private key to
  766.    the CA/RA, or can be required to decrypt a value in order to prove
  767.    possession of the private key (see Section 3.2.8). Decrypting a value
  768.    can be achieved either directly or indirectly.
  769.  
  770.    The direct method is for the RA/CA to issue a random challenge to
  771.    which an immediate response by the EE is required.
  772.  
  773.    The indirect method is to issue a certificate which is encrypted for
  774.    the end entity (and have the end entity demonstrate its ability to
  775.    decrypt this certificate in the confirmation message). This allows a
  776.    CA to issue a certificate in a form which can only be used by the
  777.    intended end entity.
  778.  
  779.    This specification encourages use of the indirect method because this
  780.    requires no extra messages to be sent (i.e., the proof can be
  781.    demonstrated using the {request, response, confirmation} triple of
  782.    messages).
  783.  
  784.  
  785.  
  786. Adams & Farrell             Standards Track                    [Page 14]
  787.  
  788. RFC 2510          PKI Certificate Management Protocols        March 1999
  789.  
  790.  
  791. 2.3.3 Key Agreement Keys
  792.  
  793.    For key agreement keys, the end entity and the PKI management entity
  794.    (i.e., CA or RA) must establish a shared secret key in order to prove
  795.    that the end entity has possession of the private key.
  796.  
  797.    Note that this need not impose any restrictions on the keys that can
  798.    be certified by a given CA -- in particular, for Diffie-Hellman keys
  799.    the end entity may freely choose its algorithm parameters -- provided
  800.    that the CA can generate a short-term (or one-time) key pair with the
  801.    appropriate parameters when necessary.
  802.  
  803. 2.4 Root CA key update
  804.  
  805.    This discussion only applies to CAs that are a root CA for some end
  806.    entity.
  807.  
  808.    The basis of the procedure described here is that the CA protects its
  809.    new public key using its previous private key and vice versa. Thus
  810.    when a CA updates its key pair it must generate two extra
  811.    cACertificate attribute values if certificates are made available
  812.    using an X.500 directory (for a total of four:  OldWithOld;
  813.    OldWithNew; NewWithOld; and NewWithNew).
  814.  
  815.    When a CA changes its key pair those entities who have acquired the
  816.    old CA public key via "out-of-band" means are most affected. It is
  817.    these end entities who will need access to the new CA public key
  818.    protected with the old CA private key. However, they will only
  819.    require this for a limited period (until they have acquired the new
  820.    CA public key via the "out-of-band" mechanism). This will typically
  821.    be easily achieved when these end entities' certificates expire.
  822.  
  823.    The data structure used to protect the new and old CA public keys is
  824.    a standard certificate (which may also contain extensions). There are
  825.    no new data structures required.
  826.  
  827.    Note 1. This scheme does not make use of any of the X.509 v3
  828.    extensions as it must be able to work even for version 1
  829.    certificates. The presence of the KeyIdentifier extension would make
  830.    for efficiency improvements.
  831.  
  832.    Note 2. While the scheme could be generalized to cover cases where
  833.    the CA updates its key pair more than once during the validity period
  834.    of one of its end entities' certificates, this generalization seems
  835.    of dubious value. Not having this generalization simply means that
  836.    the validity period of a CA key pair must be greater than the
  837.    validity period of any certificate issued by that CA using that key
  838.    pair.
  839.  
  840.  
  841.  
  842. Adams & Farrell             Standards Track                    [Page 15]
  843.  
  844. RFC 2510          PKI Certificate Management Protocols        March 1999
  845.  
  846.  
  847.    Note 3.This scheme forces end entities to acquire the new CA public
  848.    key on the expiry of the last certificate they owned that was signed
  849.    with the old CA private key (via the "out-of-band" means).
  850.    Certificate and/or key update operations occurring at other times do
  851.    not necessarily require this (depending on the end entity's
  852.    equipment).
  853.  
  854. 2.4.1 CA Operator actions
  855.  
  856.    To change the key of the CA, the CA operator does the following:
  857.  
  858.       1. Generate a new key pair;
  859.  
  860.       2. Create a certificate containing the old CA public key signed
  861.          with the new private key (the "old with new" certificate);
  862.  
  863.       3. Create a certificate containing the new CA public key signed
  864.          with the old private key (the "new with old" certificate);
  865.  
  866.       4. Create a certificate containing the new CA public key signed
  867.          with the new private key (the "new with new" certificate);
  868.  
  869.       5. Publish these new certificates via the directory and/or other
  870.          means (perhaps using a CAKeyUpdAnn message);
  871.  
  872.       6. Export the new CA public key so that end entities may acquire
  873.          it using the "out-of-band" mechanism (if required).
  874.  
  875.    The old CA private key is then no longer required. The old CA public
  876.    key will however remain in use for some time. The time when the old
  877.    CA public key is no longer required (other than for non-repudiation)
  878.    will be when all end entities of this CA have securely acquired the
  879.    new CA public key.
  880.  
  881.    The "old with new" certificate must have a validity period starting
  882.    at the generation time of the old key pair and ending at the expiry
  883.    date of the old public key.
  884.  
  885.    The "new with old" certificate must have a validity period starting
  886.    at the generation time of the new key pair and ending at the time by
  887.    which all end entities of this CA will securely possess the new CA
  888.    public key (at the latest, the expiry date of the old public key).
  889.  
  890.    The "new with new" certificate must have a validity period starting
  891.    at the generation time of the new key pair and ending at the time by
  892.    which the CA will next update its key pair.
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Adams & Farrell             Standards Track                    [Page 16]
  899.  
  900. RFC 2510          PKI Certificate Management Protocols        March 1999
  901.  
  902.  
  903. 2.4.2 Verifying Certificates.
  904.  
  905.    Normally when verifying a signature, the verifier verifies (among
  906.    other things) the certificate containing the public key of the
  907.    signer. However, once a CA is allowed to update its key there are a
  908.    range of new possibilities. These are shown in the table below.
  909.  
  910.                Repository contains NEW     Repository contains only OLD
  911.                  and OLD public keys        public key (due to, e.g.,
  912.                                              delay in publication)
  913.  
  914.                   PSE      PSE Contains  PSE Contains    PSE Contains
  915.                Contains     OLD public    NEW public      OLD public
  916.               NEW public       key            key            key
  917.                   key
  918.  
  919.    Signer's   Case 1:      Case 3:       Case 5:        Case 7:
  920.    certifi-   This is      In this case  Although the   In this case
  921.    cate is    the          the verifier  CA operator    the CA
  922.    protected  standard     must access   has not        operator  has
  923.    using NEW  case where   the           updated the    not updated
  924.    public     the          directory in  directory the  the directory
  925.    key        verifier     order to get  verifier can   and so the
  926.               can          the value of  verify the     verification
  927.               directly     the NEW       certificate    will FAIL
  928.               verify the   public key    directly -
  929.               certificate                this is thus
  930.               without                    the same as
  931.               using the                  case 1.
  932.               directory
  933.  
  934.    Signer's   Case 2:      Case 4:       Case 6:        Case 8:
  935.    certifi-   In this      In this case  The verifier   Although the
  936.    cate is    case the     the verifier  thinks this    CA operator
  937.    protected  verifier     can directly  is the         has not
  938.    using OLD  must         verify the    situation of   updated the
  939.    public     access the   certificate   case 2 and     directory the
  940.    key        directory    without       will access    verifier can
  941.               in order     using the     the            verify the
  942.               to get the   directory     directory;     certificate
  943.               value of                   however, the   directly -
  944.               the OLD                    verification   this is thus
  945.               public key                 will FAIL      the same as
  946.                                                         case 4.
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Adams & Farrell             Standards Track                    [Page 17]
  955.  
  956. RFC 2510          PKI Certificate Management Protocols        March 1999
  957.  
  958.  
  959. 2.4.2.1 Verification in cases 1, 4, 5 and 8.
  960.  
  961.    In these cases the verifier has a local copy of the CA public key
  962.    which can be used to verify the certificate directly. This is the
  963.    same as the situation where no key change has occurred.
  964.  
  965.    Note that case 8 may arise between the time when the CA operator has
  966.    generated the new key pair and the time when the CA operator stores
  967.    the updated attributes in the directory. Case 5 can only arise if the
  968.    CA operator has issued both the signer's and verifier's certificates
  969.    during this "gap" (the CA operator SHOULD avoid this as it leads to
  970.    the failure cases described below).
  971.  
  972. 2.4.2.2 Verification in case 2.
  973.  
  974.    In case 2 the verifier must get access to the old public key of the
  975.    CA. The verifier does the following:
  976.  
  977.       1. Look up the caCertificate attribute in the directory and pick
  978.          the OldWithNew certificate (determined based on validity
  979.          periods);
  980.       2. Verify that this is correct using the new CA key (which the
  981.          verifier has locally);
  982.       3. If correct, check the signer's certificate using the old CA
  983.          key.
  984.  
  985.    Case 2 will arise when the CA operator has issued the signer's
  986.    certificate, then changed key and then issued the verifier's
  987.    certificate, so it is quite a typical case.
  988.  
  989. 2.4.2.3 Verification in case 3.
  990.  
  991.    In case 3 the verifier must get access to the new public key of the
  992.    CA. The verifier does the following:
  993.  
  994.       1. Look up the CACertificate attribute in the directory and pick
  995.          the NewWithOld certificate (determined based on validity
  996.          periods);
  997.       2. Verify that this is correct using the old CA key (which the
  998.          verifier has stored locally);
  999.       3. If correct, check the signer's certificate using the new CA
  1000.          key.
  1001.  
  1002.    Case 3 will arise when the CA operator has issued the verifier's
  1003.    certificate, then changed key and then issued the signer's
  1004.    certificate, so it is also quite a typical case.
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Adams & Farrell             Standards Track                    [Page 18]
  1011.  
  1012. RFC 2510          PKI Certificate Management Protocols        March 1999
  1013.  
  1014.  
  1015. 2.4.2.4 Failure of verification in case 6.
  1016.  
  1017.    In this case the CA has issued the verifier's PSE containing the new
  1018.    key without updating the directory attributes. This means that the
  1019.    verifier has no means to get a trustworthy version of the CA's old
  1020.    key and so verification fails.
  1021.  
  1022.    Note that the failure is the CA operator's fault.
  1023.  
  1024. 2.4.2.5 Failure of verification in case 7.
  1025.  
  1026.    In this case the CA has issued the signer's certificate protected
  1027.    with the new key without updating the directory attributes. This
  1028.    means that the verifier has no means to get a trustworthy version of
  1029.    the CA's new key and so verification fails.
  1030.  
  1031.    Note that the failure is again the CA operator's fault.
  1032.  
  1033. 2.4.3 Revocation - Change of CA key
  1034.  
  1035.    As we saw above the verification of a certificate becomes more
  1036.    complex once the CA is allowed to change its key. This is also true
  1037.    for revocation checks as the CA may have signed the CRL using a newer
  1038.    private key than the one that is within the user's PSE.
  1039.  
  1040.    The analysis of the alternatives is as for certificate verification.
  1041.  
  1042. 3. Data Structures
  1043.  
  1044.    This section contains descriptions of the data structures required
  1045.    for PKI management messages. Section 4 describes constraints on their
  1046.    values and the sequence of events for each of the various PKI
  1047.    management operations. Section 5 describes how these may be
  1048.    encapsulated in various transport mechanisms.
  1049.  
  1050. 3.1 Overall PKI Message
  1051.  
  1052.    All of the messages used in this specification for the purposes of
  1053.    PKI management use the following structure:
  1054.  
  1055.      PKIMessage ::= SEQUENCE {
  1056.          header           PKIHeader,
  1057.          body             PKIBody,
  1058.          protection   [0] PKIProtection OPTIONAL,
  1059.          extraCerts   [1] SEQUENCE SIZE (1..MAX) OF Certificate OPTIONAL
  1060.      }
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Adams & Farrell             Standards Track                    [Page 19]
  1067.  
  1068. RFC 2510          PKI Certificate Management Protocols        March 1999
  1069.  
  1070.  
  1071.    The PKIHeader contains information which is common to many PKI
  1072.    messages.
  1073.  
  1074.    The PKIBody contains message-specific information.
  1075.  
  1076.    The PKIProtection, when used, contains bits that protect the PKI
  1077.    message.
  1078.  
  1079.    The extraCerts field can contain certificates that may be useful to
  1080.    the recipient. For example, this can be used by a CA or RA to present
  1081.    an end entity with certificates that it needs to verify its own new
  1082.    certificate (if, for example, the CA that issued the end entity's
  1083.    certificate is not a root CA for the end entity).  Note that this
  1084.    field does not necessarily contain a certification path - the
  1085.    recipient may have to sort, select from, or otherwise process the
  1086.    extra certificates in order to use them.
  1087.  
  1088. 3.1.1 PKI Message Header
  1089.  
  1090.    All PKI messages require some header information for addressing and
  1091.    transaction identification. Some of this information will also be
  1092.    present in a transport-specific envelope; however, if the PKI message
  1093.    is protected then this information is also protected (i.e., we make
  1094.    no assumption about secure transport).
  1095.  
  1096.    The following data structure is used to contain this information:
  1097.  
  1098.      PKIHeader ::= SEQUENCE {
  1099.          pvno                INTEGER     { ietf-version2 (1) },
  1100.          sender              GeneralName,
  1101.          -- identifies the sender
  1102.          recipient           GeneralName,
  1103.          -- identifies the intended recipient
  1104.          messageTime     [0] GeneralizedTime         OPTIONAL,
  1105.          -- time of production of this message (used when sender
  1106.          -- believes that the transport will be "suitable"; i.e.,
  1107.          -- that the time will still be meaningful upon receipt)
  1108.          protectionAlg   [1] AlgorithmIdentifier     OPTIONAL,
  1109.          -- algorithm used for calculation of protection bits
  1110.          senderKID       [2] KeyIdentifier           OPTIONAL,
  1111.          recipKID        [3] KeyIdentifier           OPTIONAL,
  1112.          -- to identify specific keys used for protection
  1113.          transactionID   [4] OCTET STRING            OPTIONAL,
  1114.          -- identifies the transaction; i.e., this will be the same in
  1115.          -- corresponding request, response and confirmation messages
  1116.          senderNonce     [5] OCTET STRING            OPTIONAL,
  1117.          recipNonce      [6] OCTET STRING            OPTIONAL,
  1118.          -- nonces used to provide replay protection, senderNonce
  1119.  
  1120.  
  1121.  
  1122. Adams & Farrell             Standards Track                    [Page 20]
  1123.  
  1124. RFC 2510          PKI Certificate Management Protocols        March 1999
  1125.  
  1126.  
  1127.          -- is inserted by the creator of this message; recipNonce
  1128.          -- is a nonce previously inserted in a related message by
  1129.          -- the intended recipient of this message
  1130.          freeText        [7] PKIFreeText             OPTIONAL,
  1131.          -- this may be used to indicate context-specific instructions
  1132.          -- (this field is intended for human consumption)
  1133.          generalInfo     [8] SEQUENCE SIZE (1..MAX) OF
  1134.                                 InfoTypeAndValue     OPTIONAL
  1135.          -- this may be used to convey context-specific information
  1136.          -- (this field not primarily intended for human consumption)
  1137.      }
  1138.  
  1139.      PKIFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
  1140.          -- text encoded as UTF-8 String (note:  each UTF8String SHOULD
  1141.          -- include an RFC 1766 language tag to indicate the language
  1142.          -- of the contained text)
  1143.  
  1144.    The pvno field is fixed (at one) for this version of this
  1145.    specification.
  1146.  
  1147.    The sender field contains the name of the sender of the PKIMessage.
  1148.    This name (in conjunction with senderKID, if supplied) should be
  1149.    usable to verify the protection on the message.  If nothing about the
  1150.    sender is known to the sending entity (e.g., in the init. req.
  1151.    message, where the end entity may not know its own Distinguished Name
  1152.    (DN), e-mail name, IP address, etc.), then the "sender" field MUST
  1153.    contain a "NULL" value; that is, the SEQUENCE OF relative
  1154.    distinguished names is of zero length. In such a case the senderKID
  1155.    field MUST hold an identifier (i.e., a reference number) which
  1156.    indicates to the receiver the appropriate shared secret information
  1157.    to use to verify the message.
  1158.  
  1159.    The recipient field contains the name of the recipient of the
  1160.    PKIMessage. This name (in conjunction with recipKID, if supplied)
  1161.    should be usable to verify the protection on the message.
  1162.  
  1163.    The protectionAlg field specifies the algorithm used to protect the
  1164.    message. If no protection bits are supplied (note that PKIProtection
  1165.    is OPTIONAL) then this field MUST be omitted; if protection bits are
  1166.    supplied then this field MUST be supplied.
  1167.  
  1168.    senderKID and recipKID are usable to indicate which keys have been
  1169.    used to protect the message (recipKID will normally only be required
  1170.    where protection of the message uses Diffie-Hellman (DH) keys).
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Adams & Farrell             Standards Track                    [Page 21]
  1179.  
  1180. RFC 2510          PKI Certificate Management Protocols        March 1999
  1181.  
  1182.  
  1183.    The transactionID field within the message header MAY be used to
  1184.    allow the recipient of a response message to correlate this with a
  1185.    previously issued request. For example, in the case of an RA there
  1186.    may be many requests "outstanding" at a given moment.
  1187.  
  1188.    The senderNonce and recipNonce fields protect the PKIMessage against
  1189.    replay attacks.
  1190.  
  1191.    The messageTime field contains the time at which the sender created
  1192.    the message. This may be useful to allow end entities to correct
  1193.    their local time to be consistent with the time on a central system.
  1194.  
  1195.    The freeText field may be used to send a human-readable message to
  1196.    the recipient (in any number of languages).  The first language used
  1197.    in this sequence indicates the desired language for replies.
  1198.  
  1199.    The generalInfo field may be used to send machine-processable
  1200.    additional data to the recipient.
  1201.  
  1202. 3.1.2 PKI Message Body
  1203.  
  1204.      PKIBody ::= CHOICE {       -- message-specific body elements
  1205.          ir      [0]  CertReqMessages,        --Initialization Request
  1206.          ip      [1]  CertRepMessage,         --Initialization Response
  1207.          cr      [2]  CertReqMessages,        --Certification Request
  1208.          cp      [3]  CertRepMessage,         --Certification Response
  1209.          p10cr   [4]  CertificationRequest,   --PKCS #10 Cert. Req.
  1210.            -- the PKCS #10 certification request (see [PKCS10])
  1211.          popdecc [5]  POPODecKeyChallContent, --pop Challenge
  1212.          popdecr [6]  POPODecKeyRespContent,  --pop Response
  1213.          kur     [7]  CertReqMessages,        --Key Update Request
  1214.          kup     [8]  CertRepMessage,         --Key Update Response
  1215.          krr     [9]  CertReqMessages,        --Key Recovery Request
  1216.          krp     [10] KeyRecRepContent,       --Key Recovery Response
  1217.          rr      [11] RevReqContent,          --Revocation Request
  1218.          rp      [12] RevRepContent,          --Revocation Response
  1219.          ccr     [13] CertReqMessages,        --Cross-Cert. Request
  1220.          ccp     [14] CertRepMessage,         --Cross-Cert. Response
  1221.          ckuann  [15] CAKeyUpdAnnContent,     --CA Key Update Ann.
  1222.          cann    [16] CertAnnContent,         --Certificate Ann.
  1223.          rann    [17] RevAnnContent,          --Revocation Ann.
  1224.          crlann  [18] CRLAnnContent,          --CRL Announcement
  1225.          conf    [19] PKIConfirmContent,      --Confirmation
  1226.          nested  [20] NestedMessageContent,   --Nested Message
  1227.          genm    [21] GenMsgContent,          --General Message
  1228.          genp    [22] GenRepContent,          --General Response
  1229.          error   [23] ErrorMsgContent         --Error Message
  1230.      }
  1231.  
  1232.  
  1233.  
  1234. Adams & Farrell             Standards Track                    [Page 22]
  1235.  
  1236. RFC 2510          PKI Certificate Management Protocols        March 1999
  1237.  
  1238.  
  1239.    The specific types are described in Section 3.3 below.
  1240.  
  1241. 3.1.3 PKI Message Protection
  1242.  
  1243.    Some PKI messages will be protected for integrity. (Note that if an
  1244.    asymmetric algorithm is used to protect a message and the relevant
  1245.    public component has been certified already, then the origin of
  1246.    message can also be authenticated.  On the other hand, if the public
  1247.    component is uncertified then the message origin cannot be
  1248.    automatically authenticated, but may be authenticated via out-of-band
  1249.    means.)
  1250.  
  1251.    When protection is applied the following structure is used:
  1252.  
  1253.      PKIProtection ::= BIT STRING
  1254.  
  1255.    The input to the calculation of PKIProtection is the DER encoding of
  1256.    the following data structure:
  1257.  
  1258.      ProtectedPart ::= SEQUENCE {
  1259.          header    PKIHeader,
  1260.          body      PKIBody
  1261.      }
  1262.  
  1263.    There MAY be cases in which the PKIProtection BIT STRING is
  1264.    deliberately not used to protect a message (i.e., this OPTIONAL field
  1265.    is omitted) because other protection, external to PKIX, will instead
  1266.    be applied. Such a choice is explicitly allowed in this
  1267.    specification.  Examples of such external protection include PKCS #7
  1268.    [PKCS7] and Security Multiparts [RFC1847] encapsulation of the
  1269.    PKIMessage (or simply the PKIBody (omitting the CHOICE tag), if the
  1270.    relevant PKIHeader information is securely carried in the external
  1271.    mechanism); specification of external protection using PKCS #7 will
  1272.    be provided in a separate document.  It is noted, however, that many
  1273.    such external mechanisms require that the end entity already
  1274.    possesses a public-key certificate, and/or a unique Distinguished
  1275.    Name, and/or other such infrastructure-related information. Thus,
  1276.    they may not be appropriate for initial registration, key-recovery,
  1277.    or any other process with "boot-strapping" characteristics.  For
  1278.    those cases it may be necessary that the PKIProtection parameter be
  1279.    used.  In the future, if/when external mechanisms are modified to
  1280.    accommodate boot-strapping scenarios, the use of PKIProtection may
  1281.    become rare or non-existent.
  1282.  
  1283.    Depending on the circumstances the PKIProtection bits may contain a
  1284.    Message Authentication Code (MAC) or signature. Only the following
  1285.    cases can occur:
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Adams & Farrell             Standards Track                    [Page 23]
  1291.  
  1292. RFC 2510          PKI Certificate Management Protocols        March 1999
  1293.  
  1294.  
  1295.    - shared secret information
  1296.  
  1297.    In this case the sender and recipient share secret information
  1298.    (established via out-of-band means or from a previous PKI management
  1299.    operation).  PKIProtection will contain a MAC value and the
  1300.    protectionAlg will be the following:
  1301.  
  1302.      PasswordBasedMac ::= OBJECT IDENTIFIER --{1 2 840 113533 7 66 13}
  1303.      PBMParameter ::= SEQUENCE {
  1304.          salt                OCTET STRING,
  1305.          owf                 AlgorithmIdentifier,
  1306.          -- AlgId for a One-Way Function (SHA-1 recommended)
  1307.          iterationCount      INTEGER,
  1308.          -- number of times the OWF is applied
  1309.          mac                 AlgorithmIdentifier
  1310.          -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
  1311.      }   -- or HMAC [RFC2104, RFC2202])
  1312.  
  1313.    In the above protectionAlg the salt value is appended to the shared
  1314.    secret input. The OWF is then applied iterationCount times, where the
  1315.    salted secret is the input to the first iteration and, for each
  1316.    successive iteration, the input is set to be the output of the
  1317.    previous iteration. The output of the final iteration (called
  1318.    "BASEKEY" for ease of reference, with a size of "H") is what is used
  1319.    to form the symmetric key. If the MAC algorithm requires a K-bit key
  1320.    and K <= H, then the most significant K bits of BASEKEY are used. If
  1321.    K > H, then all of BASEKEY is used for the most significant H bits of
  1322.    the key, OWF("1" || BASEKEY) is used for the next most significant H
  1323.    bits of the key, OWF("2" || BASEKEY) is used for the next most
  1324.    significant H bits of the key, and so on, until all K bits have been
  1325.    derived. [Here "N" is the ASCII byte encoding the number N and "||"
  1326.    represents concatenation.]
  1327.  
  1328.    - DH key pairs
  1329.  
  1330.    Where the sender and receiver possess Diffie-Hellman certificates
  1331.    with compatible DH parameters, then in order to protect the message
  1332.    the end entity must generate a symmetric key based on its private DH
  1333.    key value and the DH public key of the recipient of the PKI message.
  1334.    PKIProtection will contain a MAC value keyed with this derived
  1335.    symmetric key and the protectionAlg will be the following:
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Adams & Farrell             Standards Track                    [Page 24]
  1347.  
  1348. RFC 2510          PKI Certificate Management Protocols        March 1999
  1349.  
  1350.  
  1351.      DHBasedMac ::= OBJECT IDENTIFIER --{1 2 840 113533 7 66 30}
  1352.  
  1353.      DHBMParameter ::= SEQUENCE {
  1354.          owf                 AlgorithmIdentifier,
  1355.          -- AlgId for a One-Way Function (SHA-1 recommended)
  1356.          mac                 AlgorithmIdentifier
  1357.          -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
  1358.      }   -- or HMAC [RFC2104, RFC2202])
  1359.  
  1360.    In the above protectionAlg OWF is applied to the result of the
  1361.    Diffie-Hellman computation. The OWF output (called "BASEKEY" for ease
  1362.    of reference, with a size of "H") is what is used to form the
  1363.    symmetric key. If the MAC algorithm requires a K-bit key and K <= H,
  1364.    then the most significant K bits of BASEKEY are used. If K > H, then
  1365.    all of BASEKEY is used for the most significant H bits of the key,
  1366.    OWF("1" || BASEKEY) is used for the next most significant H bits of
  1367.    the key, OWF("2" || BASEKEY) is used for the next most significant H
  1368.    bits of the key, and so on, until all K bits have been derived. [Here
  1369.    "N" is the ASCII byte encoding the number N and "||" represents
  1370.    concatenation.]
  1371.  
  1372.    - signature
  1373.  
  1374.    Where the sender possesses a signature key pair it may simply sign
  1375.    the PKI message. PKIProtection will contain the signature value and
  1376.    the protectionAlg will be an AlgorithmIdentifier for a digital
  1377.    signature (e.g., md5WithRSAEncryption or dsaWithSha-1).
  1378.  
  1379.    - multiple protection
  1380.  
  1381.    In cases where an end entity sends a protected PKI message to an RA,
  1382.    the RA MAY forward that message to a CA, attaching its own protection
  1383.    (which MAY be a MAC or a signature, depending on the information and
  1384.    certificates shared between the RA and the CA). This is accomplished
  1385.    by nesting the entire message sent by the end entity within a new PKI
  1386.    message. The structure used is as follows.
  1387.  
  1388.      NestedMessageContent ::= PKIMessage
  1389.  
  1390. 3.2 Common Data Structures
  1391.  
  1392.    Before specifying the specific types that may be placed in a PKIBody
  1393.    we define some data structures that are used in more than one case.
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Adams & Farrell             Standards Track                    [Page 25]
  1403.  
  1404. RFC 2510          PKI Certificate Management Protocols        March 1999
  1405.  
  1406.  
  1407. 3.2.1 Requested Certificate Contents
  1408.  
  1409.    Various PKI management messages require that the originator of the
  1410.    message indicate some of the fields that are required to be present
  1411.    in a certificate. The CertTemplate structure allows an end entity or
  1412.    RA to specify as much as it wishes about the certificate it requires.
  1413.    CertTemplate is identical to a Certificate but with all fields
  1414.    optional.
  1415.  
  1416.    Note that even if the originator completely specifies the contents of
  1417.    a certificate it requires, a CA is free to modify fields within the
  1418.    certificate actually issued.  If the modified certificate is
  1419.    unacceptable to the requester, the Confirmation message may be
  1420.    withheld, or an Error Message may be sent (with a PKIStatus of
  1421.    "rejection").
  1422.  
  1423.    See [CRMF] for CertTemplate syntax.
  1424.  
  1425. 3.2.2 Encrypted Values
  1426.  
  1427.    Where encrypted values (restricted, in this specification, to be
  1428.    either private keys or certificates) are sent in PKI messages the
  1429.    EncryptedValue data structure is used.
  1430.  
  1431.    See [CRMF] for EncryptedValue syntax.
  1432.  
  1433.    Use of this data structure requires that the creator and intended
  1434.    recipient respectively be able to encrypt and decrypt. Typically,
  1435.    this will mean that the sender and recipient have, or are able to
  1436.    generate, a shared secret key.
  1437.  
  1438.    If the recipient of the PKIMessage already possesses a private key
  1439.    usable for decryption, then the encSymmKey field MAY contain a
  1440.    session key encrypted using the recipient's public key.
  1441.  
  1442. 3.2.3 Status codes and Failure Information for PKI messages
  1443.  
  1444.    All response messages will include some status information. The
  1445.    following values are defined.
  1446.  
  1447.      PKIStatus ::= INTEGER {
  1448.          granted                (0),
  1449.          -- you got exactly what you asked for
  1450.          grantedWithMods        (1),
  1451.          -- you got something like what you asked for; the
  1452.          -- requester is responsible for ascertaining the differences
  1453.          rejection              (2),
  1454.          -- you don't get it, more information elsewhere in the message
  1455.  
  1456.  
  1457.  
  1458. Adams & Farrell             Standards Track                    [Page 26]
  1459.  
  1460. RFC 2510          PKI Certificate Management Protocols        March 1999
  1461.  
  1462.  
  1463.          waiting                (3),
  1464.          -- the request body part has not yet been processed,
  1465.          -- expect to hear more later
  1466.          revocationWarning      (4),
  1467.          -- this message contains a warning that a revocation is
  1468.          -- imminent
  1469.          revocationNotification (5),
  1470.          -- notification that a revocation has occurred
  1471.          keyUpdateWarning       (6)
  1472.          -- update already done for the oldCertId specified in
  1473.          -- the key update request message
  1474.      }
  1475.  
  1476.    Responders may use the following syntax to provide more information
  1477.    about failure cases.
  1478.  
  1479.      PKIFailureInfo ::= BIT STRING {
  1480.      -- since we can fail in more than one way!
  1481.      -- More codes may be added in the future if/when required.
  1482.          badAlg           (0),
  1483.          -- unrecognized or unsupported Algorithm Identifier
  1484.          badMessageCheck  (1),
  1485.          -- integrity check failed (e.g., signature did not verify)
  1486.          badRequest       (2),
  1487.          -- transaction not permitted or supported
  1488.          badTime          (3),
  1489.          -- messageTime was not sufficiently close to the system time,
  1490.          -- as defined by local policy
  1491.          badCertId        (4),
  1492.          -- no certificate could be found matching the provided criteria
  1493.          badDataFormat    (5),
  1494.          -- the data submitted has the wrong format
  1495.          wrongAuthority   (6),
  1496.          -- the authority indicated in the request is different from the
  1497.          -- one creating the response token
  1498.          incorrectData    (7),
  1499.          -- the requester's data is incorrect (used for notary services)
  1500.          missingTimeStamp (8),
  1501.          -- when the timestamp is missing but should be there (by policy)
  1502.          badPOP           (9)
  1503.          -- the proof-of-possession failed
  1504.      }
  1505.      PKIStatusInfo ::= SEQUENCE {
  1506.          status        PKIStatus,
  1507.          statusString  PKIFreeText     OPTIONAL,
  1508.          failInfo      PKIFailureInfo  OPTIONAL
  1509.      }
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Adams & Farrell             Standards Track                    [Page 27]
  1515.  
  1516. RFC 2510          PKI Certificate Management Protocols        March 1999
  1517.  
  1518.  
  1519. 3.2.4 Certificate Identification
  1520.  
  1521.    In order to identify particular certificates the CertId data
  1522.    structure is used.
  1523.  
  1524.    See [CRMF] for CertId syntax.
  1525.  
  1526. 3.2.5 "Out-of-band" root CA public key
  1527.  
  1528.    Each root CA must be able to publish its current public key via some
  1529.    "out-of-band" means. While such mechanisms are beyond the scope of
  1530.    this document, we define data structures which can support such
  1531.    mechanisms.
  1532.  
  1533.    There are generally two methods available: either the CA directly
  1534.    publishes its self-signed certificate; or this information is
  1535.    available via the Directory (or equivalent) and the CA publishes a
  1536.    hash of this value to allow verification of its integrity before use.
  1537.  
  1538.      OOBCert ::= Certificate
  1539.  
  1540.    The fields within this certificate are restricted as follows:
  1541.  
  1542.    - The certificate MUST be self-signed  (i.e., the signature must be
  1543.      verifiable using the SubjectPublicKeyInfo field);
  1544.    - The subject and issuer fields MUST be identical;
  1545.    - If the subject field is NULL then both subjectAltNames and
  1546.      issuerAltNames extensions MUST be present and have exactly the same
  1547.      value;
  1548.    - The values of all other extensions must be suitable for a self-
  1549.      signed certificate (e.g., key identifiers for subject and issuer
  1550.      must be the same).
  1551.  
  1552.      OOBCertHash ::= SEQUENCE {
  1553.          hashAlg     [0] AlgorithmIdentifier     OPTIONAL,
  1554.          certId      [1] CertId                  OPTIONAL,
  1555.          hashVal         BIT STRING
  1556.          -- hashVal is calculated over the self-signed
  1557.          -- certificate with the identifier certID.
  1558.      }
  1559.  
  1560.    The intention of the hash value is that anyone who has securely
  1561.    received the hash value (via the out-of-band means) can verify a
  1562.    self- signed certificate for that CA.
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Adams & Farrell             Standards Track                    [Page 28]
  1571.  
  1572. RFC 2510          PKI Certificate Management Protocols        March 1999
  1573.  
  1574.  
  1575. 3.2.6 Archive Options
  1576.  
  1577.    Requesters may indicate that they wish the PKI to archive a private
  1578.    key value using the PKIArchiveOptions structure
  1579.  
  1580.    See [CRMF] for PKIArchiveOptions syntax.
  1581.  
  1582. 3.2.7 Publication Information
  1583.  
  1584.    Requesters may indicate that they wish the PKI to publish a
  1585.    certificate using the PKIPublicationInfo structure.
  1586.  
  1587.    See [CRMF] for PKIPublicationInfo syntax.
  1588.  
  1589. 3.2.8  Proof-of-Possession Structures
  1590.  
  1591.    If the certification request is for a signing key pair (i.e., a
  1592.    request for a verification certificate), then the proof of possession
  1593.    of the private signing key is demonstrated through use of the
  1594.    POPOSigningKey structure.
  1595.  
  1596.    See [CRMF] for POPOSigningKey syntax, but note that
  1597.    POPOSigningKeyInput has the following semantic stipulations in this
  1598.    specification.
  1599.  
  1600.      POPOSigningKeyInput ::= SEQUENCE {
  1601.          authInfo            CHOICE {
  1602.              sender              [0] GeneralName,
  1603.              -- from PKIHeader (used only if an authenticated identity
  1604.              -- has been established for the sender (e.g., a DN from a
  1605.              -- previously-issued and currently-valid certificate))
  1606.              publicKeyMAC        [1] PKMACValue
  1607.              -- used if no authenticated GeneralName currently exists for
  1608.              -- the sender; publicKeyMAC contains a password-based MAC
  1609.              -- (using the protectionAlg AlgId from PKIHeader) on the
  1610.              -- DER-encoded value of publicKey
  1611.          },
  1612.          publicKey           SubjectPublicKeyInfo    -- from CertTemplate
  1613.      }
  1614.  
  1615.    On the other hand, if the certification request is for an encryption
  1616.    key pair (i.e., a request for an encryption certificate), then the
  1617.    proof of possession of the private decryption key may be demonstrated
  1618.    in one of three ways.
  1619.  
  1620.       1) By the inclusion of the private key (encrypted) in the
  1621.          CertRequest (in the PKIArchiveOptions control structure).
  1622.  
  1623.  
  1624.  
  1625.  
  1626. Adams & Farrell             Standards Track                    [Page 29]
  1627.  
  1628. RFC 2510          PKI Certificate Management Protocols        March 1999
  1629.  
  1630.  
  1631.       2) By having the CA return not the certificate, but an encrypted
  1632.          certificate (i.e., the certificate encrypted under a randomly-
  1633.          generated symmetric key, and the symmetric key encrypted under
  1634.          the public key for which the certification request is being
  1635.          made) -- this is the "indirect" method mentioned previously in
  1636.          Section 2.3.2.  The end entity proves knowledge of the private
  1637.          decryption key to the CA by MACing the PKIConfirm message using
  1638.          a key derived from this symmetric key.  [Note that if more than
  1639.          one CertReqMsg is included in the PKIMessage, then the CA uses
  1640.          a different symmetric key for each CertReqMsg and the MAC uses
  1641.          a key derived from the concatenation of all these keys.]  The
  1642.          MACing procedure uses the PasswordBasedMac AlgId defined in
  1643.          Section 3.1.
  1644.  
  1645.       3) By having the end entity engage in a challenge-response
  1646.          protocol (using the messages POPODecKeyChall and
  1647.          POPODecKeyResp; see below) between CertReqMessages and
  1648.          CertRepMessage -- this is the "direct" method mentioned
  1649.          previously in Section 2.3.2.  [This method would typically be
  1650.          used in an environment in which an RA verifies POP and then
  1651.          makes a certification request to the CA on behalf of the end
  1652.          entity.  In such a scenario, the CA trusts the RA to have done
  1653.          POP correctly before the RA requests a certificate for the end
  1654.          entity.]  The complete protocol then looks as follows (note
  1655.          that req' does not necessarily encapsulate req as a nested
  1656.          message):
  1657.  
  1658.                         EE            RA            CA
  1659.                          ---- req ---->
  1660.                          <--- chall ---
  1661.                          ---- resp --->
  1662.                                        ---- req' --->
  1663.                                        <--- rep -----
  1664.                                        ---- conf --->
  1665.                          <--- rep -----
  1666.                          ---- conf --->
  1667.  
  1668.    This protocol is obviously much longer than the 3-way exchange given
  1669.    in choice (2) above, but allows a local Registration Authority to be
  1670.    involved and has the property that the certificate itself is not
  1671.    actually created until the proof of possession is complete.
  1672.  
  1673.    If the cert. request is for a key agreement key (KAK) pair, then the
  1674.    POP can use any of the 3 ways described above for enc. key pairs,
  1675.    with the following changes:  (1) the parenthetical text of bullet 2)
  1676.    is replaced with "(i.e., the certificate encrypted under the
  1677.    symmetric key derived from the CA's private KAK and the public key
  1678.    for which the certification request is being made)"; (2) the first
  1679.  
  1680.  
  1681.  
  1682. Adams & Farrell             Standards Track                    [Page 30]
  1683.  
  1684. RFC 2510          PKI Certificate Management Protocols        March 1999
  1685.  
  1686.  
  1687.    parenthetical text of the challenge field of "Challenge" below is
  1688.    replaced with "(using PreferredSymmAlg (see Appendix B6) and a
  1689.    symmetric key derived from the CA's private KAK and the public key
  1690.    for which the certification request is being made)".  Alternatively,
  1691.    the POP can use the POPOSigningKey structure given in [CRMF] (where
  1692.    the alg field is DHBasedMAC and the signature field is the MAC) as a
  1693.    fourth alternative for demonstrating POP if the CA already has a D-H
  1694.    certificate that is known to the EE.
  1695.  
  1696.    The challenge-response messages for proof of possession of a private
  1697.    decryption key are specified as follows (see [MvOV97, p.404] for
  1698.    details).  Note that this challenge-response exchange is associated
  1699.    with the preceding cert. request message (and subsequent cert.
  1700.    response and confirmation messages) by the nonces used in the
  1701.    PKIHeader and by the protection (MACing or signing) applied to the
  1702.    PKIMessage.
  1703.  
  1704.      POPODecKeyChallContent ::= SEQUENCE OF Challenge
  1705.      -- One Challenge per encryption key certification request (in the
  1706.      -- same order as these requests appear in CertReqMessages).
  1707.  
  1708.      Challenge ::= SEQUENCE {
  1709.          owf                 AlgorithmIdentifier  OPTIONAL,
  1710.          -- MUST be present in the first Challenge; MAY be omitted in any
  1711.          -- subsequent Challenge in POPODecKeyChallContent (if omitted,
  1712.          -- then the owf used in the immediately preceding Challenge is
  1713.          -- to be used).
  1714.          witness             OCTET STRING,
  1715.          -- the result of applying the one-way function (owf) to a
  1716.          -- randomly-generated INTEGER, A.  [Note that a different
  1717.          -- INTEGER MUST be used for each Challenge.]
  1718.          challenge           OCTET STRING
  1719.          -- the encryption (under the public key for which the cert.
  1720.          -- request is being made) of Rand, where Rand is specified as
  1721.          --   Rand ::= SEQUENCE {
  1722.          --      int      INTEGER,
  1723.          --       - the randomly-generated INTEGER A (above)
  1724.          --      sender   GeneralName
  1725.          --       - the sender's name (as included in PKIHeader)
  1726.          --   }
  1727.      }
  1728.  
  1729.      POPODecKeyRespContent ::= SEQUENCE OF INTEGER
  1730.      -- One INTEGER per encryption key certification request (in the
  1731.      -- same order as these requests appear in CertReqMessages).  The
  1732.      -- retrieved INTEGER A (above) is returned to the sender of the
  1733.      -- corresponding Challenge.
  1734.  
  1735.  
  1736.  
  1737.  
  1738. Adams & Farrell             Standards Track                    [Page 31]
  1739.  
  1740. RFC 2510          PKI Certificate Management Protocols        March 1999
  1741.  
  1742.  
  1743. 3.3 Operation-Specific Data Structures
  1744.  
  1745. 3.3.1 Initialization Request
  1746.  
  1747.    An Initialization request message contains as the PKIBody an
  1748.    CertReqMessages data structure which specifies the requested
  1749.    certificate(s).  Typically, SubjectPublicKeyInfo, KeyId, and Validity
  1750.    are the template fields which may be supplied for each certificate
  1751.    requested (see Appendix B profiles for further information).  This
  1752.    message is intended to be used for entities first initializing into
  1753.    the PKI.
  1754.  
  1755.    See [CRMF] for CertReqMessages syntax.
  1756.  
  1757. 3.3.2 Initialization Response
  1758.  
  1759.    An Initialization response message contains as the PKIBody an
  1760.    CertRepMessage data structure which has for each certificate
  1761.    requested a PKIStatusInfo field, a subject certificate, and possibly
  1762.    a private key (normally encrypted with a session key, which is itself
  1763.    encrypted with the protocolEncKey).
  1764.  
  1765.    See Section 3.3.4 for CertRepMessage syntax.  Note that if the PKI
  1766.    Message Protection is "shared secret information" (see Section
  1767.    3.1.3), then any certificate transported in the caPubs field may be
  1768.    directly trusted as a root CA certificate by the initiator.
  1769.  
  1770. 3.3.3 Registration/Certification Request
  1771.  
  1772.    A Registration/Certification request message contains as the PKIBody
  1773.    a CertReqMessages data structure which specifies the requested
  1774.    certificates.  This message is intended to be used for existing PKI
  1775.    entities who wish to obtain additional certificates.
  1776.  
  1777.    See [CRMF] for CertReqMessages syntax.
  1778.  
  1779.    Alternatively, the PKIBody MAY be a CertificationRequest (this
  1780.    structure is fully specified by the ASN.1 structure
  1781.    CertificationRequest given in [PKCS10]).  This structure may be
  1782.    required for certificate requests for signing key pairs when
  1783.    interoperation with legacy systems is desired, but its use is
  1784.    strongly discouraged whenever not absolutely necessary.
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794. Adams & Farrell             Standards Track                    [Page 32]
  1795.  
  1796. RFC 2510          PKI Certificate Management Protocols        March 1999
  1797.  
  1798.  
  1799. 3.3.4 Registration/Certification Response
  1800.  
  1801.    A registration response message contains as the PKIBody a
  1802.    CertRepMessage data structure which has a status value for each
  1803.    certificate requested, and optionally has a CA public key, failure
  1804.    information, a subject certificate, and an encrypted private key.
  1805.  
  1806.   CertRepMessage ::= SEQUENCE {
  1807.       caPubs          [1] SEQUENCE SIZE (1..MAX) OF Certificate OPTIONAL,
  1808.       response            SEQUENCE OF CertResponse
  1809.   }
  1810.  
  1811.   CertResponse ::= SEQUENCE {
  1812.       certReqId           INTEGER,
  1813.       -- to match this response with corresponding request (a value
  1814.       -- of -1 is to be used if certReqId is not specified in the
  1815.       -- corresponding request)
  1816.       status              PKIStatusInfo,
  1817.       certifiedKeyPair    CertifiedKeyPair    OPTIONAL,
  1818.       rspInfo             OCTET STRING        OPTIONAL
  1819.       -- analogous to the id-regInfo-asciiPairs OCTET STRING defined
  1820.       -- for regInfo in CertReqMsg [CRMF]
  1821.   }
  1822.  
  1823.   CertifiedKeyPair ::= SEQUENCE {
  1824.       certOrEncCert       CertOrEncCert,
  1825.       privateKey      [0] EncryptedValue      OPTIONAL,
  1826.       publicationInfo [1] PKIPublicationInfo  OPTIONAL
  1827.   }
  1828.  
  1829.   CertOrEncCert ::= CHOICE {
  1830.       certificate     [0] Certificate,
  1831.       encryptedCert   [1] EncryptedValue
  1832.   }
  1833.  
  1834.    Only one of the failInfo (in PKIStatusInfo) and certificate (in
  1835.    CertifiedKeyPair) fields can be present in each CertResponse
  1836.    (depending on the status). For some status values (e.g., waiting)
  1837.    neither of the optional fields will be present.
  1838.  
  1839.    Given an EncryptedCert and the relevant decryption key the
  1840.    certificate may be obtained. The purpose of this is to allow a CA to
  1841.    return the value of a certificate, but with the constraint that only
  1842.    the intended recipient can obtain the actual certificate. The benefit
  1843.    of this approach is that a CA may reply with a certificate even in
  1844.    the absence of a proof that the requester is the end entity which can
  1845.    use the relevant private key (note that the proof is not obtained
  1846.  
  1847.  
  1848.  
  1849.  
  1850. Adams & Farrell             Standards Track                    [Page 33]
  1851.  
  1852. RFC 2510          PKI Certificate Management Protocols        March 1999
  1853.  
  1854.  
  1855.    until the PKIConfirm message is received by the CA). Thus the CA will
  1856.    not have to revoke that certificate in the event that something goes
  1857.    wrong with the proof of possession.
  1858.  
  1859. 3.3.5 Key update request content
  1860.  
  1861.    For key update requests the CertReqMessages syntax is used.
  1862.    Typically, SubjectPublicKeyInfo, KeyId, and Validity are the template
  1863.    fields which may be supplied for each key to be updated.  This
  1864.    message is intended to be used to request updates to existing (non-
  1865.    revoked and non-expired) certificates.
  1866.  
  1867.    See [CRMF] for CertReqMessages syntax.
  1868.  
  1869. 3.3.6 Key Update response content
  1870.  
  1871.    For key update responses the CertRepMessage syntax is used.  The
  1872.    response is identical to the initialization response.
  1873.  
  1874.    See Section 3.3.4 for CertRepMessage syntax.
  1875.  
  1876. 3.3.7 Key Recovery Request content
  1877.  
  1878.    For key recovery requests the syntax used is identical to the
  1879.    initialization request CertReqMessages.  Typically,
  1880.    SubjectPublicKeyInfo and KeyId are the template fields which may be
  1881.    used to supply a signature public key for which a certificate is
  1882.    required (see Appendix B profiles for further information).
  1883.  
  1884.    See [CRMF] for CertReqMessages syntax.  Note that if a key history is
  1885.    required, the requester must supply a Protocol Encryption Key control
  1886.    in the request message.
  1887.  
  1888. 3.3.8 Key recovery response content
  1889.  
  1890.    For key recovery responses the following syntax is used.  For some
  1891.    status values (e.g., waiting) none of the optional fields will be
  1892.    present.
  1893.  
  1894.      KeyRecRepContent ::= SEQUENCE {
  1895.          status          PKIStatusInfo,
  1896.          newSigCert  [0] Certificate                   OPTIONAL,
  1897.          caCerts     [1] SEQUENCE SIZE (1..MAX) OF
  1898.                                       Certificate      OPTIONAL,
  1899.          keyPairHist [2] SEQUENCE SIZE (1..MAX) OF
  1900.                                       CertifiedKeyPair OPTIONAL
  1901.      }
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Adams & Farrell             Standards Track                    [Page 34]
  1907.  
  1908. RFC 2510          PKI Certificate Management Protocols        March 1999
  1909.  
  1910.  
  1911. 3.3.9 Revocation Request Content
  1912.  
  1913.    When requesting revocation of a certificate (or several certificates)
  1914.    the following data structure is used. The name of the requester is
  1915.    present in the PKIHeader structure.
  1916.  
  1917.      RevReqContent ::= SEQUENCE OF RevDetails
  1918.  
  1919.      RevDetails ::= SEQUENCE {
  1920.          certDetails         CertTemplate,
  1921.          -- allows requester to specify as much as they can about
  1922.          -- the cert. for which revocation is requested
  1923.          -- (e.g., for cases in which serialNumber is not available)
  1924.          revocationReason    ReasonFlags      OPTIONAL,
  1925.          -- the reason that revocation is requested
  1926.          badSinceDate        GeneralizedTime  OPTIONAL,
  1927.          -- indicates best knowledge of sender
  1928.          crlEntryDetails     Extensions       OPTIONAL
  1929.          -- requested crlEntryExtensions
  1930.      }
  1931.  
  1932. 3.3.10 Revocation Response Content
  1933.  
  1934.    The response to the above message. If produced, this is sent to the
  1935.    requester of the revocation. (A separate revocation announcement
  1936.    message MAY be sent to the subject of the certificate for which
  1937.    revocation was requested.)
  1938.  
  1939.   RevRepContent ::= SEQUENCE {
  1940.       status        SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
  1941.       -- in same order as was sent in RevReqContent
  1942.       revCerts  [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
  1943.       -- IDs for which revocation was requested (same order as status)
  1944.       crls      [1] SEQUENCE SIZE (1..MAX) OF CertificateList  OPTIONAL
  1945.       -- the resulting CRLs (there may be more than one)
  1946.   }
  1947.  
  1948. 3.3.11 Cross certification request content
  1949.  
  1950.    Cross certification requests use the same syntax (CertReqMessages) as
  1951.    for normal certification requests with the restriction that the key
  1952.    pair MUST have been generated by the requesting CA and the private
  1953.    key MUST NOT be sent to the responding CA.
  1954.  
  1955.    See [CRMF] for CertReqMessages syntax.
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Adams & Farrell             Standards Track                    [Page 35]
  1963.  
  1964. RFC 2510          PKI Certificate Management Protocols        March 1999
  1965.  
  1966.  
  1967. 3.3.12 Cross certification response content
  1968.  
  1969.    Cross certification responses use the same syntax (CertRepMessage) as
  1970.    for normal certification responses with the restriction that no
  1971.    encrypted private key can be sent.
  1972.  
  1973.    See Section 3.3.4 for CertRepMessage syntax.
  1974.  
  1975. 3.3.13 CA Key Update Announcement content
  1976.  
  1977.    When a CA updates its own key pair the following data structure MAY
  1978.    be used to announce this event.
  1979.  
  1980.   CAKeyUpdAnnContent ::= SEQUENCE {
  1981.       oldWithNew          Certificate, -- old pub signed with new priv
  1982.       newWithOld          Certificate, -- new pub signed with old priv
  1983.       newWithNew          Certificate  -- new pub signed with new priv
  1984.   }
  1985.  
  1986. 3.3.14 Certificate Announcement
  1987.  
  1988.    This structure MAY be used to announce the existence of certificates.
  1989.  
  1990.    Note that this message is intended to be used for those cases (if
  1991.    any) where there is no pre-existing method for publication of
  1992.    certificates; it is not intended to be used where, for example, X.500
  1993.    is the method for publication of certificates.
  1994.  
  1995.      CertAnnContent ::= Certificate
  1996.  
  1997. 3.3.15 Revocation Announcement
  1998.  
  1999.    When a CA has revoked, or is about to revoke, a particular
  2000.    certificate it MAY issue an announcement of this (possibly upcoming)
  2001.    event.
  2002.  
  2003.      RevAnnContent ::= SEQUENCE {
  2004.          status              PKIStatus,
  2005.          certId              CertId,
  2006.          willBeRevokedAt     GeneralizedTime,
  2007.          badSinceDate        GeneralizedTime,
  2008.          crlDetails          Extensions  OPTIONAL
  2009.          -- extra CRL details(e.g., crl number, reason, location, etc.)
  2010.      }
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018. Adams & Farrell             Standards Track                    [Page 36]
  2019.  
  2020. RFC 2510          PKI Certificate Management Protocols        March 1999
  2021.  
  2022.  
  2023.    A CA MAY use such an announcement to warn (or notify) a subject that
  2024.    its certificate is about to be (or has been) revoked. This would
  2025.    typically be used where the request for revocation did not come from
  2026.    the subject concerned.
  2027.  
  2028.    The willBeRevokedAt field contains the time at which a new entry will
  2029.    be added to the relevant CRLs.
  2030.  
  2031. 3.3.16 CRL Announcement
  2032.  
  2033.    When a CA issues a new CRL (or set of CRLs) the following data
  2034.    structure MAY be used to announce this event.
  2035.  
  2036.      CRLAnnContent ::= SEQUENCE OF CertificateList
  2037.  
  2038. 3.3.17 PKI Confirmation content
  2039.  
  2040.    This data structure is used in three-way protocols as the final
  2041.    PKIMessage. Its content is the same in all cases - actually there is
  2042.    no content since the PKIHeader carries all the required information.
  2043.  
  2044.      PKIConfirmContent ::= NULL
  2045.  
  2046. 3.3.18 PKI General Message content
  2047.  
  2048.   InfoTypeAndValue ::= SEQUENCE {
  2049.       infoType               OBJECT IDENTIFIER,
  2050.       infoValue              ANY DEFINED BY infoType  OPTIONAL
  2051.   }
  2052.   -- Example InfoTypeAndValue contents include, but are not limited to:
  2053.   --  { CAProtEncCert    = {id-it 1}, Certificate                     }
  2054.   --  { SignKeyPairTypes = {id-it 2}, SEQUENCE OF AlgorithmIdentifier }
  2055.   --  { EncKeyPairTypes  = {id-it 3}, SEQUENCE OF AlgorithmIdentifier }
  2056.   --  { PreferredSymmAlg = {id-it 4}, AlgorithmIdentifier             }
  2057.   --  { CAKeyUpdateInfo  = {id-it 5}, CAKeyUpdAnnContent              }
  2058.   --  { CurrentCRL       = {id-it 6}, CertificateList                 }
  2059.   -- where {id-it} = {id-pkix 4} = {1 3 6 1 5 5 7 4}
  2060.   -- This construct MAY also be used to define new PKIX Certificate
  2061.   -- Management Protocol request and response messages, or general-
  2062.   -- purpose (e.g., announcement) messages for future needs or for
  2063.   -- specific environments.
  2064.  
  2065.   GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
  2066.   -- May be sent by EE, RA, or CA (depending on message content).
  2067.   -- The OPTIONAL infoValue parameter of InfoTypeAndValue will typically
  2068.   -- be omitted for some of the examples given above.  The receiver is
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074. Adams & Farrell             Standards Track                    [Page 37]
  2075.  
  2076. RFC 2510          PKI Certificate Management Protocols        March 1999
  2077.  
  2078.  
  2079.   -- free to ignore any contained OBJ. IDs that it does not recognize.
  2080.   -- If sent from EE to CA, the empty set indicates that the CA may send
  2081.   -- any/all information that it wishes.
  2082.  
  2083. 3.3.19 PKI General Response content
  2084.  
  2085.   GenRepContent ::= SEQUENCE OF InfoTypeAndValue
  2086.   -- The receiver is free to ignore any contained OBJ. IDs that it does
  2087.   -- not recognize.
  2088.  
  2089. 3.3.20 Error Message content
  2090.  
  2091.      ErrorMsgContent ::= SEQUENCE {
  2092.          pKIStatusInfo          PKIStatusInfo,
  2093.          errorCode              INTEGER           OPTIONAL,
  2094.          -- implementation-specific error codes
  2095.          errorDetails           PKIFreeText       OPTIONAL
  2096.          -- implementation-specific error details
  2097.      }
  2098.  
  2099. 4. Mandatory PKI Management functions
  2100.  
  2101.    The PKI management functions outlined in Section 1 above are
  2102.    described in this section.
  2103.  
  2104.    This section deals with functions that are "mandatory" in the sense
  2105.    that all end entity and CA/RA implementations MUST be able to provide
  2106.    the functionality described (perhaps via one of the transport
  2107.    mechanisms defined in Section 5). This part is effectively the
  2108.    profile of the PKI management functionality that MUST be supported.
  2109.  
  2110.    Note that not all PKI management functions result in the creation of
  2111.    a PKI message.
  2112.  
  2113. 4.1 Root CA initialization
  2114.  
  2115.    [See Section 1.2.2 for this document's definition of "root CA".]
  2116.  
  2117.    A newly created root CA must produce a "self-certificate" which is a
  2118.    Certificate structure with the profile defined for the "newWithNew"
  2119.    certificate issued following a root CA key update.
  2120.  
  2121.    In  order to make the CA's self certificate useful to end entities
  2122.    that do not acquire the self certificate via "out-of-band" means, the
  2123.    CA must also produce a fingerprint for its public key.  End entities
  2124.    that acquire this fingerprint securely via some "out-of-band" means
  2125.    can then verify the CA's self-certificate and hence the other
  2126.    attributes contained therein.
  2127.  
  2128.  
  2129.  
  2130. Adams & Farrell             Standards Track                    [Page 38]
  2131.  
  2132. RFC 2510          PKI Certificate Management Protocols        March 1999
  2133.  
  2134.  
  2135.    The data structure used to carry the fingerprint is the OOBCertHash.
  2136.  
  2137. 4.2 Root CA key update
  2138.  
  2139.    CA keys (as all other keys) have a finite lifetime and will have to
  2140.    be updated on a periodic basis.  The certificates NewWithNew,
  2141.    NewWithOld, and OldWithNew (see Section 2.4.1) are issued by the CA
  2142.    to aid existing end entities who hold the current self-signed CA
  2143.    certificate (OldWithOld) to transition securely to the new self-
  2144.    signed CA certificate (NewWithNew), and to aid new end entities who
  2145.    will hold NewWithNew to acquire OldWithOld securely for verification
  2146.    of existing data.
  2147.  
  2148. 4.3 Subordinate CA initialization
  2149.  
  2150.    [See Section 1.2.2 for this document's definition of "subordinate
  2151.    CA".]
  2152.  
  2153.    From the perspective of PKI management protocols the initialization
  2154.    of a subordinate CA is the same as the initialization of an end
  2155.    entity. The only difference is that the subordinate CA must also
  2156.    produce an initial revocation list.
  2157.  
  2158. 4.4 CRL production
  2159.  
  2160.    Before issuing any certificates a newly established CA (which issues
  2161.    CRLs) must produce "empty" versions of each CRL which is to be
  2162.    periodically produced.
  2163.  
  2164. 4.5 PKI information request
  2165.  
  2166.    When a PKI entity (CA, RA, or EE) wishes to acquire information about
  2167.    the current status of a CA it MAY send that CA a request for such
  2168.    information.
  2169.  
  2170.    The CA must respond to the request by providing (at least) all of the
  2171.    information requested by the requester.  If some of the information
  2172.    cannot be provided then an error must be conveyed to the requester.
  2173.  
  2174.    If PKIMessages are used to request and supply this PKI information,
  2175.    then the request must be the GenMsg message, the response must be the
  2176.    GenRep message, and the error must be the Error message.  These
  2177.    messages are protected using a MAC based on shared secret information
  2178.    (i.e., PasswordBasedMAC) or any other authenticated means (if the end
  2179.    entity has an existing certificate).
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186. Adams & Farrell             Standards Track                    [Page 39]
  2187.  
  2188. RFC 2510          PKI Certificate Management Protocols        March 1999
  2189.  
  2190.  
  2191. 4.6 Cross certification
  2192.  
  2193.    The requester CA is the CA that will become the subject of the
  2194.    cross-certificate; the responder CA will become the issuer of the
  2195.    cross-certificate.
  2196.  
  2197.    The requester CA must be "up and running" before initiating the
  2198.    cross-certification operation.
  2199.  
  2200. 4.6.1 One-way request-response scheme:
  2201.  
  2202.    The cross-certification scheme is essentially a one way operation;
  2203.    that is, when successful, this operation results in the creation of
  2204.    one new cross-certificate. If the requirement is that cross-
  2205.    certificates be created in "both directions" then each CA in turn
  2206.    must initiate a cross-certification operation (or use another
  2207.    scheme).
  2208.  
  2209.    This scheme is suitable where the two CAs in question can already
  2210.    verify each other's signatures (they have some common points of
  2211.    trust) or where there is an out-of-band verification of the origin of
  2212.    the certification request.
  2213.  
  2214.    Detailed Description:
  2215.  
  2216.    Cross certification is initiated at one CA known as the responder.
  2217.    The CA administrator for the responder identifies the CA it wants to
  2218.    cross certify and the responder CA equipment generates an
  2219.    authorization code.  The responder CA administrator passes this
  2220.    authorization code by out-of-band means to the requester CA
  2221.    administrator. The requester CA administrator enters the
  2222.    authorization code at the requester CA in order to initiate the on-
  2223.    line exchange.
  2224.  
  2225.    The authorization code is used for authentication and integrity
  2226.    purposes. This is done by generating a symmetric key based on the
  2227.    authorization code and using the symmetric key for generating Message
  2228.    Authentication Codes (MACs) on all messages exchanged.
  2229.  
  2230.    The requester CA initiates the exchange by generating a random number
  2231.    (requester random number). The requester CA then sends to the
  2232.    responder CA the cross certification request (ccr) message. The
  2233.    fields in this message are protected from modification with a MAC
  2234.    based on the authorization code.
  2235.  
  2236.    Upon receipt of the ccr message, the responder CA checks the protocol
  2237.    version, saves the requester random number, generates its own random
  2238.    number (responder random number) and validates the MAC. It then
  2239.  
  2240.  
  2241.  
  2242. Adams & Farrell             Standards Track                    [Page 40]
  2243.  
  2244. RFC 2510          PKI Certificate Management Protocols        March 1999
  2245.  
  2246.  
  2247.    generates (and archives, if desired) a new requester certificate that
  2248.    contains the requester CA public key and is signed with the responder
  2249.    CA signature private key. The responder CA responds with the cross
  2250.    certification response (ccp) message. The fields in this message are
  2251.    protected from modification with a MAC based on the authorization
  2252.    code.
  2253.  
  2254.    Upon receipt of the ccp message, the requester CA checks that its own
  2255.    system time is close to the responder CA system time, checks the
  2256.    received random numbers and validates the MAC.  The requester CA
  2257.    responds with the PKIConfirm message. The fields in this message are
  2258.    protected from modification with a MAC based on the authorization
  2259.    code.  The requester CA writes the requester certificate to the
  2260.    Repository.
  2261.  
  2262.    Upon receipt of the PKIConfirm message, the responder CA checks the
  2263.    random numbers and validates the MAC.
  2264.  
  2265.    Notes:
  2266.  
  2267.    1. The ccr message must contain a "complete" certification request,
  2268.       that is, all fields (including, e.g., a BasicConstraints
  2269.       extension) must be specified by the requester CA.
  2270.    2. The ccp message SHOULD contain the verification certificate of the
  2271.       responder CA - if present, the requester CA must then verify this
  2272.       certificate (for example, via the "out-of-band" mechanism).
  2273.  
  2274. 4.7 End entity initialization
  2275.  
  2276.    As with CAs, end entities must be initialized. Initialization of end
  2277.    entities requires at least two steps:
  2278.  
  2279.       - acquisition of PKI information
  2280.       - out-of-band verification of one root-CA public key
  2281.  
  2282.    (other possible steps include the retrieval of trust condition
  2283.    information and/or out-of-band verification of other CA public keys).
  2284.  
  2285. 4.7.1 Acquisition of PKI information
  2286.  
  2287.    The information REQUIRED is:
  2288.  
  2289.       - the current root-CA public key
  2290.       - (if the certifying CA is not a root-CA) the certification path
  2291.         from  the root CA to the certifying CA together with appropriate
  2292.         revocation lists
  2293.       - the algorithms and algorithm parameters which the certifying CA
  2294.         supports for each relevant usage
  2295.  
  2296.  
  2297.  
  2298. Adams & Farrell             Standards Track                    [Page 41]
  2299.  
  2300. RFC 2510          PKI Certificate Management Protocols        March 1999
  2301.  
  2302.  
  2303.    Additional information could be required (e.g., supported extensions
  2304.    or CA policy information) in order to produce a certification request
  2305.    which will be successful. However, for simplicity we do not mandate
  2306.    that the end entity acquires this information via the PKI messages.
  2307.    The end result is simply that some certification requests may fail
  2308.    (e.g., if the end entity wants to generate its own encryption key but
  2309.    the CA doesn't allow that).
  2310.  
  2311.    The required information MAY be acquired as described in Section 4.5.
  2312.  
  2313. 4.7.2 Out-of-Band Verification of Root-CA Key
  2314.  
  2315.    An end entity must securely possess the public key of its root CA.
  2316.    One method to achieve this is to provide the end entity with the CA's
  2317.    self-certificate fingerprint via some secure "out-of-band" means. The
  2318.    end entity can then securely use the CA's self-certificate.
  2319.  
  2320.    See Section 4.1 for further details.
  2321.  
  2322. 4.8 Certificate Request
  2323.  
  2324.    An initialized end entity MAY request a certificate at any time (as
  2325.    part of an update procedure, or for any other purpose).  This request
  2326.    will be made using the certification request (cr) message.  If the
  2327.    end entity already possesses a signing key pair (with a corresponding
  2328.    verification certificate), then this cr message will typically be
  2329.    protected by the entity's digital signature.  The CA returns the new
  2330.    certificate (if the request is successful) in a CertRepMessage.
  2331.  
  2332. 4.9 Key Update
  2333.  
  2334.    When a key pair is due to expire the relevant end entity MAY request
  2335.    a key update - that is, it MAY request that the CA issue a new
  2336.    certificate for a new key pair.  The request is made using a key
  2337.    update request (kur) message.  If the end entity already possesses a
  2338.    signing key pair (with a corresponding verification certificate),
  2339.    then this message will typically be protected by the entity's digital
  2340.    signature. The CA returns the new certificate (if the request is
  2341.    successful) in a key update response (kup) message, which is
  2342.    syntactically identical to a CertRepMessage.
  2343.  
  2344. 5. Transports
  2345.  
  2346.    The transport protocols specified below allow end entities, RAs and
  2347.    CAs to pass PKI messages between them. There is no requirement for
  2348.    specific security mechanisms to be applied at this level if the PKI
  2349.    messages are suitably protected (that is, if the OPTIONAL
  2350.    PKIProtection parameter is used as specified for each message).
  2351.  
  2352.  
  2353.  
  2354. Adams & Farrell             Standards Track                    [Page 42]
  2355.  
  2356. RFC 2510          PKI Certificate Management Protocols        March 1999
  2357.  
  2358.  
  2359. 5.1 File based protocol
  2360.  
  2361.    A file containing a PKI message MUST contain only the DER encoding of
  2362.    one PKI message, i.e., there MUST be no extraneous header or trailer
  2363.    information in the file.
  2364.  
  2365.    Such files can be used to transport PKI messages using, e.g., FTP.
  2366.  
  2367. 5.2 Direct TCP-Based Management Protocol
  2368.  
  2369.    The following simple TCP-based protocol is to be used for transport
  2370.    of PKI messages. This protocol is suitable for cases where an end
  2371.    entity (or an RA) initiates a transaction and can poll to pick up the
  2372.    results.
  2373.  
  2374.    If a transaction is initiated by a PKI entity (RA or CA) then an end
  2375.    entity must either supply a listener process or be supplied with a
  2376.    polling reference (see below) in order to allow it to pick up the PKI
  2377.    message from the PKI management component.
  2378.  
  2379.    The protocol basically assumes a listener process on an RA or CA
  2380.    which can accept PKI messages on a well-defined port (port number
  2381.    829). Typically an initiator binds to this port and submits the
  2382.    initial PKI message for a given transaction ID. The responder replies
  2383.    with a PKI message and/or with a reference number to be used later
  2384.    when polling for the actual PKI message response.
  2385.  
  2386.    If a number of PKI response messages are to be produced for a given
  2387.    request (say if some part of the request is handled more quickly than
  2388.    another) then a new polling reference is also returned.
  2389.  
  2390.    When the final PKI response message has been picked up by the
  2391.    initiator then no new polling reference is supplied.
  2392.  
  2393.    The initiator of a transaction sends a "direct TCP-based PKI message"
  2394.    to the recipient. The recipient responds with a similar message.
  2395.  
  2396.    A "direct TCP-based PKI message" consists of:
  2397.  
  2398.          length (32-bits), flag (8-bits), value (defined below)
  2399.  
  2400.    The length field contains the number of octets of the remainder of
  2401.    the message (i.e., number of octets of "value" plus one).  All 32-bit
  2402.    values in this protocol are specified to be in network byte order.
  2403.  
  2404.     Message name   flag     value
  2405.  
  2406.     pkiMsg         '00'H    DER-encoded PKI message
  2407.  
  2408.  
  2409.  
  2410. Adams & Farrell             Standards Track                    [Page 43]
  2411.  
  2412. RFC 2510          PKI Certificate Management Protocols        March 1999
  2413.  
  2414.  
  2415.       -- PKI message
  2416.     pollRep        '01'H    polling reference (32 bits),
  2417.                             time-to-check-back (32 bits)
  2418.       -- poll response where no PKI message response ready; use polling
  2419.       -- reference value (and estimated time value) for later polling
  2420.     pollReq        '02'H    polling reference (32 bits)
  2421.       -- request for a PKI message response to initial message
  2422.     negPollRep     '03'H    '00'H
  2423.       -- no further polling responses (i.e., transaction complete)
  2424.     partialMsgRep  '04'H    next polling reference (32 bits),
  2425.                             time-to-check-back (32 bits),
  2426.                             DER-encoded PKI message
  2427.       -- partial response to initial message plus new polling reference
  2428.       -- (and estimated time value) to use to get next part of response
  2429.     finalMsgRep    '05'H    DER-encoded PKI message
  2430.       -- final (and possibly sole) response to initial message
  2431.     errorMsgRep    '06'H    human readable error message
  2432.       -- produced when an error is detected (e.g., a polling reference is
  2433.       -- received which doesn't exist or is finished with)
  2434.  
  2435.    Where a PKIConfirm message is to be transported (always from the
  2436.    initiator to the responder) then a pkiMsg message is sent and a
  2437.    negPollRep is returned.
  2438.  
  2439.    The sequence of messages which can occur is then:
  2440.  
  2441.    a) end entity sends pkiMsg and receives one of pollRep, negPollRep,
  2442.    partialMsgRep or finalMsgRep in response.  b) end entity sends
  2443.    pollReq message and receives one of negPollRep, partialMsgRep,
  2444.    finalMsgRep or errorMsgRep in response.
  2445.  
  2446.    The "time-to-check-back" parameter is a 32-bit integer, defined to be
  2447.    the number of seconds which have elapsed since midnight, January 1,
  2448.    1970, coordinated universal time.  It provides an estimate of the
  2449.    time that the end entity should send its next pollReq.
  2450.  
  2451. 5.3 Management Protocol via E-mail
  2452.  
  2453.    This subsection specifies a means for conveying ASN.1-encoded
  2454.    messages for the protocol exchanges described in Section 4 via
  2455.    Internet mail.
  2456.  
  2457.    A simple MIME object is specified as follows.
  2458.  
  2459.       Content-Type: application/pkixcmp
  2460.       Content-Transfer-Encoding: base64
  2461.  
  2462.       <<the ASN.1 DER-encoded PKIX-CMP message, base64-encoded>>
  2463.  
  2464.  
  2465.  
  2466. Adams & Farrell             Standards Track                    [Page 44]
  2467.  
  2468. RFC 2510          PKI Certificate Management Protocols        March 1999
  2469.  
  2470.  
  2471.    This MIME object can be sent and received using common MIME
  2472.    processing engines and provides a simple Internet mail transport for
  2473.    PKIX-CMP messages.  Implementations MAY wish to also recognize and
  2474.    use the "application/x-pkixcmp" MIME type (specified in earlier
  2475.    versions of this document) in order to support backward compatibility
  2476.    wherever applicable.
  2477.  
  2478. 5.4 Management Protocol via HTTP
  2479.  
  2480.    This subsection specifies a means for conveying ASN.1-encoded
  2481.    messages for the protocol exchanges described in Section 4 via the
  2482.    HyperText Transfer Protocol.
  2483.  
  2484.    A simple MIME object is specified as follows.
  2485.  
  2486.       Content-Type: application/pkixcmp
  2487.  
  2488.       <<the ASN.1 DER-encoded PKIX-CMP message>>
  2489.  
  2490.    This MIME object can be sent and received using common HTTP
  2491.    processing engines over WWW links and provides a simple browser-
  2492.    server transport for PKIX-CMP messages.  Implementations MAY wish to
  2493.    also recognize and use the "application/x-pkixcmp" MIME type
  2494.    (specified in earlier versions of this document) in order to support
  2495.    backward compatibility wherever applicable.
  2496.  
  2497. SECURITY CONSIDERATIONS
  2498.  
  2499.    This entire memo is about security mechanisms.
  2500.  
  2501.    One cryptographic consideration is worth explicitly spelling out. In
  2502.    the protocols specified above, when an end entity is required to
  2503.    prove possession of a decryption key, it is effectively challenged to
  2504.    decrypt something (its own certificate). This scheme (and many
  2505.    others!) could be vulnerable to an attack if the possessor of the
  2506.    decryption key in question could be fooled into decrypting an
  2507.    arbitrary challenge and returning the cleartext to an attacker.
  2508.    Although in this specification a number of other failures in security
  2509.    are required in order for this attack to succeed, it is conceivable
  2510.    that some future services (e.g., notary, trusted time) could
  2511.    potentially be vulnerable to such attacks. For this reason we re-
  2512.    iterate the general rule that implementations should be very careful
  2513.    about decrypting arbitrary "ciphertext" and revealing recovered
  2514.    "plaintext" since such a practice can lead to serious security
  2515.    vulnerabilities.
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522. Adams & Farrell             Standards Track                    [Page 45]
  2523.  
  2524. RFC 2510          PKI Certificate Management Protocols        March 1999
  2525.  
  2526.  
  2527.    Note also that exposing a private key to the CA/RA as a proof-of-
  2528.    possession technique can carry some security risks (depending upon
  2529.    whether or not the CA/RA can be trusted to handle such material
  2530.    appropriately).  Implementers are advised to exercise caution in
  2531.    selecting and using this particular POP mechanism.
  2532.  
  2533. References
  2534.  
  2535.    [COR95]   ISO/IEC JTC 1/SC 21, Technical Corrigendum 2 to ISO/IEC
  2536.              9594-8: 1990 & 1993 (1995:E), July 1995.
  2537.  
  2538.    [CRMF]    Myers, M., Adams, C., Solo, D. and D. Kemp, "Certificate
  2539.              Request Message Format", RFC 2511, March 1999.
  2540.  
  2541.    [MvOV97]  A. Menezes, P. van Oorschot, S. Vanstone, "Handbook of
  2542.              Applied Cryptography", CRC Press, 1997.
  2543.  
  2544.    [PKCS7]   RSA Laboratories, "The Public-Key Cryptography Standards
  2545.              (PKCS)", RSA Data Security Inc., Redwood City, California,
  2546.              November 1993 Release.
  2547.  
  2548.    [PKCS10]  RSA Laboratories, "The Public-Key Cryptography Standards
  2549.              (PKCS)", RSA Data Security Inc., Redwood City, California,
  2550.              November 1993 Release.
  2551.  
  2552.    [PKCS11]  RSA Laboratories, "The Public-Key Cryptography Standards -
  2553.              PKCS #11:  Cryptographic token interface standard", RSA
  2554.              Data Security Inc., Redwood City, California, April 28,
  2555.              1995.
  2556.  
  2557.    [RFC1847] Galvin, J., Murphy, S. Crocker, S. and N. Freed, "Security
  2558.              Multiparts for MIME:  Multipart/Signed and Multipart/
  2559.              Encrypted", RFC 1847, October 1995.
  2560.  
  2561.    [RFC2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC:  Keyed
  2562.              Hashing for Message Authentication", RFC 2104, February
  2563.              1997.
  2564.  
  2565.    [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  2566.              Requirement Levels", BCP 14, RFC 2119, March 1997.
  2567.  
  2568.    [RFC2202] Cheng, P. and R. Glenn, "Test Cases for HMAC-MD5 and HMAC-
  2569.              SHA-1", RFC 2202, September 1997.
  2570.  
  2571.    [X509-AM] ISO/IEC JTC1/SC 21, Draft Amendments DAM 4 to ISO/IEC
  2572.              9594-2, DAM 2 to ISO/IEC 9594-6, DAM 1 to ISO/IEC 9594-7,
  2573.              and DAM 1 to ISO/IEC 9594-8 on Certificate Extensions, 1
  2574.              December, 1996.
  2575.  
  2576.  
  2577.  
  2578. Adams & Farrell             Standards Track                    [Page 46]
  2579.  
  2580. RFC 2510          PKI Certificate Management Protocols        March 1999
  2581.  
  2582.  
  2583. Acknowledgements
  2584.  
  2585.    The authors gratefully acknowledge the contributions of various
  2586.    members of the PKIX Working Group.  Many of these contributions
  2587.    significantly clarified and improved the utility of this
  2588.    specification.
  2589.  
  2590. Authors' Addresses
  2591.  
  2592.    Carlisle Adams
  2593.    Entrust Technologies
  2594.    750 Heron Road, Suite E08,
  2595.    Ottawa, Ontario
  2596.    Canada K1V 1A7
  2597.  
  2598.    EMail: cadams@entrust.com
  2599.  
  2600.  
  2601.    Stephen Farrell
  2602.    Software and Systems Engineering Ltd.
  2603.    Fitzwilliam Court
  2604.    Leeson Close
  2605.    Dublin 2
  2606.    IRELAND
  2607.  
  2608.    EMail: stephen.farrell@sse.ie
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634. Adams & Farrell             Standards Track                    [Page 47]
  2635.  
  2636. RFC 2510          PKI Certificate Management Protocols        March 1999
  2637.  
  2638.  
  2639. APPENDIX A: Reasons for the presence of RAs
  2640.  
  2641.    The reasons which justify the presence of an RA can be split into
  2642.    those which are due to technical factors and those which are
  2643.    organizational in nature. Technical reasons include the following.
  2644.  
  2645.      -If hardware tokens are in use, then not all end entities will have
  2646.       the equipment needed to initialize these; the RA equipment can
  2647.       include the necessary functionality (this may also be a matter of
  2648.       policy).
  2649.  
  2650.      -Some end entities may not have the capability to publish
  2651.       certificates; again, the RA may be suitably placed for this.
  2652.  
  2653.      -The RA will be able to issue signed revocation requests on behalf
  2654.       of end entities associated with it, whereas the end entity may not
  2655.       be able to do this (if the key pair is completely lost).
  2656.  
  2657.    Some of the organizational reasons which argue for the presence of an
  2658.    RA are the following.
  2659.  
  2660.      -It may be more cost effective to concentrate functionality in the
  2661.       RA equipment than to supply functionality to all end entities
  2662.       (especially if special token initialization equipment is to be
  2663.       used).
  2664.  
  2665.      -Establishing RAs within an organization can reduce the number of
  2666.       CAs required, which is sometimes desirable.
  2667.  
  2668.      -RAs may be better placed to identify people with their
  2669.       "electronic" names, especially if the CA is physically remote from
  2670.       the end entity.
  2671.  
  2672.      -For many applications there will already be in place some
  2673.       administrative structure so that candidates for the role of RA are
  2674.       easy to find (which may not be true of the CA).
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690. Adams & Farrell             Standards Track                    [Page 48]
  2691.  
  2692. RFC 2510          PKI Certificate Management Protocols        March 1999
  2693.  
  2694.  
  2695. Appendix B. PKI Management Message Profiles.
  2696.  
  2697.    This appendix contains detailed profiles for those PKIMessages which
  2698.    MUST be supported by conforming implementations (see Section 4).
  2699.  
  2700.    Profiles for the PKIMessages used in the following PKI management
  2701.    operations are provided:
  2702.  
  2703.    - root CA key update
  2704.    - information request/response
  2705.    - cross-certification request/response (1-way)
  2706.    - initial registration/certification
  2707.         - basic authenticated scheme
  2708.    - certificate request
  2709.    - key update
  2710.  
  2711.    <<Later versions of this document may extend the above to include
  2712.    profiles for the operations listed below (along with other
  2713.    operations, if desired).>>
  2714.  
  2715.    - revocation request
  2716.    - certificate publication
  2717.    - CRL publication
  2718.  
  2719. B1. General Rules for interpretation of these profiles.
  2720.  
  2721.    1. Where OPTIONAL or DEFAULT fields are not mentioned in individual
  2722.       profiles, they SHOULD be absent from the relevant message (i.e., a
  2723.       receiver can validly reject a message containing such fields as
  2724.       being syntactically incorrect).
  2725.       Mandatory fields are not mentioned if they have an obvious value
  2726.       (e.g., pvno).
  2727.    2. Where structures occur in more than one message, they are
  2728.       separately profiled as appropriate.
  2729.    3. The algorithmIdentifiers from PKIMessage structures are profiled
  2730.       separately.
  2731.    4. A "special" X.500 DN is called the "NULL-DN"; this means a DN
  2732.       containing a zero-length SEQUENCE OF RelativeDistinguishedNames
  2733.       (its DER encoding is then '3000'H).
  2734.    5. Where a GeneralName is required for a field but no suitable
  2735.       value is available (e.g., an end entity produces a request before
  2736.       knowing its name) then the GeneralName is to be an X.500 NULL-DN
  2737.       (i.e., the Name field of the CHOICE is to contain a NULL-DN).
  2738.       This special value can be called a "NULL-GeneralName".
  2739.    6. Where a profile omits to specify the value for a GeneralName
  2740.       then the NULL-GeneralName value is to be present in the relevant
  2741.       PKIMessage field. This occurs with the sender field of the
  2742.       PKIHeader for some messages.
  2743.  
  2744.  
  2745.  
  2746. Adams & Farrell             Standards Track                    [Page 49]
  2747.  
  2748. RFC 2510          PKI Certificate Management Protocols        March 1999
  2749.  
  2750.  
  2751.    7. Where any ambiguity arises due to naming of fields, the profile
  2752.       names these using a "dot" notation (e.g., "certTemplate.subject"
  2753.       means the subject field within a field called certTemplate).
  2754.    8. Where a "SEQUENCE OF types" is part of a message, a zero-based
  2755.       array notation is used to describe fields within the SEQUENCE OF
  2756.       (e.g., crm[0].certReq.certTemplate.subject refers to a
  2757.       subfield of the first CertReqMsg contained in a request message).
  2758.    9. All PKI message exchanges in Sections B7-B10 require a PKIConfirm
  2759.       message to be sent by the initiating entity.  This message is not
  2760.       included in some of the profiles given since its body is NULL and
  2761.       its header contents are clear from the context.  Any authenticated
  2762.       means can be used for the protectionAlg (e.g., password-based MAC,
  2763.       if shared secret information is known, or signature).
  2764.  
  2765. B2. Algorithm Use Profile
  2766.  
  2767.    The following table contains definitions of algorithm uses within PKI
  2768.    management protocols.
  2769.  
  2770.    The columns in the table are:
  2771.  
  2772. Name:      an identifier used for message profiles
  2773. Use:       description of where and for what the algorithm is used
  2774. Mandatory: an AlgorithmIdentifier which MUST be supported by
  2775.            conforming implementations
  2776. Others:    alternatives to the mandatory AlgorithmIdentifier
  2777.  
  2778.  Name           Use                        Mandatory        Others
  2779.  
  2780.  MSG_SIG_ALG    Protection of PKI          DSA/SHA-1        RSA/MD5...
  2781.                 messages using signature
  2782.  MSG_MAC_ALG    protection of PKI          PasswordBasedMac HMAC,
  2783.                 messages using MACing                       X9.9...
  2784.  SYM_PENC_ALG   symmetric encryption of    3-DES (3-key-    RC5,
  2785.                 an end entity's private    EDE, CBC mode)   CAST-128...
  2786.                 key where symmetric
  2787.                 key is distributed
  2788.                 out-of-band
  2789.  PROT_ENC_ALG   asymmetric algorithm       D-H              RSA
  2790.                 used for encryption of
  2791.                 (symmetric keys for
  2792.                 encryption of) private
  2793.                 keys transported in
  2794.                 PKIMessages
  2795.  PROT_SYM_ALG   symmetric encryption       3-DES (3-key-    RC5,
  2796.                 algorithm used for         EDE, CBC mode)   CAST-128...
  2797.                 encryption of private
  2798.                 key bits (a key of this
  2799.  
  2800.  
  2801.  
  2802. Adams & Farrell             Standards Track                    [Page 50]
  2803.  
  2804. RFC 2510          PKI Certificate Management Protocols        March 1999
  2805.  
  2806.  
  2807.                 type is encrypted using
  2808.                 PROT_ENC_ALG)
  2809.  
  2810. Mandatory AlgorithmIdentifiers and Specifications:
  2811.  
  2812. DSA/SHA-1:
  2813.   AlgId:  {1 2 840 10040 4 3};
  2814.   NIST, FIPS PUB 186: Digital Signature Standard, 1994;
  2815.   Public Modulus size:  1024 bits.
  2816.  
  2817. PasswordBasedMac:
  2818.   {1 2 840 113533 7 66 13}, with SHA-1 {1 3 14 3 2 26} as the owf
  2819.     parameter and HMAC-SHA1 {1 3 6 1 5 5 8 1 2} as the mac parameter;
  2820.   (this specification), along with
  2821.   NIST, FIPS PUB 180-1: Secure Hash Standard, April 1995;
  2822.   H. Krawczyk, M. Bellare, R. Canetti, "HMAC:  Keyed-Hashing for Message
  2823.     Authentication", Internet Request for Comments 2104, February 1997.
  2824.  
  2825. 3-DES:
  2826.   {1 2 840 113549 3 7};
  2827.   (used in RSA's BSAFE and in S/MIME).
  2828.  
  2829. D-H:
  2830.   AlgId:  {1 2 840 10046 2 1};
  2831.   ANSI X9.42;
  2832.   Public Modulus Size:  1024 bits.
  2833.   DHParameter ::= SEQUENCE {
  2834.     prime INTEGER, -- p
  2835.     base  INTEGER  -- g
  2836.   }
  2837.  
  2838. B3. "Self-signed" certificates
  2839.  
  2840.    Profile of how a Certificate structure may be "self-signed". These
  2841.    structures are used for distribution of "root" CA public keys. This
  2842.    can occur in one of three ways (see Section 2.4 above for a
  2843.    description of the use of these structures):
  2844.  
  2845.  Type          Function
  2846.  
  2847.  newWithNew    a true "self-signed" certificate; the contained public
  2848.                key MUST be usable to verify the signature (though this
  2849.                provides only integrity and no authentication whatsoever)
  2850.  oldWithNew    previous root CA public key signed with new private key
  2851.  newWithOld    new root CA public key signed with previous private key
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858. Adams & Farrell             Standards Track                    [Page 51]
  2859.  
  2860. RFC 2510          PKI Certificate Management Protocols        March 1999
  2861.  
  2862.  
  2863.    <<Such certificates (including relevant extensions) must contain
  2864.    "sensible" values for all fields.  For example, when present
  2865.    subjectAltName MUST be identical to issuerAltName, and when present
  2866.    keyIdentifiers must contain appropriate values, et cetera.>>
  2867.  
  2868. B4. Proof of Possession Profile
  2869.  
  2870.    POP fields for use (in signature field of pop field of
  2871.    ProofOfPossession structure) when proving possession of a private
  2872.    signing key which corresponds to a public verification key for which
  2873.    a certificate has been requested.
  2874.  
  2875.     Field               Value         Comment
  2876.  
  2877.     algorithmIdentifier MSG_SIG_ALG   only signature protection is
  2878.                                       allowed for this proof
  2879.     signature           present       bits calculated using MSG_SIG_ALG
  2880.  
  2881.  
  2882.    <<Proof of possession of a private decryption key which corresponds
  2883.    to a public encryption key for which a certificate has been requested
  2884.    does not use this profile; instead the method given in protectionAlg
  2885.    for PKIConfirm in Section B8 is used.>>
  2886.  
  2887.    Not every CA/RA will do Proof-of-Possession (of signing key,
  2888.    decryption key, or key agreement key) in the PKIX-CMP in-band
  2889.    certification request protocol (how POP is done MAY ultimately be a
  2890.    policy issue which is made explicit for any given CA in its
  2891.    publicized Policy OID and Certification Practice Statement).
  2892.    However, this specification MANDATES that CA/RA entities MUST do POP
  2893.    (by some means) as part of the certification process.  All end
  2894.    entities MUST be prepared to provide POP (i.e., these components of
  2895.    the PKIX-CMP protocol MUST be supported).
  2896.  
  2897. B5. Root CA Key Update
  2898.  
  2899.    A root CA updates its key pair. It then produces a CA key update
  2900.    announcement message which can be made available (via one of the
  2901.    transport mechanisms) to the relevant end entities.  A PKIConfirm
  2902.    message is NOT REQUIRED from the end entities.
  2903.  
  2904.    ckuann message:
  2905.  
  2906.     Field        Value                        Comment
  2907.  
  2908.     sender       CA name                      responding CA name
  2909.     body         ckuann(CAKeyUpdAnnContent)
  2910.     oldWithNew   present                      see Section B3 above
  2911.  
  2912.  
  2913.  
  2914. Adams & Farrell             Standards Track                    [Page 52]
  2915.  
  2916. RFC 2510          PKI Certificate Management Protocols        March 1999
  2917.  
  2918.  
  2919.     newWithOld   present                      see Section B3 above
  2920.     newWithNew   present                      see Section B3 above
  2921.     extraCerts   optionally present           can be used to "publish"
  2922.                                               certificates (e.g.,
  2923.                                               certificates signed using
  2924.                                               the new private key)
  2925.  
  2926. B6. PKI Information request/response
  2927.  
  2928.    The end entity sends general message to the PKI requesting details
  2929.    which will be required for later PKI management operations.  RA/CA
  2930.    responds with general response. If an RA generates the response then
  2931.    it will simply forward the equivalent message which it previously
  2932.    received from the CA, with the possible addition of the certificates
  2933.    to the extraCerts fields of the PKIMessage.  A PKIConfirm message is
  2934.    NOT REQUIRED from the end entity.
  2935.  
  2936. Message Flows:
  2937.  
  2938. Step#   End entity                                    PKI
  2939.  
  2940.   1     format genm
  2941.   2                      ->      genm      ->
  2942.   3                                                   handle genm
  2943.   4                                                   produce genp
  2944.   5                      <-      genp      <-
  2945.   6     handle genp
  2946.  
  2947.  
  2948. genm:
  2949.  
  2950. Field               Value
  2951.  
  2952. recipient           CA name
  2953.   -- the name of the CA as contained in issuerAltName extensions or
  2954.   -- issuer fields within certificates
  2955. protectionAlg       MSG_MAC_ALG or MSG_SIG_ALG
  2956.   -- any authenticated protection alg.
  2957. SenderKID           present if required
  2958.   -- must be present if required for verification of message protection
  2959. freeText            any valid value
  2960. body                genr (GenReqContent)
  2961. GenMsgContent       empty SEQUENCE
  2962.   -- all relevant information requested
  2963. protection          present
  2964.   -- bits calculated using MSG_MAC_ALG or MSG_SIG_ALG
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970. Adams & Farrell             Standards Track                    [Page 53]
  2971.  
  2972. RFC 2510          PKI Certificate Management Protocols        March 1999
  2973.  
  2974.  
  2975. genp:
  2976.  
  2977. Field                Value
  2978.  
  2979. sender               CA name
  2980.   -- name of the CA which produced the message
  2981. protectionAlg        MSG_MAC_ALG or MSG_SIG_ALG
  2982.   -- any authenticated protection alg.
  2983. senderKID            present if required
  2984.   -- must be present if required for verification of message protection
  2985. body                 genp (GenRepContent)
  2986. CAProtEncCert        present (object identifier one
  2987.                      of PROT_ENC_ALG), with relevant
  2988.                      value
  2989.   -- to be used if end entity needs to encrypt information for the CA
  2990.   -- (e.g., private key for recovery purposes)
  2991. SignKeyPairTypes     present, with relevant value
  2992.   -- the set of signature algorithm identifiers which this CA will
  2993.   -- certify for subject public keys
  2994. EncKeyPairTypes      present, with relevant value
  2995.   -- the set of encryption/key agreement algorithm identifiers which
  2996.   -- this CA will certify for subject public keys
  2997. PreferredSymmAlg     present (object identifier one
  2998.                      of PROT_SYM_ALG) , with relevant
  2999.                      value
  3000.   -- the symmetric algorithm which this CA expects to be used in later
  3001.   -- PKI messages (for encryption)
  3002. CAKeyUpdateInfo      optionally present, with
  3003.                      relevant value
  3004.   -- the CA MAY provide information about a relevant root CA key pair
  3005.   -- using this field (note that this does not imply that the responding
  3006.   -- CA is the root CA in question)
  3007. CurrentCRL           optionally present, with relevant value
  3008.   -- the CA MAY provide a copy of a complete CRL (i.e., fullest possible
  3009.   -- one)
  3010. protection           present
  3011.   -- bits calculated using MSG_MAC_ALG or MSG_SIG_ALG
  3012. extraCerts           optionally present
  3013.   -- can be used to send some certificates to the end entity. An RA MAY
  3014.   -- add its certificate here.
  3015.  
  3016. B7. Cross certification request/response (1-way)
  3017.  
  3018.    Creation of a single cross-certificate (i.e., not two at once). The
  3019.    requesting CA MAY choose who is responsible for publication of the
  3020.    cross-certificate created by the responding CA through use of the
  3021.    PKIPublicationInfo control.
  3022.  
  3023.  
  3024.  
  3025.  
  3026. Adams & Farrell             Standards Track                    [Page 54]
  3027.  
  3028. RFC 2510          PKI Certificate Management Protocols        March 1999
  3029.  
  3030.  
  3031.    Preconditions:
  3032.  
  3033.    1. Responding CA can verify the origin of the request (possibly
  3034.       requiring out-of-band means) before processing the request.
  3035.    2. Requesting CA can authenticate the authenticity of the origin of
  3036.       the response (possibly requiring out-of-band means) before
  3037.       processing the response
  3038.  
  3039. Message Flows:
  3040.  
  3041. Step#   Requesting CA                                  Responding CA
  3042.   1     format ccr
  3043.   2                        ->       ccr       ->
  3044.   3                                                     handle ccr
  3045.   4                                                     produce ccp
  3046.   5                        <-       ccp       <-
  3047.   6     handle ccp
  3048.   7     format conf
  3049.   8                        ->       conf      ->
  3050.   9                                                     handle conf
  3051.  
  3052.  
  3053. ccr:
  3054. Field                 Value
  3055.  
  3056. sender                Requesting CA name
  3057.   -- the name of the CA who produced the message
  3058. recipient             Responding CA name
  3059.   -- the name of the CA who is being asked to produce a certificate
  3060. messageTime           time of production of message
  3061.   -- current time at requesting CA
  3062. protectionAlg         MSG_SIG_ALG
  3063.   -- only signature protection is allowed for this request
  3064. senderKID             present if required
  3065.   -- must be present if required for verification of message protection
  3066. transactionID         present
  3067.   -- implementation-specific value, meaningful to requesting CA.
  3068.   -- [If already in use at responding CA then a rejection message
  3069.   -- MUST be produced by responding CA]
  3070. senderNonce           present
  3071.   -- 128 (pseudo-)random bits
  3072. freeText              any valid value
  3073. body                  ccr (CertReqMessages)
  3074.                       only one CertReqMsg
  3075.                       allowed
  3076.   -- if multiple cross certificates are required they MUST be packaged
  3077.   -- in separate PKIMessages
  3078. certTemplate          present
  3079.  
  3080.  
  3081.  
  3082. Adams & Farrell             Standards Track                    [Page 55]
  3083.  
  3084. RFC 2510          PKI Certificate Management Protocols        March 1999
  3085.  
  3086.  
  3087.   -- details follow
  3088. version               v1 or v3
  3089.   -- <<v3 STRONGLY RECOMMENDED>>
  3090. signingAlg            present
  3091.   -- the requesting CA must know in advance with which algorithm it
  3092.   -- wishes the certificate to be signed
  3093. subject               present
  3094.   -- may be NULL-DN only if subjectAltNames extension value proposed
  3095. validity              present
  3096.   -- MUST be completely specified (i.e., both fields present)
  3097. issuer                present
  3098.   -- may be NULL-DN only if issuerAltNames extension value proposed
  3099. publicKey             present
  3100.   -- the key to be certified (which must be for a signing algorithm)
  3101. extensions            optionally present
  3102.   -- a requesting CA must propose values for all extensions which it
  3103.   -- requires to be in the cross-certificate
  3104.  
  3105. POPOSigningKey        present
  3106.   -- see "Proof of possession profile" (Section B4)
  3107.  
  3108. protection            present
  3109.   -- bits calculated using MSG_SIG_ALG
  3110. extraCerts            optionally present
  3111.   -- MAY contain any additional certificates that requester wishes
  3112.   -- to include
  3113.  
  3114.  
  3115. ccp:
  3116. Field                 Value
  3117.  
  3118. sender                Responding CA name
  3119.   -- the name of the CA who produced the message
  3120. recipient             Requesting CA name
  3121.   -- the name of the CA who asked for production of a certificate
  3122. messageTime           time of production of message
  3123.   -- current time at responding CA
  3124. protectionAlg         MSG_SIG_ALG
  3125.   -- only signature protection is allowed for this message
  3126. senderKID             present if required
  3127.   -- must be present if required for verification of message
  3128.   -- protection
  3129. recipKID              present if required
  3130. transactionID         present
  3131.   -- value from corresponding ccr message
  3132. senderNonce           present
  3133.   -- 128 (pseudo-)random bits
  3134. recipNonce            present
  3135.  
  3136.  
  3137.  
  3138. Adams & Farrell             Standards Track                    [Page 56]
  3139.  
  3140. RFC 2510          PKI Certificate Management Protocols        March 1999
  3141.  
  3142.  
  3143.   -- senderNonce from corresponding ccr message
  3144. freeText              any valid value
  3145. body                  ccp (CertRepMessage)
  3146.                       only one CertResponse allowed
  3147.   -- if multiple cross certificates are required they MUST be packaged
  3148.   -- in separate PKIMessages
  3149. response              present
  3150. status                present
  3151. PKIStatusInfo.status  present
  3152.   -- if PKIStatusInfo.status is one of:
  3153.   --   granted, or
  3154.   --   grantedWithMods,
  3155.   -- then certifiedKeyPair MUST be present and failInfo MUST be absent
  3156. failInfo              present depending on
  3157.                       PKIStatusInfo.status
  3158.   -- if PKIStatusInfo.status is:
  3159.   --   rejection
  3160.   -- then certifiedKeyPair MUST be absent and failInfo MUST be present
  3161.   -- and contain appropriate bit settings
  3162.  
  3163.  
  3164. certifiedKeyPair      present depending on
  3165.                       PKIStatusInfo.status
  3166. certificate           present depending on
  3167.                       certifiedKeyPair
  3168.   -- content of actual certificate must be examined by requesting CA
  3169.   -- before publication
  3170.  
  3171. protection            present
  3172.   -- bits calculated using MSG_SIG_ALG
  3173. extraCerts            optionally present
  3174.   -- MAY contain any additional certificates that responder wishes
  3175.   -- to include
  3176.  
  3177. B8. Initial Registration/Certification (Basic Authenticated Scheme)
  3178.  
  3179.    An (uninitialized) end entity requests a (first) certificate from a
  3180.    CA. When the CA responds with a message containing a certificate, the
  3181.    end entity replies with a confirmation. All messages are
  3182.    authenticated.
  3183.  
  3184.    This scheme allows the end entity to request certification of a
  3185.    locally-generated public key (typically a signature key). The end
  3186.    entity MAY also choose to request the centralized generation and
  3187.    certification of another key pair (typically an encryption key pair).
  3188.  
  3189.    Certification may only be requested for one locally generated public
  3190.    key (for more, use separate PKIMessages).
  3191.  
  3192.  
  3193.  
  3194. Adams & Farrell             Standards Track                    [Page 57]
  3195.  
  3196. RFC 2510          PKI Certificate Management Protocols        March 1999
  3197.  
  3198.  
  3199.    The end entity MUST support proof-of-possession of the private key
  3200.    associated with the locally-generated public key.
  3201.  
  3202.    Preconditions:
  3203.  
  3204.    1. The end entity can authenticate the CA's signature based on
  3205.       out-of-band means
  3206.    2. The end entity and the CA share a symmetric MACing key
  3207.  
  3208.    Message flow:
  3209.  
  3210.    Step#    End entity                                    PKI
  3211.      1      format ir
  3212.      2                         ->      ir       ->
  3213.      3                                                    handle ir
  3214.      4                                                    format ip
  3215.      5                         <-      ip       <-
  3216.      6      handle ip
  3217.      7      format conf
  3218.      8                         ->      conf     ->
  3219.      9                                                    handle conf
  3220.  
  3221.    For this profile, we mandate that the end entity MUST include all
  3222.    (i.e., one or two) CertReqMsg in a single PKIMessage and that the PKI
  3223.    (CA) MUST produce a single response PKIMessage which contains the
  3224.    complete response (i.e., including the OPTIONAL second key pair, if
  3225.    it was requested and if centralized key generation is supported). For
  3226.    simplicity, we also mandate that this message MUST be the final one
  3227.    (i.e., no use of "waiting" status value).
  3228.  
  3229. ir:
  3230. Field                Value
  3231.  
  3232. recipient            CA name
  3233.   -- the name of the CA who is being asked to produce a certificate
  3234. protectionAlg        MSG_MAC_ALG
  3235.   -- only MAC protection is allowed for this request, based on
  3236.   -- initial authentication key
  3237. senderKID            referenceNum
  3238.   -- the reference number which the CA has previously issued to
  3239.   -- the end entity (together with the MACing key)
  3240. transactionID        present
  3241.   -- implementation-specific value, meaningful to end entity.
  3242.   -- [If already in use at the CA then a rejection message MUST be
  3243.   -- produced by the CA]
  3244. senderNonce          present
  3245.   -- 128 (pseudo-)random bits
  3246. freeText             any valid value
  3247.  
  3248.  
  3249.  
  3250. Adams & Farrell             Standards Track                    [Page 58]
  3251.  
  3252. RFC 2510          PKI Certificate Management Protocols        March 1999
  3253.  
  3254.  
  3255. body                 ir (CertReqMessages)
  3256.                      only one or two CertReqMsg
  3257.                      are allowed
  3258.   -- if more certificates are required requests MUST be packaged in
  3259.   -- separate PKIMessages
  3260. CertReqMsg           one or two present
  3261.   -- see below for details, note: crm[0] means the first (which MUST
  3262.   -- be present), crm[1] means the second (which is OPTIONAL, and used
  3263.   -- to ask for a centrally-generated key)
  3264.  
  3265. crm[0].certReq.      fixed value of zero
  3266.    certReqId
  3267.   -- this is the index of the template within the message
  3268. crm[0].certReq       present
  3269.    certTemplate
  3270.   -- MUST include subject public key value, otherwise unconstrained
  3271. crm[0].pop...        optionally present if public key
  3272.    POPOSigningKey    from crm[0].certReq.certTemplate is
  3273.                      a signing key
  3274.   -- proof of possession MAY be required in this exchange (see Section
  3275.   -- B4 for details)
  3276. crm[0].certReq.      optionally present
  3277.    controls.archiveOptions
  3278.   -- the end entity MAY request that the locally-generated private key
  3279.   -- be archived
  3280. crm[0].certReq.      optionally present
  3281.    controls.publicationInfo
  3282.   -- the end entity MAY ask for publication of resulting cert.
  3283.  
  3284. crm[1].certReq       fixed value of one
  3285.    certReqId
  3286.   -- the index of the template within the message
  3287. crm[1].certReq       present
  3288.    certTemplate
  3289.   -- MUST NOT include actual public key bits, otherwise unconstrained
  3290.   -- (e.g., the names need not be the same as in crm[0])
  3291. crm[0].certReq.      present [object identifier MUST be PROT_ENC_ALG]
  3292.    controls.protocolEncKey
  3293.   -- if centralized key generation is supported by this CA, this
  3294.   -- short-term asymmetric encryption key (generated by the end entity)
  3295.   -- will be used by the CA to encrypt (a symmetric key used to encrypt)
  3296.   -- a private key generated by the CA on behalf of the end entity
  3297. crm[1].certReq.      optionally present
  3298.    controls.archiveOptions
  3299. crm[1].certReq.      optionally present
  3300.    controls.publicationInfo
  3301. protection           present
  3302.   -- bits calculated using MSG_MAC_ALG
  3303.  
  3304.  
  3305.  
  3306. Adams & Farrell             Standards Track                    [Page 59]
  3307.  
  3308. RFC 2510          PKI Certificate Management Protocols        March 1999
  3309.  
  3310.  
  3311. ip:
  3312. Field                Value
  3313.  
  3314. sender               CA name
  3315.   -- the name of the CA who produced the message
  3316. messageTime          present
  3317.   -- time at which CA produced message
  3318. protectionAlg        MS_MAC_ALG
  3319.   -- only MAC protection is allowed for this response
  3320. recipKID             referenceNum
  3321.   -- the reference number which the CA has previously issued to the
  3322.   -- end entity (together with the MACing key)
  3323. transactionID        present
  3324.   -- value from corresponding ir message
  3325. senderNonce          present
  3326.   -- 128 (pseudo-)random bits
  3327. recipNonce           present
  3328.   -- value from senderNonce in corresponding ir message
  3329. freeText             any valid value
  3330. body                 ir (CertRepMessage)
  3331.                      contains exactly one response
  3332.                      for each request
  3333.   -- The PKI (CA) responds to either one or two requests as appropriate.
  3334.   -- crc[0] denotes the first (always present); crc[1] denotes the
  3335.   -- second (only present if the ir message contained two requests and
  3336.   -- if the CA supports centralized key generation).
  3337. crc[0].              fixed value of zero
  3338.    certReqId
  3339.   -- MUST contain the response to the first request in the corresponding
  3340.   -- ir message
  3341. crc[0].status.       present, positive values allowed:
  3342.    status               "granted", "grantedWithMods"
  3343.                      negative values allowed:
  3344.                         "rejection"
  3345. crc[0].status.       present if and only if
  3346.    failInfo          crc[0].status.status is "rejection"
  3347. crc[0].              present if and only if
  3348.    certifiedKeyPair  crc[0].status.status is
  3349.                         "granted" or "grantedWithMods"
  3350. certificate          present unless end entity's public
  3351.                      key is an encryption key and POP
  3352.                      is done in this in-band exchange
  3353. encryptedCert        present if and only if end entity's
  3354.                      public key is an encryption key and
  3355.                      POP done in this in-band exchange
  3356. publicationInfo      optionally present
  3357.   -- indicates where certificate has been published (present at
  3358.   -- discretion of CA)
  3359.  
  3360.  
  3361.  
  3362. Adams & Farrell             Standards Track                    [Page 60]
  3363.  
  3364. RFC 2510          PKI Certificate Management Protocols        March 1999
  3365.  
  3366.  
  3367. crc[1].              fixed value of one
  3368.    certReqId
  3369.   -- MUST contain the response to the second request in the
  3370.   -- corresponding ir message
  3371. crc[1].status.       present, positive values allowed:
  3372.    status               "granted", "grantedWithMods"
  3373.                      negative values allowed:
  3374.                         "rejection"
  3375. crc[1].status.       present if and only if
  3376.    failInfo          crc[0].status.status is "rejection"
  3377. crc[1].              present if and only if
  3378.    certifiedKeyPair  crc[0].status.status is "granted"
  3379.                      or "grantedWithMods"
  3380. certificate          present
  3381. privateKey           present
  3382. publicationInfo      optionally present
  3383.   -- indicates where certificate has been published (present at
  3384.   -- discretion of CA)
  3385. protection           present
  3386.   -- bits calculated using MSG_MAC_ALG
  3387. extraCerts           optionally present
  3388.   -- the CA MAY provide additional certificates to the end entity
  3389.  
  3390. conf:
  3391. Field                Value
  3392.  
  3393. recipient            CA name
  3394.   -- the name of the CA who was asked to produce a certificate
  3395. transactionID        present
  3396.   -- value from corresponding ir and ip messages
  3397. senderNonce          present
  3398.   -- value from recipNonce in corresponding ip message
  3399. recipNonce           present
  3400.   -- value from senderNonce in corresponding ip message
  3401. protectionAlg        MSG_MAC_ALG
  3402.   -- only MAC protection is allowed for this message.  The MAC is
  3403.   -- based on the initial authentication key if only a signing key
  3404.   -- pair has been sent in ir for certification, or if POP is not
  3405.   -- done in this in-band exchange.  Otherwise, the MAC is based on
  3406.   -- a key derived from the symmetric key used to decrypt the
  3407.   -- returned encryptedCert.
  3408. senderKID            referenceNum
  3409.   -- the reference number which the CA has previously issued to the
  3410.   -- end entity (together with the MACing key)
  3411. body                 conf (PKIConfirmContent)
  3412.   -- this is an ASN.1 NULL
  3413. protection           present
  3414.   -- bits calculated using MSG_MAC_ALG
  3415.  
  3416.  
  3417.  
  3418. Adams & Farrell             Standards Track                    [Page 61]
  3419.  
  3420. RFC 2510          PKI Certificate Management Protocols        March 1999
  3421.  
  3422.  
  3423. B9. Certificate Request
  3424.  
  3425.    An (initialized) end entity requests a certificate from a CA (for any
  3426.    reason). When the CA responds with a message containing a
  3427.    certificate, the end entity replies with a confirmation. All messages
  3428.    are authenticated.
  3429.  
  3430.    The profile for this exchange is identical to that given in Section
  3431.    B8 with the following exceptions:
  3432.  
  3433.      - protectionAlg may be MSG_MAC_ALG or MSG_SIG_ALG in request,
  3434.        response, and confirm messages (the determination in the confirm
  3435.        message being dependent upon POP considerations for key-
  3436.        encipherment and key- agreement certificate requests);
  3437.      - senderKID and recipKID are only present if required for message
  3438.        verification;
  3439.      - body is cr or cp;
  3440.        - protocolEncKey is not present;
  3441.      - protection bits are calculated according to the protectionAlg
  3442.        field.
  3443.  
  3444. B10. Key Update Request
  3445.  
  3446.    An (initialized) end entity requests a certificate from a CA (to
  3447.    update the key pair and corresponding certificate that it already
  3448.    possesses). When the CA responds with a message containing a
  3449.    certificate, the end entity replies with a confirmation. All messages
  3450.    are authenticated.
  3451.  
  3452.    The profile for this exchange is identical to that given in Section
  3453.    B8 with the following exceptions:
  3454.  
  3455.      - protectionAlg may be MSG_MAC_ALG or MSG_SIG_ALG in request,
  3456.        response, and confirm messages (the determination in the confirm
  3457.        message being dependent upon POP considerations for key-
  3458.        encipherment and key- agreement certificate requests);
  3459.      - senderKID and recipKID are only present if required for message
  3460.        verification;
  3461.      - body is kur or kup;
  3462.      - protection bits are calculated according to the protectionAlg
  3463.        field.
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474. Adams & Farrell             Standards Track                    [Page 62]
  3475.  
  3476. RFC 2510          PKI Certificate Management Protocols        March 1999
  3477.  
  3478.  
  3479. Appendix C: "Compilable" ASN.1 Module using 1988 Syntax
  3480.  
  3481.   PKIXCMP {iso(1) identified-organization(3) dod(6) internet(1)
  3482.      security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-cmp(9)}
  3483.  
  3484.   DEFINITIONS EXPLICIT TAGS ::=
  3485.  
  3486.   BEGIN
  3487.  
  3488.   -- EXPORTS ALL --
  3489.  
  3490.   IMPORTS
  3491.  
  3492.       Certificate, CertificateList, Extensions, AlgorithmIdentifier
  3493.              FROM PKIX1Explicit88 {iso(1) identified-organization(3)
  3494.              dod(6) internet(1) security(5) mechanisms(5) pkix(7)
  3495.              id-mod(0) id-pkix1-explicit-88(1)}}
  3496.  
  3497.       GeneralName, KeyIdentifier, ReasonFlags
  3498.              FROM PKIX1Implicit88 {iso(1) identified-organization(3)
  3499.              dod(6) internet(1) security(5) mechanisms(5) pkix(7)
  3500.              id-mod(0) id-pkix1-implicit-88(2)}
  3501.  
  3502.       CertTemplate, PKIPublicationInfo, EncryptedValue, CertId,
  3503.       CertReqMessages
  3504.              FROM PKIXCRMF {iso(1) identified-organization(3)
  3505.              dod(6) internet(1) security(5) mechanisms(5) pkix(7)
  3506.              id-mod(0) id-mod-crmf(5)}}
  3507.  
  3508.       -- CertificationRequest
  3509.       --     FROM PKCS10 {no standard ASN.1 module defined;
  3510.       --     implementers need to create their own module to import
  3511.       --     from, or directly include the PKCS10 syntax in this module}
  3512.  
  3513.                        --  Locally defined OIDs  --
  3514.  
  3515.   PKIMessage ::= SEQUENCE {
  3516.       header           PKIHeader,
  3517.       body             PKIBody,
  3518.       protection   [0] PKIProtection OPTIONAL,
  3519.       extraCerts   [1] SEQUENCE SIZE (1..MAX) OF Certificate OPTIONAL
  3520.   }
  3521.  
  3522.   PKIHeader ::= SEQUENCE {
  3523.       pvno                INTEGER     { ietf-version2 (1) },
  3524.       sender              GeneralName,
  3525.       -- identifies the sender
  3526.       recipient           GeneralName,
  3527.  
  3528.  
  3529.  
  3530. Adams & Farrell             Standards Track                    [Page 63]
  3531.  
  3532. RFC 2510          PKI Certificate Management Protocols        March 1999
  3533.  
  3534.  
  3535.       -- identifies the intended recipient
  3536.       messageTime     [0] GeneralizedTime         OPTIONAL,
  3537.       -- time of production of this message (used when sender
  3538.       -- believes that the transport will be "suitable"; i.e.,
  3539.       -- that the time will still be meaningful upon receipt)
  3540.       protectionAlg   [1] AlgorithmIdentifier     OPTIONAL,
  3541.       -- algorithm used for calculation of protection bits
  3542.       senderKID       [2] KeyIdentifier           OPTIONAL,
  3543.       recipKID        [3] KeyIdentifier           OPTIONAL,
  3544.       -- to identify specific keys used for protection
  3545.       transactionID   [4] OCTET STRING            OPTIONAL,
  3546.       -- identifies the transaction; i.e., this will be the same in
  3547.       -- corresponding request, response and confirmation messages
  3548.       senderNonce     [5] OCTET STRING            OPTIONAL,
  3549.       recipNonce      [6] OCTET STRING            OPTIONAL,
  3550.       -- nonces used to provide replay protection, senderNonce
  3551.       -- is inserted by the creator of this message; recipNonce
  3552.       -- is a nonce previously inserted in a related message by
  3553.       -- the intended recipient of this message
  3554.       freeText        [7] PKIFreeText             OPTIONAL,
  3555.       -- this may be used to indicate context-specific instructions
  3556.       -- (this field is intended for human consumption)
  3557.       generalInfo     [8] SEQUENCE SIZE (1..MAX) OF
  3558.                              InfoTypeAndValue     OPTIONAL
  3559.       -- this may be used to convey context-specific information
  3560.       -- (this field not primarily intended for human consumption)
  3561.   }
  3562.  
  3563.   PKIFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
  3564.       -- text encoded as UTF-8 String (note:  each UTF8String SHOULD
  3565.       -- include an RFC 1766 language tag to indicate the language
  3566.       -- of the contained text)
  3567.  
  3568.  
  3569.   PKIBody ::= CHOICE {       -- message-specific body elements
  3570.       ir      [0]  CertReqMessages,        --Initialization Request
  3571.       ip      [1]  CertRepMessage,         --Initialization Response
  3572.       cr      [2]  CertReqMessages,        --Certification Request
  3573.       cp      [3]  CertRepMessage,         --Certification Response
  3574.       p10cr   [4]  CertificationRequest,   --imported from [PKCS10]
  3575.       popdecc [5]  POPODecKeyChallContent, --pop Challenge
  3576.       popdecr [6]  POPODecKeyRespContent,  --pop Response
  3577.       kur     [7]  CertReqMessages,        --Key Update Request
  3578.       kup     [8]  CertRepMessage,         --Key Update Response
  3579.       krr     [9]  CertReqMessages,        --Key Recovery Request
  3580.       krp     [10] KeyRecRepContent,       --Key Recovery Response
  3581.       rr      [11] RevReqContent,          --Revocation Request
  3582.       rp      [12] RevRepContent,          --Revocation Response
  3583.  
  3584.  
  3585.  
  3586. Adams & Farrell             Standards Track                    [Page 64]
  3587.  
  3588. RFC 2510          PKI Certificate Management Protocols        March 1999
  3589.  
  3590.  
  3591.       ccr     [13] CertReqMessages,        --Cross-Cert. Request
  3592.       ccp     [14] CertRepMessage,         --Cross-Cert. Response
  3593.       ckuann  [15] CAKeyUpdAnnContent,     --CA Key Update Ann.
  3594.       cann    [16] CertAnnContent,         --Certificate Ann.
  3595.       rann    [17] RevAnnContent,          --Revocation Ann.
  3596.       crlann  [18] CRLAnnContent,          --CRL Announcement
  3597.       conf    [19] PKIConfirmContent,      --Confirmation
  3598.       nested  [20] NestedMessageContent,   --Nested Message
  3599.       genm    [21] GenMsgContent,          --General Message
  3600.       genp    [22] GenRepContent,          --General Response
  3601.       error   [23] ErrorMsgContent         --Error Message
  3602.   }
  3603.  
  3604.   PKIProtection ::= BIT STRING
  3605.  
  3606.   ProtectedPart ::= SEQUENCE {
  3607.       header    PKIHeader,
  3608.       body      PKIBody
  3609.   }
  3610.  
  3611.   PasswordBasedMac ::= OBJECT IDENTIFIER --{1 2 840 113533 7 66 13}
  3612.  
  3613.   PBMParameter ::= SEQUENCE {
  3614.       salt                OCTET STRING,
  3615.       owf                 AlgorithmIdentifier,
  3616.       -- AlgId for a One-Way Function (SHA-1 recommended)
  3617.       iterationCount      INTEGER,
  3618.       -- number of times the OWF is applied
  3619.       mac                 AlgorithmIdentifier
  3620.       -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
  3621.   }   -- or HMAC [RFC2104, RFC2202])
  3622.  
  3623.   DHBasedMac ::= OBJECT IDENTIFIER --{1 2 840 113533 7 66 30}
  3624.  
  3625.   DHBMParameter ::= SEQUENCE {
  3626.       owf                 AlgorithmIdentifier,
  3627.       -- AlgId for a One-Way Function (SHA-1 recommended)
  3628.       mac                 AlgorithmIdentifier
  3629.       -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
  3630.   }   -- or HMAC [RFC2104, RFC2202])
  3631.  
  3632.  
  3633.   NestedMessageContent ::= PKIMessage
  3634.  
  3635.   PKIStatus ::= INTEGER {
  3636.       granted                (0),
  3637.       -- you got exactly what you asked for
  3638.       grantedWithMods        (1),
  3639.  
  3640.  
  3641.  
  3642. Adams & Farrell             Standards Track                    [Page 65]
  3643.  
  3644. RFC 2510          PKI Certificate Management Protocols        March 1999
  3645.  
  3646.  
  3647.       -- you got something like what you asked for; the
  3648.       -- requester is responsible for ascertaining the differences
  3649.       rejection              (2),
  3650.       -- you don't get it, more information elsewhere in the message
  3651.       waiting                (3),
  3652.       -- the request body part has not yet been processed,
  3653.       -- expect to hear more later
  3654.       revocationWarning      (4),
  3655.       -- this message contains a warning that a revocation is
  3656.       -- imminent
  3657.       revocationNotification (5),
  3658.       -- notification that a revocation has occurred
  3659.       keyUpdateWarning       (6)
  3660.       -- update already done for the oldCertId specified in
  3661.       -- CertReqMsg
  3662.   }
  3663.  
  3664.   PKIFailureInfo ::= BIT STRING {
  3665.   -- since we can fail in more than one way!
  3666.   -- More codes may be added in the future if/when required.
  3667.       badAlg           (0),
  3668.       -- unrecognized or unsupported Algorithm Identifier
  3669.       badMessageCheck  (1),
  3670.       -- integrity check failed (e.g., signature did not verify)
  3671.       badRequest       (2),
  3672.       -- transaction not permitted or supported
  3673.       badTime          (3),
  3674.       -- messageTime was not sufficiently close to the system time,
  3675.       -- as defined by local policy
  3676.       badCertId        (4),
  3677.       -- no certificate could be found matching the provided criteria
  3678.       badDataFormat    (5),
  3679.       -- the data submitted has the wrong format
  3680.       wrongAuthority   (6),
  3681.       -- the authority indicated in the request is different from the
  3682.       -- one creating the response token
  3683.       incorrectData    (7),
  3684.       -- the requester's data is incorrect (for notary services)
  3685.       missingTimeStamp (8),
  3686.       -- when the timestamp is missing but should be there (by policy)
  3687.       badPOP           (9)
  3688.       -- the proof-of-possession failed
  3689.   }
  3690.  
  3691.   PKIStatusInfo ::= SEQUENCE {
  3692.       status        PKIStatus,
  3693.       statusString  PKIFreeText     OPTIONAL,
  3694.       failInfo      PKIFailureInfo  OPTIONAL
  3695.  
  3696.  
  3697.  
  3698. Adams & Farrell             Standards Track                    [Page 66]
  3699.  
  3700. RFC 2510          PKI Certificate Management Protocols        March 1999
  3701.  
  3702.  
  3703.   }
  3704.  
  3705.   OOBCert ::= Certificate
  3706.  
  3707.   OOBCertHash ::= SEQUENCE {
  3708.       hashAlg     [0] AlgorithmIdentifier     OPTIONAL,
  3709.       certId      [1] CertId                  OPTIONAL,
  3710.       hashVal         BIT STRING
  3711.       -- hashVal is calculated over DER encoding of the
  3712.       -- subjectPublicKey field of the corresponding cert.
  3713.   }
  3714.  
  3715.   POPODecKeyChallContent ::= SEQUENCE OF Challenge
  3716.   -- One Challenge per encryption key certification request (in the
  3717.   -- same order as these requests appear in CertReqMessages).
  3718.  
  3719.   Challenge ::= SEQUENCE {
  3720.       owf                 AlgorithmIdentifier  OPTIONAL,
  3721.       -- MUST be present in the first Challenge; MAY be omitted in any
  3722.       -- subsequent Challenge in POPODecKeyChallContent (if omitted,
  3723.       -- then the owf used in the immediately preceding Challenge is
  3724.       -- to be used).
  3725.       witness             OCTET STRING,
  3726.       -- the result of applying the one-way function (owf) to a
  3727.       -- randomly-generated INTEGER, A.  [Note that a different
  3728.       -- INTEGER MUST be used for each Challenge.]
  3729.       challenge           OCTET STRING
  3730.       -- the encryption (under the public key for which the cert.
  3731.       -- request is being made) of Rand, where Rand is specified as
  3732.       --   Rand ::= SEQUENCE {
  3733.       --      int      INTEGER,
  3734.       --       - the randomly-generated INTEGER A (above)
  3735.       --      sender   GeneralName
  3736.       --       - the sender's name (as included in PKIHeader)
  3737.       --   }
  3738.   }
  3739.  
  3740.   POPODecKeyRespContent ::= SEQUENCE OF INTEGER
  3741.   -- One INTEGER per encryption key certification request (in the
  3742.   -- same order as these requests appear in CertReqMessages).  The
  3743.   -- retrieved INTEGER A (above) is returned to the sender of the
  3744.   -- corresponding Challenge.
  3745.  
  3746.  
  3747.   CertRepMessage ::= SEQUENCE {
  3748.       caPubs       [1] SEQUENCE SIZE (1..MAX) OF Certificate OPTIONAL,
  3749.       response         SEQUENCE OF CertResponse
  3750.   }
  3751.  
  3752.  
  3753.  
  3754. Adams & Farrell             Standards Track                    [Page 67]
  3755.  
  3756. RFC 2510          PKI Certificate Management Protocols        March 1999
  3757.  
  3758.  
  3759.   CertResponse ::= SEQUENCE {
  3760.       certReqId           INTEGER,
  3761.       -- to match this response with corresponding request (a value
  3762.       -- of -1 is to be used if certReqId is not specified in the
  3763.       -- corresponding request)
  3764.       status              PKIStatusInfo,
  3765.       certifiedKeyPair    CertifiedKeyPair    OPTIONAL,
  3766.       rspInfo             OCTET STRING        OPTIONAL
  3767.       -- analogous to the id-regInfo-asciiPairs OCTET STRING defined
  3768.       -- for regInfo in CertReqMsg [CRMF]
  3769.   }
  3770.  
  3771.   CertifiedKeyPair ::= SEQUENCE {
  3772.       certOrEncCert       CertOrEncCert,
  3773.       privateKey      [0] EncryptedValue      OPTIONAL,
  3774.       publicationInfo [1] PKIPublicationInfo  OPTIONAL
  3775.   }
  3776.  
  3777.   CertOrEncCert ::= CHOICE {
  3778.       certificate     [0] Certificate,
  3779.       encryptedCert   [1] EncryptedValue
  3780.   }
  3781.  
  3782.   KeyRecRepContent ::= SEQUENCE {
  3783.       status                  PKIStatusInfo,
  3784.       newSigCert          [0] Certificate                   OPTIONAL,
  3785.       caCerts             [1] SEQUENCE SIZE (1..MAX) OF
  3786.                                           Certificate       OPTIONAL,
  3787.       keyPairHist         [2] SEQUENCE SIZE (1..MAX) OF
  3788.                                           CertifiedKeyPair  OPTIONAL
  3789.   }
  3790.  
  3791.   RevReqContent ::= SEQUENCE OF RevDetails
  3792.  
  3793.   RevDetails ::= SEQUENCE {
  3794.       certDetails         CertTemplate,
  3795.       -- allows requester to specify as much as they can about
  3796.       -- the cert. for which revocation is requested
  3797.       -- (e.g., for cases in which serialNumber is not available)
  3798.       revocationReason    ReasonFlags      OPTIONAL,
  3799.       -- the reason that revocation is requested
  3800.       badSinceDate        GeneralizedTime  OPTIONAL,
  3801.       -- indicates best knowledge of sender
  3802.       crlEntryDetails     Extensions       OPTIONAL
  3803.       -- requested crlEntryExtensions
  3804.   }
  3805.  
  3806.   RevRepContent ::= SEQUENCE {
  3807.  
  3808.  
  3809.  
  3810. Adams & Farrell             Standards Track                    [Page 68]
  3811.  
  3812. RFC 2510          PKI Certificate Management Protocols        March 1999
  3813.  
  3814.  
  3815.       status       SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
  3816.       -- in same order as was sent in RevReqContent
  3817.       revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
  3818.       -- IDs for which revocation was requested (same order as status)
  3819.       crls     [1] SEQUENCE SIZE (1..MAX) OF CertificateList  OPTIONAL
  3820.       -- the resulting CRLs (there may be more than one)
  3821.   }
  3822.  
  3823.  
  3824.   CAKeyUpdAnnContent ::= SEQUENCE {
  3825.       oldWithNew          Certificate, -- old pub signed with new priv
  3826.       newWithOld          Certificate, -- new pub signed with old priv
  3827.       newWithNew          Certificate  -- new pub signed with new priv
  3828.   }
  3829.  
  3830.   CertAnnContent ::= Certificate
  3831.  
  3832.   RevAnnContent ::= SEQUENCE {
  3833.       status              PKIStatus,
  3834.       certId              CertId,
  3835.       willBeRevokedAt     GeneralizedTime,
  3836.       badSinceDate        GeneralizedTime,
  3837.       crlDetails          Extensions  OPTIONAL
  3838.       -- extra CRL details(e.g., crl number, reason, location, etc.)
  3839. }
  3840.  
  3841.   CRLAnnContent ::= SEQUENCE OF CertificateList
  3842.  
  3843.   PKIConfirmContent ::= NULL
  3844.  
  3845.   InfoTypeAndValue ::= SEQUENCE {
  3846.       infoType               OBJECT IDENTIFIER,
  3847.       infoValue              ANY DEFINED BY infoType  OPTIONAL
  3848.   }
  3849.   -- Example InfoTypeAndValue contents include, but are not limited to:
  3850.   --  { CAProtEncCert    = {id-it 1}, Certificate                     }
  3851.   --  { SignKeyPairTypes = {id-it 2}, SEQUENCE OF AlgorithmIdentifier }
  3852.   --  { EncKeyPairTypes  = {id-it 3}, SEQUENCE OF AlgorithmIdentifier }
  3853.   --  { PreferredSymmAlg = {id-it 4}, AlgorithmIdentifier             }
  3854.   --  { CAKeyUpdateInfo  = {id-it 5}, CAKeyUpdAnnContent              }
  3855.   --  { CurrentCRL       = {id-it 6}, CertificateList                 }
  3856.   -- where {id-it} = {id-pkix 4} = {1 3 6 1 5 5 7 4}
  3857.   -- This construct MAY also be used to define new PKIX Certificate
  3858.   -- Management Protocol request and response messages, or general-
  3859.   -- purpose (e.g., announcement) messages for future needs or for
  3860.   -- specific environments.
  3861.  
  3862.   GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
  3863.  
  3864.  
  3865.  
  3866. Adams & Farrell             Standards Track                    [Page 69]
  3867.  
  3868. RFC 2510          PKI Certificate Management Protocols        March 1999
  3869.  
  3870.  
  3871.   -- May be sent by EE, RA, or CA (depending on message content).
  3872.   -- The OPTIONAL infoValue parameter of InfoTypeAndValue will typically
  3873.   -- be omitted for some of the examples given above.  The receiver is
  3874.   -- free to ignore any contained OBJ. IDs that it does not recognize.
  3875.   -- If sent from EE to CA, the empty set indicates that the CA may send
  3876.   -- any/all information that it wishes.
  3877.  
  3878.   GenRepContent ::= SEQUENCE OF InfoTypeAndValue
  3879.   -- The receiver is free to ignore any contained OBJ. IDs that it does
  3880.   -- not recognize.
  3881.  
  3882.   ErrorMsgContent ::= SEQUENCE {
  3883.       pKIStatusInfo          PKIStatusInfo,
  3884.       errorCode              INTEGER           OPTIONAL,
  3885.       -- implementation-specific error codes
  3886.       errorDetails           PKIFreeText       OPTIONAL
  3887.       -- implementation-specific error details
  3888.   }
  3889.  
  3890.  
  3891.  
  3892. -- The following definition is provided for compatibility reasons with
  3893. -- 1988 and 1993 ASN.1 compilers which allow the use of UNIVERSAL class
  3894. -- tags (not a part of formal ASN.1); 1997 and subsequent compilers
  3895. -- SHOULD comment out this line.
  3896.  
  3897. UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING
  3898.  
  3899. END
  3900.  
  3901.  
  3902.  
  3903.  
  3904.  
  3905.  
  3906.  
  3907.  
  3908.  
  3909.  
  3910.  
  3911.  
  3912.  
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922. Adams & Farrell             Standards Track                    [Page 70]
  3923.  
  3924. RFC 2510          PKI Certificate Management Protocols        March 1999
  3925.  
  3926.  
  3927. Appendix D: Registration of MIME Type for Section 5
  3928.  
  3929.    To: ietf-types@iana.org
  3930.    Subject: Registration of MIME media type application/pkixcmp
  3931.  
  3932.    MIME media type name: application
  3933.  
  3934.    MIME subtype name: pkixcmp
  3935.  
  3936.    Required parameters: -
  3937.  
  3938.    Optional parameters: -
  3939.  
  3940.    Encoding considerations:
  3941.    Content may contain arbitrary octet values (the ASN.1 DER encoding of
  3942.    a PKI message, as defined in the IETF PKIX Working Group
  3943.    specifications).  base64 encoding is required for MIME e-mail; no
  3944.    encoding is necessary for HTTP.
  3945.  
  3946.    Security considerations:
  3947.    This MIME type may be used to transport Public-Key Infrastructure
  3948.    (PKI) messages between PKI entities.  These messages are defined by
  3949.    the IETF PKIX Working Group and are used to establish and maintain an
  3950.    Internet X.509 PKI.  There is no requirement for specific security
  3951.    mechanisms to be applied at this level if the PKI messages themselves
  3952.    are protected as defined in the PKIX specifications.
  3953.  
  3954.    Interoperability considerations: -
  3955.  
  3956.    Published specification: this document
  3957.  
  3958.    Applications which use this media type:
  3959.    Applications using certificate management, operational, or ancillary
  3960.    protocols (as defined by the IETF PKIX Working Group) to send PKI
  3961.    messages via E-Mail or HTTP.
  3962.  
  3963.    Additional information:
  3964.  
  3965.      Magic number (s): -
  3966.      File extension (s): ".PKI"
  3967.      Macintosh File Type Code (s): -
  3968.  
  3969.    Person and email address to contact for further information:
  3970.    Carlisle Adams, cadams@entrust.com
  3971.  
  3972.    Intended usage: COMMON
  3973.  
  3974.    Author/Change controller: Carlisle Adams
  3975.  
  3976.  
  3977.  
  3978. Adams & Farrell             Standards Track                    [Page 71]
  3979.  
  3980. RFC 2510          PKI Certificate Management Protocols        March 1999
  3981.  
  3982.  
  3983. Full Copyright Statement
  3984.  
  3985.    Copyright (C) The Internet Society (1999).  All Rights Reserved.
  3986.  
  3987.    This document and translations of it may be copied and furnished to
  3988.    others, and derivative works that comment on or otherwise explain it
  3989.    or assist in its implementation may be prepared, copied, published
  3990.    and distributed, in whole or in part, without restriction of any
  3991.    kind, provided that the above copyright notice and this paragraph are
  3992.    included on all such copies and derivative works.  However, this
  3993.    document itself may not be modified in any way, such as by removing
  3994.    the copyright notice or references to the Internet Society or other
  3995.    Internet organizations, except as needed for the purpose of
  3996.    developing Internet standards in which case the procedures for
  3997.    copyrights defined in the Internet Standards process must be
  3998.    followed, or as required to translate it into languages other than
  3999.    English.
  4000.  
  4001.    The limited permissions granted above are perpetual and will not be
  4002.    revoked by the Internet Society or its successors or assigns.
  4003.  
  4004.    This document and the information contained herein is provided on an
  4005.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  4006.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  4007.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  4008.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  4009.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034. Adams & Farrell             Standards Track                    [Page 72]
  4035.  
  4036.