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-02.txt < prev    next >
Text File  |  1997-06-24  |  153KB  |  4,015 lines

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