home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_j_p / draft-ietf-pkix-ipki3cmp-03.txt < prev    next >
Text File  |  1997-08-02  |  155KB  |  4,242 lines

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