[RFCs/IDs] [Plain Text] [Tracker] [WG] [Email] [Diff1] [Diff2] [Nits]

Versions: (RFC 2510) 00 01 02 03 04 05 06 07 08 09 RFC 4210

Network Working Group                                           C. Adams
Internet-Draft                                      University of Ottawa
Obsoletes: 2510 (if approved)                                 S. Farrell
Expires: August 12, 2004                          Trinity College Dublin
                                                                T. Kause
                                                                     SSH
                                                              T. Mononen
                                                                 SafeNet
                                                       February 12, 2004


   Internet X.509 Public Key Infrastructure -- Certificate Management
                             Protocol (CMP)
                   draft-ietf-pkix-rfc2510bis-09.txt

Status of this Memo

   This document is an Internet-Draft and is in full conformance with
   all provisions of Section 10 of RFC2026.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups. Note that other
   groups may also distribute working documents as Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time. It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at http://
   www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on August 12, 2004.

Copyright Notice

   Copyright (C) The Internet Society (2004). All Rights Reserved.

Abstract

   This document describes the Internet X.509 Public Key Infrastructure
   (PKI) Certificate Management Protocol (CMP). Protocol messages are
   defined for X.509v3 certificate creation and management.  CMP
   provides online interactions between PKI components, including an
   exchange between a Certification Authority (CA) and a client system.




Adams, et al.           Expires August 12, 2004                 [Page 1]

Internet-Draft                    CMP                      February 2004


Table of Contents

   1.        Introduction . . . . . . . . . . . . . . . . . . . . .    5
   2.        Requirements . . . . . . . . . . . . . . . . . . . . .    6
   3.        PKI Management Overview  . . . . . . . . . . . . . . .    7
   3.1       PKI Management Model . . . . . . . . . . . . . . . . .    7
   3.1.1     Definitions of PKI Entities  . . . . . . . . . . . . .    7
   3.1.1.1   Subjects and End Entities  . . . . . . . . . . . . . .    7
   3.1.1.2   Certification Authority  . . . . . . . . . . . . . . .    8
   3.1.1.3   Registration Authority . . . . . . . . . . . . . . . .    9
   3.1.2     PKI Management Requirements  . . . . . . . . . . . . .    9
   3.1.3     PKI Management Operations  . . . . . . . . . . . . . .   11
   4.        Assumptions and Restrictions . . . . . . . . . . . . .   16
   4.1       End Entity Initialization  . . . . . . . . . . . . . .   16
   4.2       Initial Registration/Certification . . . . . . . . . .   16
   4.2.1     Criteria Used  . . . . . . . . . . . . . . . . . . . .   16
   4.2.1.1   Initiation of Registration / Certification . . . . . .   16
   4.2.1.2   End Entity Message Origin Authentication . . . . . . .   17
   4.2.1.3   Location of Key Generation . . . . . . . . . . . . . .   17
   4.2.1.4   Confirmation of Successful Certification . . . . . . .   17
   4.2.2     Mandatory Schemes  . . . . . . . . . . . . . . . . . .   18
   4.2.2.1   Centralized Scheme . . . . . . . . . . . . . . . . . .   18
   4.2.2.2   Basic Authenticated Scheme . . . . . . . . . . . . . .   18
   4.3       Proof of Possession (POP) of Private Key . . . . . . .   19
   4.3.1     Signature Keys . . . . . . . . . . . . . . . . . . . .   20
   4.3.2     Encryption Keys  . . . . . . . . . . . . . . . . . . .   20
   4.3.3     Key Agreement Keys . . . . . . . . . . . . . . . . . .   20
   4.4       Root CA Key Update . . . . . . . . . . . . . . . . . .   21
   4.4.1     CA Operator Actions  . . . . . . . . . . . . . . . . .   22
   4.4.2     Verifying Certificates . . . . . . . . . . . . . . . .   22
   4.4.2.1   Verification in Cases 1, 4, 5 and 8  . . . . . . . . .   23
   4.4.2.2   Verification in Case 2 . . . . . . . . . . . . . . . .   24
   4.4.2.3   Verification in Case 3 . . . . . . . . . . . . . . . .   24
   4.4.2.4   Failure of Verification in Case 6  . . . . . . . . . .   24
   4.4.2.5   Failure of Verification in Case 7  . . . . . . . . . .   25
   4.4.3     Revocation - Change of CA Key  . . . . . . . . . . . .   25
   5.        Data Structures  . . . . . . . . . . . . . . . . . . .   26
   5.1       Overall PKI Message  . . . . . . . . . . . . . . . . .   26
   5.1.1     PKI Message Header . . . . . . . . . . . . . . . . . .   26
   5.1.1.1   ImplicitConfirm  . . . . . . . . . . . . . . . . . . .   29
   5.1.1.2   ConfirmWaitTime  . . . . . . . . . . . . . . . . . . .   29
   5.1.2     PKI Message Body . . . . . . . . . . . . . . . . . . .   29
   5.1.3     PKI Message Protection . . . . . . . . . . . . . . . .   30
   5.1.3.1   Shared Secret Information  . . . . . . . . . . . . . .   31
   5.1.3.2   DH Key Pairs . . . . . . . . . . . . . . . . . . . . .   32
   5.1.3.3   Signature  . . . . . . . . . . . . . . . . . . . . . .   32
   5.1.3.4   Multiple Protection  . . . . . . . . . . . . . . . . .   33
   5.2       Common Data Structures . . . . . . . . . . . . . . . .   33



Adams, et al.           Expires August 12, 2004                 [Page 2]

Internet-Draft                    CMP                      February 2004


   5.2.1     Requested Certificate Contents . . . . . . . . . . . .   33
   5.2.2     Encrypted Values . . . . . . . . . . . . . . . . . . .   34
   5.2.3     Status codes and Failure Information for PKI Messages    34
   5.2.4     Certificate Identification . . . . . . . . . . . . . .   35
   5.2.5     Out-of-band root CA Public Key . . . . . . . . . . . .   35
   5.2.6     Archive Options  . . . . . . . . . . . . . . . . . . .   36
   5.2.7     Publication Information  . . . . . . . . . . . . . . .   36
   5.2.8     Proof-of-Possession Structures . . . . . . . . . . . .   37
   5.2.8.1   Inclusion of the Private Key . . . . . . . . . . . . .   37
   5.2.8.2   Indirect Method  . . . . . . . . . . . . . . . . . . .   37
   5.2.8.3   Challenge-Response Protocol  . . . . . . . . . . . . .   38
   5.2.8.4   Summary of PoP Options . . . . . . . . . . . . . . . .   39
   5.3       Operation-Specific Data Structures . . . . . . . . . .   41
   5.3.1     Initialization Request . . . . . . . . . . . . . . . .   41
   5.3.2     Initialization Response  . . . . . . . . . . . . . . .   41
   5.3.3     Certification Request  . . . . . . . . . . . . . . . .   41
   5.3.4     Certification Response . . . . . . . . . . . . . . . .   41
   5.3.5     Key Update Request Content . . . . . . . . . . . . . .   43
   5.3.6     Key Update Response Content  . . . . . . . . . . . . .   43
   5.3.7     Key Recovery Request Content . . . . . . . . . . . . .   43
   5.3.8     Key Recovery Response Content  . . . . . . . . . . . .   43
   5.3.9     Revocation Request Content . . . . . . . . . . . . . .   44
   5.3.10    Revocation Response Content  . . . . . . . . . . . . .   44
   5.3.11    Cross Certification Request Content  . . . . . . . . .   44
   5.3.12    Cross Certification Response Content . . . . . . . . .   44
   5.3.13    CA Key Update Announcement Content . . . . . . . . . .   45
   5.3.14    Certificate Announcement . . . . . . . . . . . . . . .   45
   5.3.15    Revocation Announcement  . . . . . . . . . . . . . . .   45
   5.3.16    CRL Announcement . . . . . . . . . . . . . . . . . . .   46
   5.3.17    PKI Confirmation Content . . . . . . . . . . . . . . .   46
   5.3.18    Certificate Confirmation Content . . . . . . . . . . .   46
   5.3.19    PKI General Message Content  . . . . . . . . . . . . .   47
   5.3.19.1  CA Protocol Encryption Certificate . . . . . . . . . .   47
   5.3.19.2  Signing Key Pair Types . . . . . . . . . . . . . . . .   47
   5.3.19.3  Encryption/Key Agreement Key Pair Types  . . . . . . .   47
   5.3.19.4  Preferred Symmetric Algorithm  . . . . . . . . . . . .   48
   5.3.19.5  Updated CA Key Pair  . . . . . . . . . . . . . . . . .   48
   5.3.19.6  CRL  . . . . . . . . . . . . . . . . . . . . . . . . .   48
   5.3.19.7  Unsupported Object Identifiers . . . . . . . . . . . .   48
   5.3.19.8  Key Pair Parameters  . . . . . . . . . . . . . . . . .   48
   5.3.19.9  Revocation Passphrase  . . . . . . . . . . . . . . . .   49
   5.3.19.10 ImplicitConfirm  . . . . . . . . . . . . . . . . . . .   49
   5.3.19.11 ConfirmWaitTime  . . . . . . . . . . . . . . . . . . .   49
   5.3.19.12 Original PKIMessage  . . . . . . . . . . . . . . . . .   49
   5.3.19.13 Supported Language Tags  . . . . . . . . . . . . . . .   49
   5.3.20    PKI General Response Content . . . . . . . . . . . . .   49
   5.3.21    Error Message Content  . . . . . . . . . . . . . . . .   50
   5.3.22    Polling Request and Response . . . . . . . . . . . . .   50



Adams, et al.           Expires August 12, 2004                 [Page 3]

Internet-Draft                    CMP                      February 2004


   6.        Mandatory PKI Management Functions . . . . . . . . . .   53
   6.1       Root CA Initialization . . . . . . . . . . . . . . . .   53
   6.2       Root CA Key Update . . . . . . . . . . . . . . . . . .   53
   6.3       Subordinate CA Initialization  . . . . . . . . . . . .   53
   6.4       CRL production . . . . . . . . . . . . . . . . . . . .   54
   6.5       PKI Information Request  . . . . . . . . . . . . . . .   54
   6.6       Cross Certification  . . . . . . . . . . . . . . . . .   54
   6.6.1     One-Way Request-Response Scheme: . . . . . . . . . . .   54
   6.7       End Entity Initialization  . . . . . . . . . . . . . .   56
   6.7.1     Acquisition of PKI Information . . . . . . . . . . . .   56
   6.7.2     Out-of-Band Verification of Root-CA Key  . . . . . . .   57
   6.8       Certificate Request  . . . . . . . . . . . . . . . . .   57
   6.9       Key Update . . . . . . . . . . . . . . . . . . . . . .   57
   7.        Version Negotiation  . . . . . . . . . . . . . . . . .   58
   7.1       Supporting RFC 2510 Implementations  . . . . . . . . .   58
   7.1.1     Clients Talking to RFC 2510 Servers  . . . . . . . . .   58
   7.1.2     Servers Receiving Version cmp1999 PKIMessages  . . . .   59
   8.        Security Considerations  . . . . . . . . . . . . . . .   60
   8.1       Proof-Of-Possesion with a Decryption Key . . . . . . .   60
   8.2       Proof-Of-Possession by Exposing the Private Key  . . .   60
   8.3       Attack Against Diffie-Hellman Key Exchange . . . . . .   60
   9.        IANA considerations  . . . . . . . . . . . . . . . . .   62
             Normative References . . . . . . . . . . . . . . . . .   63
             Informative References . . . . . . . . . . . . . . . .   64
             Authors' Addresses . . . . . . . . . . . . . . . . . .   65
   A.        Reasons for the Presence of RAs  . . . . . . . . . . .   66
   B.        The Use of Revocation Passphrase . . . . . . . . . . .   67
   C.        Request Message Behavioral Clarifications  . . . . . .   69
   D.        PKI Management Message Profiles (REQUIRED).  . . . . .   71
   D.1       General Rules for Interpretation of These Profiles.  .   71
   D.2       Algorithm Use Profile  . . . . . . . . . . . . . . . .   72
   D.3       Proof of Possession Profile  . . . . . . . . . . . . .   74
   D.4       Initial Registration/Certification (Basic
             Authenticated Scheme)  . . . . . . . . . . . . . . . .   75
   D.5       Certificate Request  . . . . . . . . . . . . . . . . .   81
   D.6       Key Update Request . . . . . . . . . . . . . . . . . .   82
   E.        PKI Management Message Profiles (OPTIONAL).  . . . . .   83
   E.1       General Rules for Interpretation of These Profiles.  .   83
   E.2       Algorithm Use Profile  . . . . . . . . . . . . . . . .   83
   E.3       Self-signed Certificates . . . . . . . . . . . . . . .   83
   E.4       Root CA Key Update . . . . . . . . . . . . . . . . . .   84
   E.5       PKI Information Request/Response . . . . . . . . . . .   84
   E.6       Cross Certification Request/Response (1-way) . . . . .   86
   E.7       In-band Initialization Using External Identity
             Certificate  . . . . . . . . . . . . . . . . . . . . .   89
   F.        Compilable ASN.1 Definitions . . . . . . . . . . . . .   91
   G.        Acknowledgements . . . . . . . . . . . . . . . . . . .  102
             Intellectual Property and Copyright Statements . . . .  103



Adams, et al.           Expires August 12, 2004                 [Page 4]

Internet-Draft                    CMP                      February 2004


1. Introduction

   This document describes the Internet X.509 Public Key Infrastructure
   (PKI) Certificate Management Protocol (CMP). Protocol messages are
   defined for certificate creation and management. The term
   "certificate" in this document refers to an X.509v3 Certificate as
   defined in [X509].

   This specification obsoletes RFC 2510. This specification differs
   from RFC 2510 in the following areas:

      The PKI management message profile section is split to two
      appendices: the required profile and the optional profile. Some of
      the formerly mandatory functionality is moved to the optional
      profile.

      The message confirmation mechanism has changed substantially.

      A new polling mechanism is introduced, deprecating the old polling
      method at the CMP transport level.

      The CMP transport protocol issues are handled in a separate
      document [CMPtrans], thus the Transports section is removed.

      A new implicit confirmation method is introduced to reduce the
      number of protocol messages exchanged in a transaction.

      The new specification contains some less prominent protocol
      enhancements and improved explanatory text on several issues.






















Adams, et al.           Expires August 12, 2004                 [Page 5]

Internet-Draft                    CMP                      February 2004


2. Requirements

   The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT",
   "RECOMMENDED", "MAY", and "OPTIONAL" in this document (in uppercase,
   as shown) are to be interpreted as described in [RFC2119].














































Adams, et al.           Expires August 12, 2004                 [Page 6]

Internet-Draft                    CMP                      February 2004


3. PKI Management Overview

   The PKI must be structured to be consistent with the types of
   individuals who must administer it.  Providing such administrators
   with unbounded choices not only complicates the software required but
   also increases the chances that a subtle mistake by an administrator
   or software developer will result in broader compromise. Similarly,
   restricting administrators with cumbersome mechanisms will cause them
   not to use the PKI.

   Management protocols are REQUIRED to support on-line interactions
   between Public Key Infrastructure (PKI) components.  For example, a
   management protocol might be used between a Certification Authority
   (CA) and a client system with which a key pair is associated, or
   between two CAs that issue cross-certificates for each other.

3.1 PKI Management Model

   Before specifying particular message formats and procedures we first
   define the entities involved in PKI management and their interactions
   (in terms of the PKI management functions required).  We then group
   these functions in order to accommodate different identifiable types
   of end entities.

3.1.1 Definitions of PKI Entities

   The entities involved in PKI management include the end entity (i.e.,
   the entity to whom the certificate is issued) and the certification
   authority (i.e., the entity that issues the certificate). A
   registration authority MAY also be involved in PKI management.

3.1.1.1 Subjects and End Entities

   The term "subject" is used here to refer to the entity to whom the
   certificate is issued, typically named in the subject or
   subjectAltName field of a certificate.  When we wish to distinguish
   the tools and/or software used by the subject (e.g., a local
   certificate management module) we will use the term "subject
   equipment". In general, the term "end entity" (EE) rather than
   subject is preferred in order to avoid confusion with the field name.
   It is important to note that the end entities here will include not
   only human users of applications, but also applications themselves
   (e.g., for IP security). This factor influences the protocols which
   the PKI management operations use; for example, application software
   is far more likely to know exactly which certificate extensions are
   required than are human users. PKI management entities are also end
   entities in the sense that they are sometimes named in the subject or
   subjectAltName field of a certificate or cross-certificate.  Where



Adams, et al.           Expires August 12, 2004                 [Page 7]

Internet-Draft                    CMP                      February 2004


   appropriate, the term "end-entity" will be used to refer to end
   entities who are not PKI management entities.

   All end entities require secure local access to some information --
   at a minimum, their own name and private key, the name of a CA which
   is directly trusted by this entity and that CA's public key (or a
   fingerprint of the public key where a self-certified version is
   available elsewhere). Implementations MAY use secure local storage
   for more than this minimum (e.g., the end entity's own certificate or
   application-specific information). The form of storage will also vary
   -- from files to tamper-resistant cryptographic tokens. The
   information stored in such local trusted storage is referred to here
   as the end entity's Personal Security Environment (PSE).

   Though PSE formats are beyond the scope of this document (they are
   very dependent on equipment, et cetera), a generic interchange format
   for PSEs is defined here - a certification response message MAY be
   used.

3.1.1.2 Certification Authority

   The certification authority (CA) may or may not actually be a real
   "third party" from the end entity's point of view. Quite often, the
   CA will actually belong to the same organization as the end entities
   it supports.

   Again, we use the term CA to refer to the entity named in the issuer
   field of a certificate; when it is necessary to distinguish the
   software or hardware tools used by the CA we use the term "CA
   equipment".

   The CA equipment will often include both an "off-line" component and
   an "on-line" component, with the CA private key only available to the
   "off-line" component. This is, however, a matter for implementers
   (though it is also relevant as a policy issue).

   We use the term "root CA" to indicate a CA that is directly trusted
   by an end entity; that is, securely acquiring the value of a root CA
   public key requires some out-of-band step(s). This term is not meant
   to imply that a root CA is necessarily at the top of any hierarchy,
   simply that the CA in question is trusted directly.

   A "subordinate CA" is one that is not a root CA for the end entity in
   question. Often, a subordinate CA will not be a root CA for any
   entity but this is not mandatory.






Adams, et al.           Expires August 12, 2004                 [Page 8]

Internet-Draft                    CMP                      February 2004


3.1.1.3 Registration Authority

   In addition to end-entities and CAs, many environments call for the
   existence of a Registration Authority (RA) separate from the
   Certification Authority. The functions which the registration
   authority may carry out will vary from case to case but MAY include
   personal authentication, token distribution, revocation reporting,
   name assignment, key generation, archival of key pairs, et cetera.

   This document views the RA as an OPTIONAL component - when it is not
   present the CA is assumed to be able to carry out the RA's functions
   so that the PKI management protocols are the same from the end-
   entity's point of view.

   Again, we distinguish, where necessary, between the RA and the tools
   used (the "RA equipment").

   Note that an RA is itself an end entity. We further assume that all
   RAs are in fact certified end entities and that RAs have private keys
   that are usable for signing. How a particular CA equipment identifies
   some end entities as RAs is an implementation issue (i.e., this
   document specifies no special RA certification operation). We do not
   mandate that the RA is certified by the CA with which it is
   interacting at the moment (so one RA may work with more than one CA
   whilst only being certified once).

   In some circumstances end entities will communicate directly with a
   CA even where an RA is present. For example, for initial registration
   and/or certification the subject may use its RA, but communicate
   directly with the CA in order to refresh its certificate.

3.1.2 PKI Management Requirements

   The protocols given here meet the following requirements on PKI
   management

   1.   PKI management must conform to the ISO/IEC 9594-8 / ITU-T X.509
        standards.

   2.   It must be possible to regularly update any key pair without
        affecting any other key pair.

   3.   The use of confidentiality in PKI management protocols must be
        kept to a minimum in order to ease acceptance in environments
        where strong confidentiality might cause regulatory problems.

   4.   PKI management protocols must allow the use of different
        industry-standard cryptographic algorithms, (specifically



Adams, et al.           Expires August 12, 2004                 [Page 9]

Internet-Draft                    CMP                      February 2004


        including RSA, DSA, MD5, SHA-1) -- this means that any given CA,
        RA, or end entity may, in principle, use whichever algorithms
        suit it for its own key pair(s).

   5.   PKI management protocols must not preclude the generation of key
        pairs by the end-entity concerned, by an RA, or by a CA -- key
        generation may also occur elsewhere, but for the purposes of PKI
        management we can regard key generation as occurring wherever
        the key is first present at an end entity, RA, or CA.

   6.   PKI management protocols must support the publication of
        certificates by the end-entity concerned, by an RA, or by a CA.
        Different implementations and different environments may choose
        any of the above approaches.

   7.   PKI management protocols must support the production of
        Certificate Revocation Lists (CRLs) by allowing certified end
        entities to make requests for the revocation of certificates -
        this must be done in such a way that the denial-of-service
        attacks which are possible are not made simpler.

   8.   PKI management protocols must be usable over a variety of
        "transport" mechanisms, specifically including mail, http, TCP/
        IP and ftp.

   9.   Final authority for certification creation rests with the CA; no
        RA or end-entity equipment can assume that any certificate
        issued by a CA will contain what was requested -- a CA may alter
        certificate field values or may add, delete or alter extensions
        according to its operating policy. In other words, all PKI
        entities (end-entities, RAs, and CAs) must be capable of
        handling responses to requests for certificates in which the
        actual certificate issued is different from that requested (for
        example, a CA may shorten the validity period requested).  Note
        that policy may dictate that the CA must not publish or
        otherwise distribute the certificate until the requesting entity
        has reviewed and accepted the newly-created certificate
        (typically through use of the certConf message).

   10.  A graceful, scheduled change-over from one non-compromised CA
        key pair to the next (CA key update) must be supported (note
        that if the CA key is compromised, re-initialization must be
        performed for all entities in the domain of that CA). An end
        entity whose PSE contains the new CA public key (following a CA
        key update) must also be able to verify certificates verifiable
        using the old public key. End entities who directly trust the
        old CA key pair must also be able to verify certificates signed
        using the new CA private key.  (Required for situations where



Adams, et al.           Expires August 12, 2004                [Page 10]

Internet-Draft                    CMP                      February 2004


        the old CA public key is "hardwired" into the end entity's
        cryptographic equipment).

   11.  The functions of an RA may, in some implementations or
        environments, be carried out by the CA itself. The protocols
        must be designed so that end entities will use the same protocol
        regardless of whether the communication is with an RA or CA.
        Naturally the end entity must use the correct RA of CA public
        key to protect the communication.

   12.  Where an end entity requests a certificate containing a given
        public key value, the end entity must be ready to demonstrate
        possession of the corresponding private key value. This may be
        accomplished in various ways, depending on the type of
        certification request. See Section 4.3 for details of the
        in-band methods defined for the PKIX-CMP (i.e., Certificate
        Management Protocol) messages.


3.1.3 PKI Management Operations

   The following diagram shows the relationship between the entities
   defined above in terms of the PKI management operations. The letters
   in the diagram indicate "protocols" in the sense that a defined set
   of PKI management messages can be sent along each of the lettered
   lines.

























Adams, et al.           Expires August 12, 2004                [Page 11]

Internet-Draft                    CMP                      February 2004


     +---+     cert. publish        +------------+      j
     |   |  <---------------------  | End Entity | <-------
     | C |             g            +------------+      "out-of-band"
     | e |                            | ^                loading
     | r |                            | |      initial
     | t |                          a | | b     registration/
     |   |                            | |       certification
     | / |                            | |      key pair recovery
     |   |                            | |      key pair update
     | C |                            | |      certificate update
     | R |  PKI "USERS"               V |      revocation request
     | L | -------------------+-+-----+-+------+-+-------------------
     |   |  PKI MANAGEMENT    | ^              | ^
     |   |    ENTITIES      a | | b          a | | b
     | R |                    V |              | |
     | e |             g   +------+    d       | |
     | p |   <------------ | RA   | <-----+    | |
     | o |      cert.      |      | ----+ |    | |
     | s |       publish   +------+   c | |    | |
     | i |                              | |    | |
     | t |                              V |    V |
     | o |          g                 +------------+   i
     | r |   <------------------------|     CA     |------->
     | y |          h                 +------------+  "out-of-band"
     |   |      cert. publish              | ^         publication
     |   |      CRL publish                | |
     +---+                                 | |    cross-certification
                                         e | | f  cross-certificate
                                           | |       update
                                           | |
                                           V |
                                         +------+
                                         | CA-2 |
                                         +------+

   Figure 1 - PKI Entities

   At a high level the set of operations for which management messages
   are defined can be grouped as follows.

   1.  CA establishment: When establishing a new CA, certain steps are
       required (e.g., production of initial CRLs, export of CA public
       key).

   2.  End entity initialization: this includes importing a root CA
       public key and requesting information about the options supported
       by a PKI management entity.




Adams, et al.           Expires August 12, 2004                [Page 12]

Internet-Draft                    CMP                      February 2004


   3.  Certification: various operations result in the creation of new
       certificates:

       1.  initial registration/certification: This is the process
           whereby an end entity first makes itself known to a CA or RA,
           prior to the CA issuing a certificate or certificates for
           that end entity. The end result of this process (when it is
           successful) is that a CA issues a certificate for an end
           entity's public key, and returns that certificate to the end
           entity and/or posts that certificate in a public repository.
           This process may, and typically will, involve multiple
           "steps", possibly including an initialization of the end
           entity's equipment. For example, the end entity's equipment
           must be securely initialized with the public key of a CA, to
           be used in validating certificate paths.  Furthermore, an end
           entity typically needs to be initialized with its own key
           pair(s).

       2.  key pair update: Every key pair needs to be updated regularly
           (i.e., replaced with a new key pair), and a new certificate
           needs to be issued.

       3.  certificate update: As certificates expire they may be
           "refreshed" if nothing relevant in the environment has
           changed.

       4.  CA key pair update: As with end entities, CA key pairs need
           to be updated regularly; however, different mechanisms are
           required.

       5.  cross-certification request: One CA requests issuance of a
           cross-certificate from another CA.  For the purposes of this
           standard, the following terms are defined.  A "cross-
           certificate" is a certificate in which the subject CA and the
           issuer CA are distinct and SubjectPublicKeyInfo contains a
           verification key (i.e., the certificate has been issued for
           the subject CA's signing key pair). When it is necessary to
           distinguish more finely, the following terms may be used: a
           cross-certificate is called an "inter-domain
           cross-certificate" if the subject and issuer CAs belong to
           different administrative domains; it is called an "intra-
           domain cross-certificate" otherwise.

           1.  Note 1. The above definition of "cross-certificate"
               aligns with the defined term "CA-certificate" in X.509.
               Note that this term is not to be confused with the X.500
               "cACertificate" attribute type, which is unrelated.




Adams, et al.           Expires August 12, 2004                [Page 13]

Internet-Draft                    CMP                      February 2004


           2.  Note 2. In many environments the term
               "cross-certificate", unless further qualified, will be
               understood to be synonymous with "inter-domain
               cross-certificate" as defined above.

           3.  Note 3. Issuance of cross-certificates may be, but is not
               necessarily, mutual; that is, two CAs may issue
               cross-certificates for each other.

       6.  cross-certificate update: Similar to a normal certificate
           update but involving a cross-certificate.

   4.  Certificate/CRL discovery operations: some PKI management
       operations result in the publication of certificates or CRLs:

       1.  certificate publication: Having gone to the trouble of
           producing a certificate, some means for publishing it is
           needed. The "means" defined in PKIX MAY involve the messages
           specified in Section Section 5.3.13 - Section 5.3.16, or MAY
           involve other methods (LDAP, for example) as described in
           [RFC2559], [RFC2585] (the "Operational Protocols" documents
           of the PKIX series of specifications).

       2.  4.2 CRL publication: As for certificate publication.

   5.  Recovery operations: some PKI management operations are used when
       an end entity has "lost" its PSE:

       1.  key pair recovery: As an option, user client key materials
           (e.g., a user's private key used for decryption purposes) MAY
           be backed up by a CA, an RA, or a key backup system
           associated with a CA or RA. If an entity needs to recover
           these backed up key materials (e.g., as a result of a
           forgotten password or a lost key chain file), a protocol
           exchange may be needed to support such recovery.

   6.  Revocation operations: some PKI operations result in the creation
       of new CRL entries and/or new CRLs:

       1.  revocation request: An authorized person advises a CA of an
           abnormal situation requiring certificate revocation.

   7.  PSE operations: whilst the definition of PSE operations (e.g.,
       moving a PSE, changing a PIN, etc.) are beyond the scope of this
       specification, we do define a PKIMessage (CertRepMessage) which
       can form the basis of such operations.

   Note that on-line protocols are not the only way of implementing the



Adams, et al.           Expires August 12, 2004                [Page 14]

Internet-Draft                    CMP                      February 2004


   above operations.  For all operations there are off-line methods of
   achieving the same result, and this specification does not mandate
   use of on-line protocols.  For example, when hardware tokens are
   used, many of the operations MAY be achieved as part of the physical
   token delivery.

   Later sections define a set of standard messages supporting the above
   operations. Transport protocols for conveying these exchanges in
   different environments (file based, on-line, E-mail, and WWW) are
   beyond the scope of this document and are specified separately.









































Adams, et al.           Expires August 12, 2004                [Page 15]

Internet-Draft                    CMP                      February 2004


4. Assumptions and Restrictions

4.1 End Entity Initialization

   The first step for an end entity in dealing with PKI management
   entities is to request information about the PKI functions supported
   and to securely acquire a copy of the relevant root CA public key(s).

4.2 Initial Registration/Certification

   There are many schemes that can be used to achieve initial
   registration and certification of end entities. No one method is
   suitable for all situations due to the range of policies which a CA
   may implement and the variation in the types of end entity which can
   occur.

   We can however, classify the initial registration / certification
   schemes that are supported by this specification. Note that the word
   "initial", above, is crucial - we are dealing with the situation
   where the end entity in question has had no previous contact with the
   PKI. Where the end entity already possesses certified keys then some
   simplifications/alternatives are possible.

   Having classified the schemes that are supported by this
   specification we can then specify some as mandatory and some as
   optional. The goal is that the mandatory schemes cover a sufficient
   number of the cases which will arise in real use, whilst the optional
   schemes are available for special cases which arise less frequently.
   In this way we achieve a balance between flexibility and ease of
   implementation.

   We will now describe the classification of initial registration /
   certification schemes.

4.2.1 Criteria Used

4.2.1.1 Initiation of Registration / Certification

   In terms of the PKI messages which are produced we can regard the
   initiation of the initial registration / certification exchanges as
   occurring wherever the first PKI message relating to the end entity
   is produced. Note that the real-world initiation of the registration
   / certification procedure may occur elsewhere (e.g., a personnel
   department may telephone an RA operator).

   The possible locations are at the end entity, an RA, or a CA.





Adams, et al.           Expires August 12, 2004                [Page 16]

Internet-Draft                    CMP                      February 2004


4.2.1.2 End Entity Message Origin Authentication

   The on-line messages produced by the end entity that requires a
   certificate may be authenticated or not. The requirement here is to
   authenticate the origin of any messages from the end entity to the
   PKI (CA/RA).

   In this specification, such authentication is achieved by the PKI
   (CA/RA) issuing the end entity with a secret value (initial
   authentication key) and reference value (used to identify the secret
   value) via some out-of-band means. The initial authentication key can
   then be used to protect relevant PKI messages.

   We can thus classify the initial registration/certification scheme
   according to whether or not the on-line end entity -> PKI messages
   are authenticated or not.

   Note 1: We do not discuss the authentication of the PKI -> end entity
   messages here as this is always REQUIRED. In any case, it can be
   achieved simply once the root-CA public key has been installed at the
   end entity's equipment or it can be based on the initial
   authentication key.

   Note 2: An initial registration / certification procedure can be
   secure where the messages from the end entity are authenticated via
   some out- of-band means (e.g., a subsequent visit).

4.2.1.3 Location of Key Generation

   In this specification, "key generation" is regarded as occurring
   wherever either the public or private component of a key pair first
   occurs in a PKIMessage. Note that this does not preclude a
   centralized key generation service - the actual key pair MAY have
   been generated elsewhere and transported to the end entity, RA, or CA
   using a (proprietary or standardized) key generation request/response
   protocol (outside the scope of this specification).

   There are thus three possibilities for the location of "key
   generation":  the end entity, an RA, or a CA.

4.2.1.4 Confirmation of Successful Certification

   Following the creation of an initial certificate for an end entity,
   additional assurance can be gained by having the end entity
   explicitly confirm successful receipt of the message containing (or
   indicating the creation of) the certificate. Naturally, this
   confirmation message must be protected (based on the initial
   authentication key or other means).



Adams, et al.           Expires August 12, 2004                [Page 17]

Internet-Draft                    CMP                      February 2004


   This gives two further possibilities: confirmed or not.

4.2.2 Mandatory Schemes

   The criteria above allow for a large number of initial registration /
   certification schemes. This specification mandates that conforming CA
   equipment, RA equipment, and EE equipment MUST support the second
   scheme listed below (Section 4.2.2.2) Any entity MAY additionally
   support other schemes, if desired.

4.2.2.1 Centralized Scheme

   In terms of the classification above, this scheme is, in some ways,
   the simplest possible, where:

   o  initiation occurs at the certifying CA;

   o  no on-line message authentication is required;

   o  "key generation" occurs at the certifying CA (see Section
      4.2.1.3);

   o  no confirmation message is required.

   In terms of message flow, this scheme means that the only message
   required is sent from the CA to the end entity. The message must
   contain the entire PSE for the end entity. Some out-of-band means
   must be provided to allow the end entity to authenticate the message
   received and decrypt any encrypted values.

4.2.2.2 Basic Authenticated Scheme

   In terms of the classification above, this scheme is where:

   o  initiation occurs at the end entity;

   o  message authentication is REQUIRED;

   o  "key generation" occurs at the end entity (see Section 4.2.1.3);

   o  a confirmation message is REQUIRED.

   In terms of message flow, the basic authenticated scheme is as
   follows:







Adams, et al.           Expires August 12, 2004                [Page 18]

Internet-Draft                    CMP                      February 2004


     End entity                                          RA/CA
     ==========                                      =============
          out-of-band distribution of Initial Authentication
          Key (IAK) and reference value (RA/CA -> EE)
     Key generation
     Creation of certification request
     Protect request with IAK
                   -->>-- certification request -->>--
                                                    verify request
                                                    process request
                                                    create response
                   --<<-- certification response --<<--
     handle response
     create confirmation
                   -->>-- cert conf message      -->>--
                                                    verify confirmation
                                                    create response
                   --<<-- conf ack (optional)    --<<--
     handle response

   (Where verification of the cert confirmation message fails, the RA/CA
   MUST revoke the newly issued certificate if it has been published or
   otherwise made available.)

4.3 Proof of Possession (POP) of Private Key

   In order to prevent certain attacks and to allow a CA/RA to properly
   check the validity of the binding between an end entity and a key
   pair, the PKI management operations specified here make it possible
   for an end entity to prove that it has possession of (i.e., is able
   to use) the private key corresponding to the public key for which a
   certificate is requested.  A given CA/RA is free to choose how to
   enforce POP (e.g., out-of-band procedural means versus PKIX-CMP in-
   band messages) in its certification exchanges (i.e., this may be a
   policy issue).  However, it is REQUIRED that CAs/RAs MUST enforce POP
   by some means because there are currently many non-PKIX operational
   protocols in use (various electronic mail protocols are one example)
   that do not explicitly check the binding between the end entity and
   the private key.  Until operational protocols that do verify the
   binding (for signature, encryption, and key agreement key pairs)
   exist, and are ubiquitous, this binding can only be assumed to have
   been verified by the CA/RA. Therefore, if the binding is not verified
   by the CA/RA, certificates in the Internet Public-Key Infrastructure
   end up being somewhat less meaningful.

   POP is accomplished in different ways depending upon the type of key
   for which a certificate is requested. If a key can be used for
   multiple purposes (e.g., an RSA key) then any appropriate method MAY



Adams, et al.           Expires August 12, 2004                [Page 19]

Internet-Draft                    CMP                      February 2004


   be used (e.g., a key which may be used for signing, as well as other
   purposes, SHOULD NOT be sent to the CA/RA in order to prove
   possession).

   This specification explicitly allows for cases where an end entity
   supplies the relevant proof to an RA and the RA subsequently attests
   to the CA that the required proof has been received (and validated!).
   For example, an end entity wishing to have a signing key certified
   could send the appropriate signature to the RA which then simply
   notifies the relevant CA that the end entity has supplied the
   required proof. Of course, such a situation may be disallowed by some
   policies (e.g., CAs may be the only entities permitted to verify POP
   during certification).

4.3.1 Signature Keys

   For signature keys, the end entity can sign a value to prove
   possession of the private key.

4.3.2 Encryption Keys

   For encryption keys, the end entity can provide the private key to
   the CA/RA, or can be required to decrypt a value in order to prove
   possession of the private key (see Section 5.2.8). Decrypting a value
   can be achieved either directly or indirectly.

   The direct method is for the RA/CA to issue a random challenge to
   which an immediate response by the EE is required.

   The indirect method is to issue a certificate which is encrypted for
   the end entity (and have the end entity demonstrate its ability to
   decrypt this certificate in the confirmation message). This allows a
   CA to issue a certificate in a form which can only be used by the
   intended end entity.

   This specification encourages use of the indirect method because this
   requires no extra messages to be sent (i.e., the proof can be
   demonstrated using the {request, response, confirmation} triple of
   messages).

4.3.3 Key Agreement Keys

   For key agreement keys, the end entity and the PKI management entity
   (i.e., CA or RA) must establish a shared secret key in order to prove
   that the end entity has possession of the private key.

   Note that this need not impose any restrictions on the keys that can
   be certified by a given CA -- in particular, for Diffie-Hellman keys



Adams, et al.           Expires August 12, 2004                [Page 20]

Internet-Draft                    CMP                      February 2004


   the end entity may freely choose its algorithm parameters -- provided
   that the CA can generate a short-term (or one-time) key pair with the
   appropriate parameters when necessary.

4.4 Root CA Key Update

   This discussion only applies to CAs that are directly trusted by some
   end entities. Self-signed CAs SHALL be considered as directly trusted
   CAs. Recognizing whether a non self-signed CA is supposed to be
   directly trusted for some end entities is a matter of CA policy and
   is thus beyond the scope of this document.

   The basis of the procedure described here is that the CA protects its
   new public key using its previous private key and vice versa. Thus
   when a CA updates its key pair it must generate two extra
   cACertificate attribute values if certificates are made available
   using an X.500 directory (for a total of four:  OldWithOld;
   OldWithNew; NewWithOld; and NewWithNew).

   When a CA changes its key pair those entities who have acquired the
   old CA public key via "out-of-band" means are most affected. It is
   these end entities who will need access to the new CA public key
   protected with the old CA private key. However, they will only
   require this for a limited period (until they have acquired the new
   CA public key via the "out-of-band" mechanism). This will typically
   be easily achieved when these end entities' certificates expire.

   The data structure used to protect the new and old CA public keys is
   a standard certificate (which may also contain extensions). There are
   no new data structures required.

   Note 1. This scheme does not make use of any of the X.509 v3
   extensions as it must be able to work even for version 1
   certificates. The presence of the KeyIdentifier extension would make
   for efficiency improvements.

   Note 2. While the scheme could be generalized to cover cases where
   the CA updates its key pair more than once during the validity period
   of one of its end entities' certificates, this generalization seems
   of dubious value. Not having this generalization simply means that
   the validity periods of certificates issued with the old CA key pair
   cannot exceed the end of the OldWithNew validity period.

   Note 3. This scheme ensures that end entities will acquire the new CA
   public key, at the latest by the expiry of the last certificate they
   owned that was signed with the old CA private key (via the
   "out-of-band" means).  Certificate and/or key update operations
   occurring at other times do not necessarily require this (depending



Adams, et al.           Expires August 12, 2004                [Page 21]

Internet-Draft                    CMP                      February 2004


   on the end entity's equipment).

4.4.1 CA Operator Actions

   To change the key of the CA, the CA operator does the following:

   1.  Generate a new key pair;

   2.  Create a certificate containing the old CA public key signed with
       the new private key (the "old with new" certificate);

   3.  Create a certificate containing the new CA public key signed with
       the old private key (the "new with old" certificate);

   4.  Create a certificate containing the new CA public key signed with
       the new private key (the "new with new" certificate);

   5.  Publish these new certificates via the repository and/or other
       means (perhaps using a CAKeyUpdAnn message);

   6.  Export the new CA public key so that end entities may acquire it
       using the "out-of-band" mechanism (if required).

   The old CA private key is then no longer required. The old CA public
   key will however remain in use for some time. The time when the old
   CA public key is no longer required (other than for non-repudiation)
   will be when all end entities of this CA have securely acquired the
   new CA public key.

   The "old with new" certificate must have a validity period starting
   at the generation time of the old key pair and ending at the expiry
   date of the old public key.

   The "new with old" certificate must have a validity period starting
   at the generation time of the new key pair and ending at the time by
   which all end entities of this CA will securely possess the new CA
   public key (at the latest, the expiry date of the old public key).

   The "new with new" certificate must have a validity period starting
   at the generation time of the new key pair and ending at or before
   the time by which the CA will next update its key pair.

4.4.2 Verifying Certificates

   Normally when verifying a signature, the verifier verifies (among
   other things) the certificate containing the public key of the
   signer. However, once a CA is allowed to update its key there are a
   range of new possibilities. These are shown in the table below.



Adams, et al.           Expires August 12, 2004                [Page 22]

Internet-Draft                    CMP                      February 2004


                Repository contains NEW     Repository contains only OLD
                  and OLD public keys        public key (due to, e.g.,
                                              delay in publication)

                   PSE      PSE Contains  PSE Contains    PSE Contains
                Contains     OLD public    NEW public      OLD public
               NEW public       key            key            key
                   key

    Signer's   Case 1:      Case 3:       Case 5:        Case 7:
    certifi-   This is      In this case  Although the   In this case
    cate is    the          the verifier  CA operator    the CA
    protected  standard     must access   has not        operator  has
    using NEW  case where   the           updated the    not updated
    public     the          repository in repository the the repository
    key        verifier     order to get  verifier can   and so the
               can          the value of  verify the     verification
               directly     the NEW       certificate    will FAIL
               verify the   public key    directly -
               certificate                this is thus
               without                    the same as
               using the                  case 1.
               repository

    Signer's   Case 2:      Case 4:       Case 6:        Case 8:
    certifi-   In this      In this case  The verifier   Although the
    cate is    case the     the verifier  thinks this    CA operator
    protected  verifier     can directly  is the         has not
    using OLD  must         verify the    situation of   updated the
    public     access the   certificate   case 2 and     repository the
    key        repository   without       will access    verifier can
               in order     using the     the            verify the
               to get the   repository    repository;    certificate
               value of                   however, the   directly -
               the OLD                    verification   this is thus
               public key                 will FAIL      the same as
                                                         case 4.


4.4.2.1 Verification in Cases 1, 4, 5 and 8

   In these cases the verifier has a local copy of the CA public key
   which can be used to verify the certificate directly. This is the
   same as the situation where no key change has occurred.

   Note that case 8 may arise between the time when the CA operator has
   generated the new key pair and the time when the CA operator stores
   the updated attributes in the repository. Case 5 can only arise if



Adams, et al.           Expires August 12, 2004                [Page 23]

Internet-Draft                    CMP                      February 2004


   the CA operator has issued both the signer's and verifier's
   certificates during this "gap" (the CA operator SHOULD avoid this as
   it leads to the failure cases described below)

4.4.2.2 Verification in Case 2

   In case 2 the verifier must get access to the old public key of the
   CA. The verifier does the following:

   1.  Look up the caCertificate attribute in the repository and pick
       the OldWithNew certificate (determined based on validity periods;
       note that the subject and issuer fields must match);

   2.  Verify that this is correct using the new CA key (which the
       verifier has locally);

   3.  If correct, check the signer's certificate using the old CA key.

   Case 2 will arise when the CA operator has issued the signer's
   certificate, then changed key and then issued the verifier's
   certificate, so it is quite a typical case.

4.4.2.3 Verification in Case 3

   In case 3 the verifier must get access to the new public key of the
   CA. The verifier does the following:

   1.  Look up the CACertificate attribute in the repository and pick
       the NewWithOld certificate (determined based on validity periods;
       note that the subject and issuer fields must match);

   2.  Verify that this is correct using the old CA key (which the
       verifier has stored locally);

   3.  If correct, check the signer's certificate using the new CA key.

   Case 3 will arise when the CA operator has issued the verifier's
   certificate, then changed key and then issued the signer's
   certificate, so it is also quite a typical case.

4.4.2.4 Failure of Verification in Case 6

   In this case the CA has issued the verifier's PSE containing the new
   key without updating the repository attributes. This means that the
   verifier has no means to get a trustworthy version of the CA's old
   key and so verification fails.

   Note that the failure is the CA operator's fault.



Adams, et al.           Expires August 12, 2004                [Page 24]

Internet-Draft                    CMP                      February 2004


4.4.2.5 Failure of Verification in Case 7

   In this case the CA has issued the signer's certificate protected
   with the new key without updating the repository attributes. This
   means that the verifier has no means to get a trustworthy version of
   the CA's new key and so verification fails.

   Note that the failure is again the CA operator's fault.

4.4.3 Revocation - Change of CA Key

   As we saw above the verification of a certificate becomes more
   complex once the CA is allowed to change its key. This is also true
   for revocation checks as the CA may have signed the CRL using a newer
   private key than the one that is within the user's PSE.

   The analysis of the alternatives is as for certificate verification.


































Adams, et al.           Expires August 12, 2004                [Page 25]

Internet-Draft                    CMP                      February 2004


5. Data Structures

   This section contains descriptions of the data structures required
   for PKI management messages. Section 6 describes constraints on their
   values and the sequence of events for each of the various PKI
   management operations.

5.1 Overall PKI Message

   All of the messages used in this specification for the purposes of
   PKI management use the following structure:

      PKIMessage ::= SEQUENCE {
         header           PKIHeader,
         body             PKIBody,
         protection   [0] PKIProtection OPTIONAL,
         extraCerts   [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
                          OPTIONAL
     }
     PKIMessages ::= SEQUENCE SIZE (1..MAX) OF PKIMessage

   The PKIHeader contains information which is common to many PKI
   messages.

   The PKIBody contains message-specific information.

   The PKIProtection, when used, contains bits that protect the PKI
   message.

   The extraCerts field can contain certificates that may be useful to
   the recipient. For example, this can be used by a CA or RA to present
   an end entity with certificates that it needs to verify its own new
   certificate (if, for example, the CA that issued the end entity's
   certificate is not a root CA for the end entity).  Note that this
   field does not necessarily contain a certification path - the
   recipient may have to sort, select from, or otherwise process the
   extra certificates in order to use them.

5.1.1 PKI Message Header

   All PKI messages require some header information for addressing and
   transaction identification. Some of this information will also be
   present in a transport-specific envelope; however, if the PKI message
   is protected then this information is also protected (i.e., we make
   no assumption about secure transport).

   The following data structure is used to contain this information:




Adams, et al.           Expires August 12, 2004                [Page 26]

Internet-Draft                    CMP                      February 2004


     PKIHeader ::= SEQUENCE {
         pvno                INTEGER     { cmp1999(1), cmp2000(2) },
         sender              GeneralName,
         recipient           GeneralName,
         messageTime     [0] GeneralizedTime         OPTIONAL,
         protectionAlg   [1] AlgorithmIdentifier     OPTIONAL,
         senderKID       [2] KeyIdentifier           OPTIONAL,
         recipKID        [3] KeyIdentifier           OPTIONAL,
         transactionID   [4] OCTET STRING            OPTIONAL,
         senderNonce     [5] OCTET STRING            OPTIONAL,
         recipNonce      [6] OCTET STRING            OPTIONAL,
         freeText        [7] PKIFreeText             OPTIONAL,
         generalInfo     [8] SEQUENCE SIZE (1..MAX) OF
                             InfoTypeAndValue     OPTIONAL
     }
     PKIFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String

   The pvno field is fixed (at 2) for this version of this
   specification.

   The sender field contains the name of the sender of the PKIMessage.
   This name (in conjunction with senderKID, if supplied) should be
   sufficient to indicate the key to use to verify the protection on the
   message.  If nothing about the sender is known to the sending entity
   (e.g., in the init. req. message, where the end entity may not know
   its own Distinguished Name (DN), e-mail name, IP address, etc.), then
   the "sender" field MUST contain a "NULL" value; that is, the SEQUENCE
   OF relative distinguished names is of zero length. In such a case the
   senderKID field MUST hold an identifier (i.e., a reference number)
   which indicates to the receiver the appropriate shared secret
   information to use to verify the message.

   The recipient field contains the name of the recipient of the
   PKIMessage. This name (in conjunction with recipKID, if supplied)
   should be usable to verify the protection on the message.

   The protectionAlg field specifies the algorithm used to protect the
   message. If no protection bits are supplied (note that PKIProtection
   is OPTIONAL) then this field MUST be omitted; if protection bits are
   supplied then this field MUST be supplied.

   senderKID and recipKID are usable to indicate which keys have been
   used to protect the message (recipKID will normally only be required
   where protection of the message uses Diffie-Hellman (DH) keys).
   These fields MUST be used if required to uniquely identify a key
   (e.g., if more than one key is associated with a given sender name)
   and SHOULD be omitted otherwise.




Adams, et al.           Expires August 12, 2004                [Page 27]

Internet-Draft                    CMP                      February 2004


   The transactionID field within the message header is to be used to
   allow the recipient of a message to correlate this with an ongoing
   transaction. This is needed for all transactions that consist of more
   than just a single request/response pair. For transactions that
   consist of a single request/response pair the rules are as follows.
   A client MAY populate the transactionID field of the request. If a
   server receives such a request which has the transactionID field set,
   then it MUST set the transactionID field of the response to the same
   value; if a server receives such request with a missing transactionID
   field then it MAY set transactionID field of the response.

   For transactions that consist of more than just a single request/
   response pair the rules are as follows.  Clients SHOULD generate a
   transactionID for the first request. If a server receives such a
   request which has the transactionID field set, then it MUST set the
   transactionID field of the response to the same value; if a server
   receives such request with a missing transactionID field then it MUST
   populate transactionID field of the response with a server-generated
   ID. Subsequent requests and responses MUST all set the transactionID
   field to the thus established value. In all cases where a
   transactionID is being used, a given client MUST NOT have more than
   one transaction with the same transactionID in progress at any time
   (to a given server). Servers are free to require uniqueness of the
   transactionID or not, as long as they are able to correctly associate
   messages with the corresponding transaction. Typically this means
   that a server will require the {client, transactionID} tuple to be
   unique, or even the transactionID alone to be unique if it cannot
   distinguish clients based on transport level information. A server
   receiving the first message of a transaction (which requires more
   than a single request/response pair) that contains a transactionID
   that does not allow it to meet the above constraints (typically
   because the transactionID is already in use) MUST send back an
   ErrorMsgContent with a PKIFailureInfo of transactionIdInUse. It is
   RECOMMENDED that the clients fill the transactionID field with 128
   bits of (pseudo-) random data for the start of a transaction to
   reduce the probability of having the transactionID in use at the
   server.

   The senderNonce and recipNonce fields protect the PKIMessage against
   replay attacks.  The senderNonce will typically be 128 bits of
   (pseudo-) random data generated by the sender, whereas the recipNonce
   is copied from the senderNonce of the previous message in the
   transaction.

   The messageTime field contains the time at which the sender created
   the message. This may be useful to allow end entities to correct/
   check their local time for consistency with the time on a central
   system.



Adams, et al.           Expires August 12, 2004                [Page 28]

Internet-Draft                    CMP                      February 2004


   The freeText field may be used to send a human-readable message to
   the recipient (in any number of languages).  The first language used
   in this sequence indicates the desired language for replies.

   The generalInfo field may be used to send machine-processable
   additional data to the recipient.  The following generalInfo
   extensions are defined and MAY be supported.

5.1.1.1 ImplicitConfirm

   This is used by the EE to inform the CA that it does not wish to send
   a certificate confirmation for issued certificates.

         implicitConfirm OBJECT IDENTIFIER ::= {id-it 13}
         ImplicitConfirmValue ::= NULL

   If the CA grants the request to the EE, it MUST put the same
   extension in the PKIHeader of the response.  If the EE does not find
   the extension in the response, it MUST send the certificate
   confirmation.

5.1.1.2 ConfirmWaitTime

   This is used by the CA to inform the EE how long it intends to wait
   for the certificate confirmation before revoking the certificate and
   deleting the transaction.

         confirmWaitTime OBJECT IDENTIFIER ::= {id-it 14}
         ConfirmWaitTimeValue ::= GeneralizedTime


5.1.2 PKI Message Body



















Adams, et al.           Expires August 12, 2004                [Page 29]

Internet-Draft                    CMP                      February 2004


        PKIBody ::= CHOICE {
          ir       [0]  CertReqMessages,       --Initialization Req
          ip       [1]  CertRepMessage,        --Initialization Resp
          cr       [2]  CertReqMessages,       --Certification Req
          cp       [3]  CertRepMessage,        --Certification Resp
          p10cr    [4]  CertificationRequest,  --PKCS #10 Cert. Req.
          popdecc  [5]  POPODecKeyChallContent --pop Challenge
          popdecr  [6]  POPODecKeyRespContent, --pop Response
          kur      [7]  CertReqMessages,       --Key Update Request
          kup      [8]  CertRepMessage,        --Key Update Response
          krr      [9]  CertReqMessages,       --Key Recovery Req
          krp      [10] KeyRecRepContent,      --Key Recovery Resp
          rr       [11] RevReqContent,         --Revocation Request
          rp       [12] RevRepContent,         --Revocation Response
          ccr      [13] CertReqMessages,       --Cross-Cert. Request
          ccp      [14] CertRepMessage,        --Cross-Cert. Resp
          ckuann   [15] CAKeyUpdAnnContent,    --CA Key Update Ann.
          cann     [16] CertAnnContent,        --Certificate Ann.
          rann     [17] RevAnnContent,         --Revocation Ann.
          crlann   [18] CRLAnnContent,         --CRL Announcement
          pkiconf  [19] PKIConfirmContent,     --Confirmation
          nested   [20] NestedMessageContent,  --Nested Message
          genm     [21] GenMsgContent,         --General Message
          genp     [22] GenRepContent,         --General Response
          error    [23] ErrorMsgContent,       --Error Message
          certConf [24] CertConfirmContent,    --Certificate confirm
          pollReq  [25] PollReqContent,        --Polling request
          pollRep  [26] PollRepContent         --Polling response
          }

   The specific types are described in Section Section 5.3 below.

5.1.3 PKI Message Protection

   Some PKI messages will be protected for integrity. (Note that if an
   asymmetric algorithm is used to protect a message and the relevant
   public component has been certified already, then the origin of the
   message can also be authenticated.  On the other hand, if the public
   component is uncertified then the message origin cannot be
   automatically authenticated, but may be authenticated via out-of-band
   means.)

   When protection is applied the following structure is used:

        PKIProtection ::= BIT STRING

   The input to the calculation of PKIProtection is the DER encoding of
   the following data structure:



Adams, et al.           Expires August 12, 2004                [Page 30]

Internet-Draft                    CMP                      February 2004


        ProtectedPart ::= SEQUENCE {
            header    PKIHeader,
            body      PKIBody
        }

   There MAY be cases in which the PKIProtection BIT STRING is
   deliberately not used to protect a message (i.e., this OPTIONAL field
   is omitted) because other protection, external to PKIX, will instead
   be applied. Such a choice is explicitly allowed in this
   specification. Examples of such external protection include PKCS #7
   [PKCS7] and Security Multiparts [RFC1847] encapsulation of the
   PKIMessage (or simply the PKIBody (omitting the CHOICE tag), if the
   relevant PKIHeader information is securely carried in the external
   mechanism). It is noted, however, that many such external mechanisms
   require that the end entity already possesses a public-key
   certificate, and/or a unique Distinguished Name, and/or other such
   infrastructure-related information. Thus, they may not be appropriate
   for initial registration, key-recovery, or any other process with
   "boot-strapping" characteristics. For those cases it may be necessary
   that the PKIProtection parameter be used. In the future, if/when
   external mechanisms are modified to accommodate boot-strapping
   scenarios, the use of PKIProtection may become rare or non-existent.

   Depending on the circumstances the PKIProtection bits may contain a
   Message Authentication Code (MAC) or signature. Only the following
   cases can occur:

5.1.3.1 Shared Secret Information

   In this case the sender and recipient share secret information
   (established via out-of-band means or from a previous PKI management
   operation). PKIProtection will contain a MAC value and the
   protectionAlg will be the following (see also Appendix D.2):

     id-PasswordBasedMac OBJECT IDENTIFIER ::= {1 2 840 113533 7 66 13}
     PBMParameter ::= SEQUENCE {
       salt                OCTET STRING,
       owf                 AlgorithmIdentifier,
       iterationCount      INTEGER,
       mac                 AlgorithmIdentifier
     }

   In the above protectionAlg the salt value is appended to the shared
   secret input. The OWF is then applied iterationCount times, where the
   salted secret is the input to the first iteration and, for each
   successive iteration, the input is set to be the output of the
   previous iteration. The output of the final iteration (called
   "BASEKEY" for ease of reference, with a size of "H") is what is used



Adams, et al.           Expires August 12, 2004                [Page 31]

Internet-Draft                    CMP                      February 2004


   to form the symmetric key. If the MAC algorithm requires a K-bit key
   and K <= H, then the most significant K bits of BASEKEY are used. If
   K > H, then all of BASEKEY is used for the most significant H bits of
   the key, OWF("1" || BASEKEY) is used for the next most significant H
   bits of the key, OWF("2" || BASEKEY) is used for the next most
   significant H bits of the key, and so on, until all K bits have been
   derived. [Here "N" is the ASCII byte encoding the number N and "||"
   represents concatenation.]

   Note: it is RECOMMENDED that the fields of PBMParameter remain
   constant throughout the messages of a single transaction (e.g., ir/
   ip/certConf/pkiConf) in order to reduce the overhead associated with
   PasswordBasedMac computation).

5.1.3.2 DH Key Pairs

   Where the sender and receiver possess Diffie-Hellman certificates
   with compatible DH parameters, then in order to protect the message
   the end entity must generate a symmetric key based on its private DH
   key value and the DH public key of the recipient of the PKI message.
   PKIProtection will contain a MAC value keyed with this derived
   symmetric key and the protectionAlg will be the following:

        id-DHBasedMac OBJECT IDENTIFIER ::= {1 2 840 113533 7 66 30}

        DHBMParameter ::= SEQUENCE {
            owf                 AlgorithmIdentifier,
            -- AlgId for a One-Way Function (SHA-1 recommended)
            mac                 AlgorithmIdentifier
            -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
        }   -- or HMAC [RFC2104, RFC2202])

   In the above protectionAlg OWF is applied to the result of the
   Diffie-Hellman computation. The OWF output (called "BASEKEY" for ease
   of reference, with a size of "H") is what is used to form the
   symmetric key. If the MAC algorithm requires a K-bit key and K <= H,
   then the most significant K bits of BASEKEY are used. If K > H, then
   all of BASEKEY is used for the most significant H bits of the key,
   OWF("1" || BASEKEY) is used for the next most significant H bits of
   the key, OWF("2" || BASEKEY) is used for the next most significant H
   bits of the key, and so on, until all K bits have been derived. [Here
   "N" is the ASCII byte encoding the number N and "||" represents
   concatenation.]

5.1.3.3 Signature

   In this case the sender possesses a signature key pair and simply
   signs the PKI message. PKIProtection will contain the signature value



Adams, et al.           Expires August 12, 2004                [Page 32]

Internet-Draft                    CMP                      February 2004


   and the protectionAlg will be an AlgorithmIdentifier for a digital
   signature (e.g., md5WithRSAEncryption or dsaWithSha-1).

5.1.3.4 Multiple Protection

   In cases where an end entity sends a protected PKI message to an RA,
   the RA MAY forward that message to a CA, attaching its own protection
   (which MAY be a MAC or a signature, depending on the information and
   certificates shared between the RA and the CA). This is accomplished
   by nesting the entire message sent by the end entity within a new PKI
   message. The structure used is as follows.

          NestedMessageContent ::= PKIMessages

   (The use of PKIMessages, a SEQUENCE OF PKIMessage, lets the RA batch
   the requests of several EEs in a single new message. For simplicity,
   all messages in the batch MUST be of the same type (e.g., ir)). If
   the RA wishes to modify the message(s) in some way (e.g., add
   particular field values or new extensions), then it MAY create its
   own desired PKIBody. The original PKIMessage from the EE MAY be
   included in the generalInfo field of PKIHeader (to accommodate, for
   example, cases in which the CA wishes to check POP or other
   information on the original EE message). The infoType to be used in
   this situation is {id-it 15} (see Section 5.3.19 for the value of
   id-it) and the infoValue is PKIMessages (contents MUST be in the same
   order as the requests in PKIBody).

5.2 Common Data Structures

   Before specifying the specific types that may be placed in a PKIBody
   we define some data structures that are used in more than one case.

5.2.1 Requested Certificate Contents

   Various PKI management messages require that the originator of the
   message indicate some of the fields that are required to be present
   in a certificate. The CertTemplate structure allows an end entity or
   RA to specify as much as it wishes about the certificate it requires.
   CertTemplate is identical to a Certificate but with all fields
   optional.

   Note that even if the originator completely specifies the contents of
   a certificate it requires, a CA is free to modify fields within the
   certificate actually issued. If the modified certificate is
   unacceptable to the requester, the requester MUST send back a
   certConf message which either does not include this certificate (via
   a CertHash), or does include this certificate (via a CertHash) along
   with a status of "rejected". See Section 5.3.18 for the definition



Adams, et al.           Expires August 12, 2004                [Page 33]

Internet-Draft                    CMP                      February 2004


   and use of CertHash and the certConf message.

   See Appendix C and [CRMF] for CertTemplate syntax.

5.2.2 Encrypted Values

   Where encrypted values (restricted, in this specification, to be
   either private keys or certificates) are sent in PKI messages the
   EncryptedValue data structure is used.

   See [CRMF] for EncryptedValue syntax.

   Use of this data structure requires that the creator and intended
   recipient respectively be able to encrypt and decrypt. Typically,
   this will mean that the sender and recipient have, or are able to
   generate, a shared secret key.

   If the recipient of the PKIMessage already possesses a private key
   usable for decryption, then the encSymmKey field MAY contain a
   session key encrypted using the recipient's public key.

5.2.3 Status codes and Failure Information for PKI Messages

   All response messages will include some status information. The
   following values are defined.

        PKIStatus ::= INTEGER {
            accepted               (0),
            grantedWithMods        (1),
            rejection              (2),
            waiting                (3),
            revocationWarning      (4),
            revocationNotification (5),
            keyUpdateWarning       (6)
        }

   Responders may use the following syntax to provide more information
   about failure cases.













Adams, et al.           Expires August 12, 2004                [Page 34]

Internet-Draft                    CMP                      February 2004


        PKIFailureInfo ::= BIT STRING {
            badAlg              (0),
            badMessageCheck     (1),
            badRequest          (2),
            badTime             (3),
            badCertId           (4),
            badDataFormat       (5),
            wrongAuthority      (6),
            incorrectData       (7),
            missingTimeStamp    (8),
            badPOP              (9),
            certRevoked         (10),
            certConfirmed       (11),
            wrongIntegrity      (12),
            badRecipientNonce   (13),
            timeNotAvailable    (14),
            unacceptedPolicy    (15),
            unacceptedExtension (16),
            addInfoNotAvailable (17),
            badSenderNonce      (18),
            badCertTemplate     (19),
            signerNotTrusted    (20),
            transactionIdInUse  (21),
            unsupportedVersion  (22),
            notAuthorized       (23),
            systemUnavail       (24),
            systemFailure       (25),
            duplicateCertReq    (26)
        }

        PKIStatusInfo ::= SEQUENCE {
            status        PKIStatus,
            statusString  PKIFreeText     OPTIONAL,
            failInfo      PKIFailureInfo  OPTIONAL
        }


5.2.4 Certificate Identification

   In order to identify particular certificates the CertId data
   structure is used.

   See [CRMF] for CertId syntax.

5.2.5 Out-of-band root CA Public Key

   Each root CA must be able to publish its current public key via some
   "out-of-band" means. While such mechanisms are beyond the scope of



Adams, et al.           Expires August 12, 2004                [Page 35]

Internet-Draft                    CMP                      February 2004


   this document, we define data structures which can support such
   mechanisms.

   There are generally two methods available: either the CA directly
   publishes its self-signed certificate; or this information is
   available via the Directory (or equivalent) and the CA publishes a
   hash of this value to allow verification of its integrity before use.

        OOBCert ::= Certificate

   The fields within this certificate are restricted as follows:

   o  The certificate MUST be self-signed (i.e., the signature must be
      verifiable using the SubjectPublicKeyInfo field);

   o  The subject and issuer fields MUST be identical;

   o  If the subject field is NULL then both subjectAltNames and
      issuerAltNames extensions MUST be present and have exactly the
      same value;

   o  The values of all other extensions must be suitable for a self-
      signed certificate (e.g., key identifiers for subject and issuer
      must be the same).


        OOBCertHash ::= SEQUENCE {
            hashAlg     [0] AlgorithmIdentifier     OPTIONAL,
            certId      [1] CertId                  OPTIONAL,
            hashVal         BIT STRING
        }

   The intention of the hash value is that anyone who has securely
   received the hash value (via the out-of-band means) can verify a
   self-signed certificate for that CA.

5.2.6 Archive Options

   Requesters may indicate that they wish the PKI to archive a private
   key value using the PKIArchiveOptions structure.

   See [CRMF] for PKIArchiveOptions syntax.

5.2.7 Publication Information

   Requesters may indicate that they wish the PKI to publish a
   certificate using the PKIPublicationInfo structure.




Adams, et al.           Expires August 12, 2004                [Page 36]

Internet-Draft                    CMP                      February 2004


   See [CRMF] for PKIPublicationInfo syntax.

5.2.8 Proof-of-Possession Structures

   If the certification request is for a signing key pair (i.e., a
   request for a verification certificate), then the proof of possession
   of the private signing key is demonstrated through use of the
   POPOSigningKey structure.

   See Appendix C and [CRMF] for POPOSigningKey syntax, but note that
   POPOSigningKeyInput has the following semantic stipulations in this
   specification.

        POPOSigningKeyInput ::= SEQUENCE {
            authInfo            CHOICE {
                sender              [0] GeneralName,
                publicKeyMAC            PKMACValue
            },
            publicKey           SubjectPublicKeyInfo
        }

   On the other hand, if the certification request is for an encryption
   key pair (i.e., a request for an encryption certificate), then the
   proof of possession of the private decryption key may be demonstrated
   in one of three ways.

5.2.8.1 Inclusion of the Private Key

   By the inclusion of the private key (encrypted) in the CertRequest
   (in the thisMessage field of POPOPrivKey (see Appendix C) or in the
   PKIArchiveOptions control structure, depending upon whether or not
   archival of the private key is also desired).

5.2.8.2 Indirect Method

   By having the CA return not the certificate, but an encrypted
   certificate (i.e., the certificate encrypted under a randomly-
   generated symmetric key, and the symmetric key encrypted under the
   public key for which the certification request is being made) -- this
   is the "indirect" method mentioned previously in Section 4.3.2. The
   end entity proves knowledge of the private decryption key to the CA
   by providing the correct CertHash for this certificate in the
   certConf message. This demonstrates POP because the EE can only
   compute the correct CertHash if it is able to recover the
   certificate, and it can only recover the certificate if it is able to
   decrypt the symmetric key using the required private key. Clearly,
   for this to work, the CA MUST NOT publish the certificate until the
   certConf message arrives (when certHash is to be used to demonstrate



Adams, et al.           Expires August 12, 2004                [Page 37]

Internet-Draft                    CMP                      February 2004


   POP). See Section 5.3.18 for further details.

5.2.8.3 Challenge-Response Protocol

   By having the end entity engage in a challenge-response protocol
   (using the messages POPODecKeyChall and POPODecKeyResp; see below)
   between CertReqMessages and CertRepMessage -- this is the "direct"
   method mentioned previously in Section 4.3.2 [This method would
   typically be used in an environment in which an RA verifies POP and
   then makes a certification request to the CA on behalf of the end
   entity. In such a scenario, the CA trusts the RA to have done POP
   correctly before the RA requests a certificate for the end entity.]
   The complete protocol then looks as follows (note that req' does not
   necessarily encapsulate req as a nested message):

                   EE            RA            CA
                    ---- req ---->
                    <--- chall ---
                    ---- resp --->
                                  ---- req' --->
                                  <--- rep -----
                                  ---- conf --->
                                  <--- ack -----
                    <--- rep -----
                    ---- conf --->
                    <--- ack -----

   This protocol is obviously much longer than the 3-way exchange given
   in choice (2) above, but allows a local Registration Authority to be
   involved and has the property that the certificate itself is not
   actually created until the proof of possession is complete.  In some
   environments a different order of the above messages may be required,
   such as the following (this may be determined by policy):

                   EE            RA            CA
                    ---- req ---->
                    <--- chall ---
                    ---- resp --->
                                  ---- req' --->
                                  <--- rep -----
                    <--- rep -----
                    ---- conf --->
                                  ---- conf --->
                                  <--- ack -----
                    <--- ack -----

   If the cert. request is for a key agreement key (KAK) pair, then the
   POP can use any of the 3 ways described above for enc. key pairs,



Adams, et al.           Expires August 12, 2004                [Page 38]

Internet-Draft                    CMP                      February 2004


   with the following changes: (1) the parenthetical text of bullet 2)
   is replaced with "(i.e., the certificate encrypted under the
   symmetric key derived from the CA's private KAK and the public key
   for which the certification request is being made)"; (2) the first
   parenthetical text of the challenge field of "Challenge" below is
   replaced with "(using PreferredSymmAlg (see Section 5.3.19.4 and
   Appendix E.5) and a symmetric key derived from the CA's private KAK
   and the public key for which the certification request is being
   made)". Alternatively, the POP can use the POPOSigningKey structure
   given in [CRMF] (where the alg field is DHBasedMAC and the signature
   field is the MAC) as a fourth alternative for demonstrating POP if
   the CA already has a D-H certificate that is known to the EE.

   The challenge-response messages for proof of possession of a private
   decryption key are specified as follows (see [MvOV97], p.404 for
   details). Note that this challenge-response exchange is associated
   with the preceding cert. request message (and subsequent cert.
   response and confirmation messages) by the transactionID used in the
   PKIHeader and by the protection (MACing or signing) applied to the
   PKIMessage.

        POPODecKeyChallContent ::= SEQUENCE OF Challenge
        Challenge ::= SEQUENCE {
            owf                 AlgorithmIdentifier  OPTIONAL,
            witness             OCTET STRING,
            challenge           OCTET STRING
        }

   Note that the size of Rand needs to be appropriate for encryption
   under the public key of the requester.  Given that "int" will
   typically not be longer than 64 bits, this leaves well over 100 bytes
   of room for the "sender" field when the modulus is 1024 bits.  If, in
   some environment, names are so long that they cannot fit (e.g., very
   long DNs), then whatever portion will fit should be used (as long as
   it includes at least the common name, and as long as the receiver is
   able to deal meaningfully with the abbreviation).

        POPODecKeyRespContent ::= SEQUENCE OF INTEGER


5.2.8.4 Summary of PoP Options

   The text in this section provides several options with respect to POP
   techniques.  Using "SK" for "signing key", "EK" for "encryption key",
   and "KAK" for "key agreement key", the techniques may be summarized
   as follows:





Adams, et al.           Expires August 12, 2004                [Page 39]

Internet-Draft                    CMP                      February 2004


         RAVerified;
         SKPOP;
         EKPOPThisMessage;
         KAKPOPThisMessage;
         KAKPOPThisMessageDHMAC;
         EKPOPEncryptedCert;
         KAKPOPEncryptedCert;
         EKPOPChallengeResp; and
         KAKPOPChallengeResp.

   Given this array of options, it is natural to ask how an end entity
   can know what is supported by the CA/RA (i.e., which options it may
   use when requesting certificates).  The following guidelines should
   clarify this situation for EE implementers.

   RAVerified.  This is not an EE decision; the RA uses this if and only
   if it has verified POP before forwarding the request on to the CA, so
   it is not possible for the EE to choose this technique.

   SKPOP.  If the EE has a signing key pair, this is the only POP method
   specified for use in the request for a corresponding certificate.

   EKPOPThisMessage and KAKPOPThisMessage.  It is an EE decision whether
   or not to give up its private key to the CA/RA.  If the EE decides to
   reveal its key, then these are the only POP methods available in this
   specification to achieve this (and the key pair type will determine
   which of these two methods to use).

   KAKPOPThisMessageDHMAC.  The EE can only use this method if (1) the
   CA has a DH certificate available for this purpose, and (2) the EE
   already has a copy of this certificate.  If both these conditions
   hold, then this technique is clearly supported and may be used by the
   EE, if desired.

   EKPOPEncryptedCert, KAKPOPEncryptedCert, EKPOPChallengeResp,
   KAKPOPChallengeResp.  The EE picks one of these (in the
   subsequentMessage field) in the request message, depending upon
   preference and key pair type.  The EE is not doing POP at this point;
   it is simply indicating which method it wants to use. Therefore, if
   the CA/RA replies with a "badPOP" error, the EE can re-request using
   the other POP method chosen in subsequentMessage.  Note, however,
   that this specification encourages the use of the EncryptedCert
   choice and, furthermore, says that the challenge-response would
   typically be used when an RA is involved and doing POP verification.
   Thus, the EE should be able to make an intelligent decision regarding
   which of these POP methods to choose in the request message.





Adams, et al.           Expires August 12, 2004                [Page 40]

Internet-Draft                    CMP                      February 2004


5.3 Operation-Specific Data Structures

5.3.1 Initialization Request

   An Initialization request message contains as the PKIBody a
   CertReqMessages data structure which specifies the requested
   certificate(s).  Typically, SubjectPublicKeyInfo, KeyId, and Validity
   are the template fields which may be supplied for each certificate
   requested (see Appendix D profiles for further information).  This
   message is intended to be used for entities first initializing into
   the PKI.

   See Appendix C and [CRMF] for CertReqMessages syntax.

5.3.2 Initialization Response

   An Initialization response message contains as the PKIBody an
   CertRepMessage data structure which has for each certificate
   requested a PKIStatusInfo field, a subject certificate, and possibly
   a private key (normally encrypted with a session key, which is itself
   encrypted with the protocolEncrKey).

   See Section 5.3.4 for CertRepMessage syntax. Note that if the PKI
   Message Protection is "shared secret information" (see Section
   5.1.3), then any certificate transported in the caPubs field may be
   directly trusted as a root CA certificate by the initiator.

5.3.3 Certification Request

   A Certification request message contains as the PKIBody a
   CertReqMessages data structure which specifies the requested
   certificates.  This message is intended to be used for existing PKI
   entities who wish to obtain additional certificates.

   See Appendix C and [CRMF] for CertReqMessages syntax.

   Alternatively, the PKIBody MAY be a CertificationRequest (this
   structure is fully specified by the ASN.1 structure
   CertificationRequest given in [PKCS10]). This structure may be
   required for certificate requests for signing key pairs when
   interoperation with legacy systems is desired, but its use is
   strongly discouraged whenever not absolutely necessary.

5.3.4 Certification Response

   A Certification response message contains as the PKIBody a
   CertRepMessage data structure which has a status value for each
   certificate requested, and optionally has a CA public key, failure



Adams, et al.           Expires August 12, 2004                [Page 41]

Internet-Draft                    CMP                      February 2004


   information, a subject certificate, and an encrypted private key.

     CertRepMessage ::= SEQUENCE {
         caPubs          [1] SEQUENCE SIZE (1..MAX) OF Certificate
                             OPTIONAL,
         response            SEQUENCE OF CertResponse
     }

     CertResponse ::= SEQUENCE {
         certReqId           INTEGER,
         status              PKIStatusInfo,
         certifiedKeyPair    CertifiedKeyPair    OPTIONAL,
         rspInfo             OCTET STRING        OPTIONAL
         -- analogous to the id-regInfo-utf8Pairs string defined
         -- for regInfo in CertReqMsg [CRMF]
     }

     CertifiedKeyPair ::= SEQUENCE {
         certOrEncCert       CertOrEncCert,
         privateKey      [0] EncryptedValue      OPTIONAL,
         -- see [CRMF] for comment on encoding
         publicationInfo [1] PKIPublicationInfo  OPTIONAL
     }

     CertOrEncCert ::= CHOICE {
         certificate     [0] Certificate,
         encryptedCert   [1] EncryptedValue
     }

   Only one of the failInfo (in PKIStatusInfo) and certificate (in
   CertifiedKeyPair) fields can be present in each CertResponse
   (depending on the status). For some status values (e.g., waiting)
   neither of the optional fields will be present.

   Given an EncryptedCert and the relevant decryption key the
   certificate may be obtained. The purpose of this is to allow a CA to
   return the value of a certificate, but with the constraint that only
   the intended recipient can obtain the actual certificate. The benefit
   of this approach is that a CA may reply with a certificate even in
   the absence of a proof that the requester is the end entity which can
   use the relevant private key (note that the proof is not obtained
   until the certConf message is received by the CA). Thus the CA will
   not have to revoke that certificate in the event that something goes
   wrong with the proof of possession (but MAY do so anyway, depending
   upon policy).






Adams, et al.           Expires August 12, 2004                [Page 42]

Internet-Draft                    CMP                      February 2004


5.3.5 Key Update Request Content

   For key update requests the CertReqMessages syntax is used.
   Typically, SubjectPublicKeyInfo, KeyId, and Validity are the template
   fields which may be supplied for each key to be updated.  This
   message is intended to be used to request updates to existing (non-
   revoked and non-expired) certificates (therefore, it is sometimes
   referred to as a "Certificate Update" operation).  An update is a
   replacement certificate containing either a new subject public key or
   the current subject public key (although the latter practice may not
   be appropriate for some environments).

   See Appendix C and [CRMF] for CertReqMessages syntax.

5.3.6 Key Update Response Content

   For key update responses the CertRepMessage syntax is used.  The
   response is identical to the initialization response.

   See Section 5.3.4 for CertRepMessage syntax.

5.3.7 Key Recovery Request Content

   For key recovery requests the syntax used is identical to the
   initialization request CertReqMessages.  Typically,
   SubjectPublicKeyInfo and KeyId are the template fields which may be
   used to supply a signature public key for which a certificate is
   required (see Appendix D profiles for further information).

   See Appendix C and [CRMF] for CertReqMessages syntax. Note that if a
   key history is required, the requester must supply a Protocol
   Encryption Key control in the request message.

5.3.8 Key Recovery Response Content

   For key recovery responses the following syntax is used.  For some
   status values (e.g., waiting) none of the optional fields will be
   present.

    KeyRecRepContent ::= SEQUENCE {
        status          PKIStatusInfo,
        newSigCert  [0] Certificate                   OPTIONAL,
        caCerts     [1] SEQUENCE SIZE (1..MAX) OF
                                     Certificate      OPTIONAL,
        keyPairHist [2] SEQUENCE SIZE (1..MAX) OF
                                     CertifiedKeyPair OPTIONAL
    }




Adams, et al.           Expires August 12, 2004                [Page 43]

Internet-Draft                    CMP                      February 2004


5.3.9 Revocation Request Content

   When requesting revocation of a certificate (or several certificates)
   the following data structure is used. The name of the requester is
   present in the PKIHeader structure.

    RevReqContent ::= SEQUENCE OF RevDetails

    RevDetails ::= SEQUENCE {
        certDetails         CertTemplate,
        crlEntryDetails     Extensions       OPTIONAL
    }


5.3.10 Revocation Response Content

   The response to the above message. If produced, this is sent to the
   requester of the revocation. (A separate revocation announcement
   message MAY be sent to the subject of the certificate for which
   revocation was requested.)

     RevRepContent ::= SEQUENCE {
         status        SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
         revCerts  [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
         crls      [1] SEQUENCE SIZE (1..MAX) OF CertificateList
                       OPTIONAL
     }


5.3.11 Cross Certification Request Content

   Cross certification requests use the same syntax (CertReqMessages) as
   for normal certification requests with the restriction that the key
   pair MUST have been generated by the requesting CA and the private
   key MUST NOT be sent to the responding CA.  This request MAY also be
   used by subordinate CAs to get their certificates signed by the
   parent CA.

   See Appendix C and [CRMF] for CertReqMessages syntax.

5.3.12 Cross Certification Response Content

   Cross certification responses use the same syntax (CertRepMessage) as
   for normal certification responses with the restriction that no
   encrypted private key can be sent.

   See Section 5.3.4 for CertRepMessage syntax.




Adams, et al.           Expires August 12, 2004                [Page 44]

Internet-Draft                    CMP                      February 2004


5.3.13 CA Key Update Announcement Content

   When a CA updates its own key pair the following data structure MAY
   be used to announce this event.

    CAKeyUpdAnnContent ::= SEQUENCE {
       oldWithNew         Certificate,
       newWithOld         Certificate,
       newWithNew         Certificate
    }


5.3.14 Certificate Announcement

   This structure MAY be us