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-01.txt < prev    next >
Text File  |  1996-12-03  |  108KB  |  2,604 lines

  1. Internet Draft                                          S. Farrell (SSE)
  2. PKIX Working Group                                     C. Adams (Nortel)
  3. draft-ietf-pkix-ipki3cmp-01.txt
  4.  
  5. Expires in 6 months                                        December 1996
  6.  
  7.  
  8. Internet Public Key Infrastructure
  9. Part III: Certificate Management Protocols
  10.  
  11. Status of this Memo 
  12.  
  13.    This document is an Internet-Draft.  Internet-Drafts are working 
  14. documents of the Internet Engineering Task Force (IETF), its areas, and 
  15. its working groups.  Note that other groups may also distribute working 
  16. documents as Internet-Drafts. 
  17.  
  18.    Internet-Drafts are draft documents valid for a maximum of 6 months 
  19. and may be updated, replaced, or obsoleted by other documents at any 
  20. time. It is inappropriate to use Internet- Drafts as reference material 
  21. or to cite them other than as "work in progress." 
  22.  
  23.    To learn the current status of any Internet-Draft, please check the 
  24. "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow 
  25. Directories on ftp.is.co.za(Africa), nic.nordu.net (Europe), 
  26. munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or 
  27. ftp.isi.edu (US West Coast). 
  28.  
  29. Abstract 
  30.  
  31. This is the fourth draft of the Internet Public Key Infrastructure X.509 
  32. Certificate Management Protocols. This version builds on draft-ietf-
  33. pkix-ipki3cmp-01.txt and discussions on the PKIX mailing list (ietf-
  34. pkix@tandem.com) and at the Montreal IETF meeting (June 1996).
  35.  
  36. Summary of changes since the third draft:
  37.  
  38. - New messages defined to ask for general information from a PKI 
  39. management entity (RA/CA).
  40. - New fields added allowing for:
  41.        proof of possession of a private key; 
  42.        request for publication of a certificate; and 
  43.        request for archival of a private key.
  44. - ASN.1 simplifications.
  45. - First concrete definition of what is mandatory for conformance.
  46. - File- and socket-based protocols defined.
  47.  
  48. 1. Introduction
  49. The layout of this draft is as follows:
  50.  
  51. - Section 1 contains an overview of PKI management
  52.  
  53. Farrell, Adams                                               [Page 1]
  54.  
  55.  
  56. INTERNET-DRAFT                                         December 1996
  57.  
  58. - Section 2 contains discussion of assumptions and restrictions
  59. - Section 3 contains data structures used for PKI management messages
  60. - Section 4 defines the functions which are to be carried out in PKI 
  61. management including those which must be supported by conforming 
  62. implementations and those which are optional
  63. - Section 5 describes a simple protocol for transporting PKI messages
  64. 1.1 PKI Management Overview 
  65.  
  66.   The PKI must be structured to be consistent with the types of 
  67. individuals who must administer it.  Providing such administrators with 
  68. unbounded choices not only complicates the software required but also 
  69. increases the chances that a subtle mistake by an administrator or 
  70. software developer will result in broader compromise. Similarly, 
  71. restricting administrators with cumbersome mechanisms will cause them  
  72. not to use the PKI. 
  73.  
  74.   Management protocols are required to support on-line interactions 
  75. between Public Key Infrastructure (PKI) components.  For example, a 
  76. management protocol might be used between a CA and a client system with 
  77. which a key pair is associated, or between two CAs which cross-certify 
  78. each other. 
  79.  
  80. 2.1 PKI Management Model 
  81.  
  82. Before specifying particular message formats and procedures we first 
  83. define the entities involved in PKI management and their interactions 
  84. (in terms of the PKI management functions required).  We then group 
  85. these functions in order to accommodate different identifiable types of 
  86. end entities. 
  87.  
  88. 1.2 Definitions of PKI Entities 
  89.  
  90.   The entities involved in PKI management include the end entity (i.e.  
  91. the entity to be named in the subject field of a certificate) and the 
  92. certification authority (i.e. the entity named in the issuer field of a 
  93. certificate). A registration authority may also be involved in PKI 
  94. management. 
  95.  
  96. 1.2.1 Subjects and End Entities 
  97.  
  98. The term "subject" is used here to refer to the entity named by the 
  99. subject field of a certificate; when we wish to distinguish the tools 
  100. and/or software used by the subject (e.g. a local certificate management 
  101. module) we will use the term "subject equipment". In general, we prefer 
  102. the term "end entity" rather than subject in order to avoid confusion 
  103. with the field name.
  104.  
  105. It is important to note that the end entities here will include not only 
  106. human users of applications, but also applications themselves (e.g. for 
  107. IP security). This factor influences the protocols which the PKI 
  108. management operations use; e.g., applications software is far more 
  109. likely to know exactly which certificate extensions are required than 
  110.  
  111. Farrell, Adams                                              [Page 2]
  112.  
  113.  
  114. INTERNET-DRAFT                                         December 1996
  115.  
  116. are human users. PKI management entities are also end entities in the 
  117. sense that they are sometimes named in the subject field of a 
  118. certificate or cross-certificate. Where appropriate, the term "end- 
  119. entity" will be used to refer to end entities who are not PKI management 
  120. entities. 
  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. The certification authority (CA) may or may not actually be a real 
  139. "third party" from the end entity's point of view. Quite often, the CA 
  140. will actually belong to the same organisation as the end entities it 
  141. supports. 
  142.  
  143. Again, we use the term CA to refer to the entity named in the issuer 
  144. field of a certificate; when it is necessary to distinguish the software 
  145. or hardware tools used by the CA we use the term "CA equipment". 
  146.  
  147. The CA equipment will often include both an "off-line" component and an 
  148. "on-line" component, with the CA private key only available to the "off-
  149. line" component. This is, however, a matter for implementers (though it 
  150. is also relevant as a policy issue).
  151.  
  152. We use the term "root CA" to indicate a CA which is directly trusted 
  153. by an end entity, that is, securely acquiring the value of a root CA 
  154. public key requires some out-of-band step(s). This term does not 
  155. indicate that a root CA is at the top of any hierarchy, simply that the 
  156. CA in question is trusted directly.
  157.  
  158. A subordinate CA is one which is not a root CA for the end entity in 
  159. question. Often, a subordinate CA will not be a root CA for any entity 
  160. but this is not mandatory.
  161. 1.2.3 Registration Authority 
  162. In addition to end entities and CAs, many environments call for the 
  163. existence of a registration authority (RA) separate from the 
  164. certification authority. The functions which the registration authority 
  165. may carry out will vary from case to case but may include personal 
  166. authentication, token distribution, revocation reporting, name 
  167. assignment, key generation, archival of key pairs, et cetera. 
  168.  
  169.  
  170. Farrell, Adams                                              [Page 3]
  171.  
  172. INTERNET-DRAFT                                         December 1996
  173.  
  174. This document views the RA as an optional component - when it is not 
  175. present the CA is assumed to be able to carry out the RA's functions so 
  176. that the PKI management protocols are the same from the end entity's 
  177. point of view. 
  178.  
  179. Again, we distinguish, where necessary, between the RA and the tools 
  180. used (the "RA equipment"). 
  181.  
  182. Note that an RA is itself an end entity. We further assume that all RAs 
  183. are in fact certified end entities and that RA private keys are usable 
  184. for signing. How a particular CA equipment identifies some end entities 
  185. as RAs is an implementation issue (so there is no special RA 
  186. certification operation). We do not mandate that the RA is certified by 
  187. the CA with which it is interacting at the moment (so one RA may work 
  188. with more than one CA whilst only being certified once). 
  189.  
  190. In some circumstances end entities will communicate directly with a CA 
  191. even where an RA is present. For example, for initial registration 
  192. and/or certification the subject may use its RA, but communicate 
  193. directly with the CA in order to refresh its certificate. 
  194.  
  195. 1.3 PKI Management Requirements 
  196.  
  197. The protocols given here meet the following requirements on PKI 
  198. management. 
  199.  
  200. 1. PKI management must conform to ISO 9594-8 and the associated 
  201. amendments (certificate extensions) 
  202.  
  203. 2. PKI management must conform to the other parts of this series. 
  204.  
  205. 3. It must be possible to regularly update any key pair without 
  206. affecting any other key pair.
  207.  
  208. 4. The use of confidentiality in PKI management protocols must be kept 
  209. to a minimum in order to ease regulatory problems.
  210.  
  211. 5. PKI management protocols must allow the use of different industry-
  212. standard cryptographic algorithms, (specifically including, RSA, DSA, 
  213. MD5, SHA-1) -- this means that any given CA, RA, or end entity may, in 
  214. principal, use whichever algorithms suit it for its own key pair(s). 
  215.  
  216. 6. PKI management protocols must not preclude the generation of key 
  217. pairs by the end entity concerned, by an RA, or by a CA -- key 
  218. generation may also occur elsewhere, but for the purposes of PKI 
  219. management we can regard key generation as occurring wherever the key is 
  220. first present at an end entity, RA or CA. 
  221.  
  222. 7. PKI management protocols must support the publication of certificates 
  223. by the end entity concerned, by an RA or by a CA.  Different 
  224. implementations and different environments may choose any of the above 
  225.  
  226. Farrell, Adams                                              [Page 4]
  227.  
  228.  
  229. INTERNET-DRAFT                                         December 1996
  230.  
  231. approaches. 
  232.  
  233. 8. PKI management protocols must support the production of CRLs by 
  234. allowing certified end entities to make requests for the revocation of 
  235. certificates - this must be done in such a way that the denial-of-
  236. service attacks which are possible are not made simpler. 
  237.  
  238. 9. PKI management protocols must be usable over a variety of "transport" 
  239. mechanisms, specifically including mail, http, TCP/IP and ftp. 
  240.  
  241. 10. Final authority for certification creation rests with the CA; no RA 
  242. or end entity equipment should assume that any certificate issued by a 
  243. CA will contain what was requested -- a CA may alter certificate field 
  244. values or may add, delete or alter extensions according to its operating 
  245. policy; the only exception to this is the public key, which the CA may 
  246. not modify (assuming that the CA was presented with the public key 
  247. value). In other words, all PKI entities (end entities, RAs and CAs) 
  248. must be capable of handling responses to requests for certificates in 
  249. which the actual certificate issued is different from that requested -- 
  250. for example, a CA may shorten the validity period requested. 
  251.  
  252. 11. A graceful, scheduled change-over from one non-compromised  CA key 
  253. pair to the next must be supported (CA key update). An end-entity whose 
  254. PSE contains the new CA public key (following a CA key update) must also 
  255. be able to verify certificates verifiable using the old public key. End 
  256. entities who directly trust the old CA key pair must also be able to 
  257. verify certificates signed using the new CA private key.  (Required for 
  258. situations where the old CA public key is "hardwired" into the end 
  259. entity's cryptographic equipment). 
  260.  
  261. 12. The Functions of an RA may, in some implementations or  
  262. environments, be carried out by the CA itself. The protocols must be 
  263. designed so that end entities will use the same protocol regardless of 
  264. whether the communication is with an RA or CA. 
  265.  
  266. 1.4 13. Where an end entity requests a certificate containing a given 
  267. public key value, the end entity must show the ability to use the 
  268. corresponding private key value. This is accomplished in various ways, 
  269. depending on the type of certification request. See the section "Proof 
  270. of Possession of Private Key" for details.
  271.  
  272. 1.5 PKI Management Operations 
  273.  
  274.   The following diagram shows the relationship between the entities 
  275. defined above in terms of the PKI management operations. The letters in 
  276. the diagram indicate "protocols" in the sense that a defined set of PKI 
  277. management messages can be sent along each of the lettered lines. 
  278.  
  279.                 cert. publish        +------------+ 
  280.       +---+           +------------  | End Entity |   Operations 
  281.       | C |           | g            +------------+ 
  282.       | e |  <--------+                | ^      initial 
  283.       | r |                          a | | b     registration/ 
  284.  
  285.  
  286. Farrell, Adams                                              [Page 5]
  287.  
  288. INTERNET-DRAFT                                         December 1996
  289.  
  290.       | t |       PKI "users"          | |       certification 
  291.       |   |                            | |      key pair recovery 
  292.       | / |                            | |      key pair update 
  293.       |   |                            | |      certificate update 
  294.       | C |                            V |      revocation request 
  295.       | R |             -------+-+-----+-+------+-+----- 
  296.       | L |   PKI management   | ^              | ^ 
  297.       |   |      entities    a | | b          a | | b 
  298.       |   |                    V |              | | 
  299.       | R |             g   +------+    d       | | 
  300.       | e |   <------------ | RA   | <-----+    | | 
  301.       | p |      cert.      |      | ----+ |    | | 
  302.       | o |       publish   +------+   c | |    | | 
  303.       | s |                              | |    | | 
  304.       | i |                              V |    V | 
  305.       | t |          h                 +------------+   i 
  306.       | o |   <------------------------| CA         |-------> 
  307.       | r |                            +------------+  "out-of-band" 
  308.       | y |      cert. publish              | ^         publication 
  309.       |   |      CRL publish                | | 
  310.       +---+                                 | |    cross-certification 
  311.                                           e | | f  cross-certificate 
  312.                                             | |       update 
  313.                                             | | 
  314.                                             V | 
  315.                                           +------+ 
  316.                                           | CA-2 | 
  317.                                           +------+ 
  318.  
  319.                            Figure 1 - PKI Entities 
  320.  
  321. At a high level the set of operations for which management messages are 
  322. defined can be grouped as follows.
  323.  
  324. 1 CA establishment: When establishing a new CA, certain steps are 
  325. required (e.g., production of initial CRLs, export of CA public 
  326. key).
  327. 2 End entity initialisation: this includes importing a CA public key 
  328. and requesting information about the options supported by a PKI 
  329. management entity.
  330. 3 Certification: various operations result in the creation of new 
  331. certificates:
  332. 3.1 initial registration/certification: This is the process whereby a 
  333. subject first makes itself known to a CA or RA, prior to the CA issuing 
  334. a certificate or certificates for that user. The end result of this 
  335. process (when it is successful) is that a CA issues a certificate for an 
  336. end entity's public key, and returns that certificate to the subject 
  337. and/or posts that certificate in a public repository. This process may, 
  338. and typically will, involve multiple "steps", possibly including an 
  339. initialization of the end entity's equipment. For example, the subject 
  340. 3.2 
  341. Farrell, Adams                                              [Page 6]
  342.  
  343.  
  344. INTERNET-DRAFT                                         December 1996
  345.  
  346. 1.1 equipment must be securely initialized with the public key 
  347. of a CA, to be used in validating certificate paths.  
  348. Furthermore, a subject typically needs to be initialized 
  349. with its own key pair(s). 
  350. 1.2 key pair update:  Every key pair needs to be updated 
  351. regularly  (i.e., replaced with a new key pair), and a new 
  352. certificate needs to  be issued. 
  353. 1.3 certificate update: As certificates expire they may be 
  354. "refreshed" if nothing relevant in the environment has 
  355. changed. 
  356. 1.4 CA key pair update: As with end entities, CA key pairs need 
  357. to be updated regularly; however, different mechanisms are 
  358. required. 
  359. 1.5 cross-certification:  Two CAs exchange the information 
  360. necessary to establish cross-certificates between those CAs. 
  361. 1.6 cross-certificate update: Similar to a normal certificate 
  362. update  but involving a cross-certificate. 
  363. 2 Certificate/CRL discovery operations: some PKI management 
  364. operations result in the publication of certificates or CRLs
  365. 2.1 certificate publication: Having gone to the trouble of 
  366. producing  a certificate some means for publishing it is 
  367. needed. 
  368. 2.2 CRL publication: As for certificates. 
  369. 3 Recovery operations: some PKI management operations are used when 
  370. an end entity has "lost" it's PSE
  371. 3.1 key pair recovery:  As an option, user client key materials 
  372. (e.g., a user's private key used for decryption purposes) 
  373. may be backed up by a CA, an RA or a key backup system 
  374. associated with a CA or RA.  If a subject needs to recover 
  375. these backed up key materials (e.g., as a result of a 
  376. forgotten password or a lost key chain file), a  protocol 
  377. exchange may be needed to support such recovery. 
  378. 4 Revocation operations: some PKI operations result in the creation 
  379. of new CRL entries and/or new CRLs
  380. 4.1 revocation request:  An authorized person advises a CA of an 
  381. abnormal situation requiring certificate revocation. 
  382. 5 PSE operations: whilst the definition of PSE operations (e.g. 
  383. moving a PSE, changing a PIN, etc.) are beyond the scope of this 
  384. specification, we do define a PKIMessage which can form the basis 
  385. of such operations.
  386. Note that on-line protocols are not the only way of implementing the 
  387. above operations.  For all operations there are off-line methods of 
  388. achieving the same result, and this specification does not mandate use 
  389. of on-line protocols.  For example, when hardware tokens are used, many 
  390. of the operations may be achieved as part of the physical token 
  391. delivery. 
  392.  
  393. Later sections define a set of standard protocols supporting the above 
  394. operations.  The protocols for conveying these exchanges in different 
  395. environments (file based, on-line, E-mail, and WWW) may also be 
  396. specified. 
  397.  
  398.  
  399. Farrell, Adams                                              [Page 7]
  400.  
  401.  
  402. INTERNET-DRAFT                                         December 1996
  403.  
  404. 2. Assumptions and restrictions
  405. 2.1 End entity initialisation
  406. The first step for and end entity in dealing with PKI management 
  407. entities is to request information about the PKI functions supported and 
  408. optionally to securely acquire a copy of the relevant root CA public 
  409. key(s).
  410.  
  411. 2.2 Initial registration/certification
  412. There are many schemes which can be used to achieve initial registration 
  413. and certification of end entities. No one method is suitable for all 
  414. situations due to the range of policies which a CA may implement and the 
  415. variation in the types of end entity which can occur.
  416.  
  417. We can however, classify the initial registration / certification 
  418. schemes which are supported by this specification. Note that the word 
  419. "initial", above, is crucial - we are dealing with the situation where 
  420. the end entity in question has had no previous contact with the PKI. 
  421. Where the end entity already possesses certified keys then some 
  422. simplifications are possible.
  423.  
  424. Having classified the schemes which are supported by this specification 
  425. we can then specify some as mandatory and some as optional. The goal is 
  426. that the mandatory schemes cover a sufficient number of the cases which 
  427. will arise in real use, whilst the optional schemes are available for 
  428. special cases which arise less frequently. In this way we achieve a 
  429. balance between flexibility and ease of implementation.
  430.  
  431. We will now describe the classification of initial registration / 
  432. certification schemes.
  433. 2.2.1 Criteria used
  434. 2.2.1.1 Initiation of registration / certification
  435. In terms of the PKI messages which are produced we can regard the 
  436. initiation of the initial registration / certification exchanges as 
  437. occurring wherever the first PKI message relating to the end entity is 
  438. produced. Note that the real world initiation of the registration / 
  439. certification procedure may occur elsewhere (e.g. a personnel department 
  440. may telephone an RA operator).
  441.  
  442. The possible locations are: at the end entity, an RA or a CA.
  443. 2.2.1.2 End entity message origin authentication
  444. The on-line messages produced by the end entity which requires a 
  445. certificate may be authenticated or not. The requirement here is to 
  446. authenticate the origin of any messages from the end entity to the PKI 
  447. (CA/RA).
  448.  
  449. In this specification, such authentication is achieved by the PKI 
  450. (CA/RA) issuing the end entity with a secret value (initial 
  451. authentication key) and reference value (used to identify the 
  452. transaction) via some out-of-band means. The initial authentication key 
  453. can then be used to protect relevant PKI messages.
  454.  
  455. We can thus classify the initial registration/certification scheme 
  456.  
  457. Farrell, Adams                                              [Page 8]
  458.  
  459.  
  460. INTERNET-DRAFT                                         December 1996
  461.  
  462. according to whether or not the on-line end-entity -> PKI messages are 
  463. authenticated or not.
  464.  
  465. Note 1: We do not discuss the authentication of the PKI -> end entity 
  466. messages here as this is always required. In any case, it can be 
  467. achieved simply once the root-CA public key has been installed at the 
  468. end entity's equipment or based on the initial authentication key.
  469.  
  470. Note 2: An initial registration / certification procedure can be secure 
  471. where the messages from the end entity are authenticated via some out-
  472. of-band means (e.g. a subsequent visit).
  473. 2.2.1.3 Location of key generation
  474. In this specification, key generation is regarded as occurring wherever 
  475. either the public or private component of a key pair first occurs in a 
  476. PKI message. Note that this does not preclude a centralised key 
  477. generation service - the actual key pair may have been generated 
  478. elsewhere and transported to the end entity, RA or CA.
  479.  
  480. There are thus three possibilities for the location of key generation: 
  481. the end-entity, an RA or a CA.
  482. 2.2.1.4 Confirmation of successful certification
  483. Following the creation of an initial certificate for an end entity, 
  484. additional assurance can be gained by having the end entity explicitly 
  485. confirm successful receipt of the message containing (or indicating the 
  486. creation of) the certificate. Naturally, this confirmation message must 
  487. be protected (based on the initial authentication key or other means).
  488.  
  489. This gives two further possibilities: confirmed or not.
  490. 2.2.2 Mandatory schemes
  491. The criteria above allow for a large number of initial registration / 
  492. certification schemes. This specification mandates that conforming RA/CA 
  493. equipment must support both of the schemes listed below. Conforming end 
  494. entity equipment must support one of the schemes listed below.
  495. 2.2.2.1 Centralised scheme
  496. In terms of the classification above, this scheme is where:
  497.  
  498. - initiation occurs at the certifying CA;
  499. - no on-line message authentication is required;
  500. - key generation occurs at the certifying CA;
  501. - no confirmation message is required.
  502.  
  503. In terms of message flow, this scheme means that the only message 
  504. required is sent from the CA to the end entity. The message must contain 
  505. the entire PSE for the end entity. Some out-of-band means must be 
  506. provided to allow the end entity to authenticate the message received.
  507. 2.2.2.2 Basic authenticated scheme
  508. In terms of the classification above, this scheme is where:
  509.  
  510. - initiation occurs at the end entity
  511. - message authentication is required
  512. - key generation occurs at the end entity
  513. - a confirmation message is required
  514.  
  515.  
  516. Farrell, Adams                                              [Page 9]
  517.  
  518. INTERNET-DRAFT                                         December 1996
  519.  
  520. In terms of message flow, the scheme is as follows:
  521.  
  522.       End entity                                           CA
  523.       ==========                                      =============
  524.                     out-of-band distribution of 
  525.                     initial authentication key and 
  526.                     reference value
  527.       Key generation
  528.       Creation of certification request
  529.       Protect request with IAK
  530.                     -->>--certification request-->>
  531.                                                      verify request
  532.                                                      process request
  533.                                                      create response
  534.                     --<<--certification response--<<--
  535.       handle response
  536.       create confirmation
  537.                     -->>--confirmation message-->>--
  538.                                                      verify confirmation
  539.  
  540. (Where verification of the confirmation message fails, the CA must 
  541. revoke the newly issued certificate if necessary.)
  542. 2.3 Proof of Possession of Private Key
  543. In order to prevent certain attacks, the PKI management operations 
  544. specified here require end-entities to prove that they have possession 
  545. of (i.e., are able to use) the private key corresponding to the public 
  546. key for which a certificate is requested.
  547.  
  548. This is accomplished in a different ways, depending on the type of key 
  549. for which a certificate is requested. If a key can be used for multiple 
  550. purposes (e.g. an RSA key) then any of the methods may be used.
  551.  
  552. This specification explicitly allows for cases where an end entity 
  553. supplies the relevant proof to an RA and the RA subsequently attests to 
  554. the CA that the required proof has been received (and validated!). For 
  555. example, an end entity wishing to have a signing key certified could 
  556. send the appropriate signature to the RA which then simply notifies the 
  557. relevant CA that the end entity has supplied the required proof. Of 
  558. course, such a situation may be disallowed by some policies.
  559. 2.3.1 Signature Keys
  560. For signature keys, the end-entity can sign a value to prove possession 
  561. of the private key.
  562. 2.3.2 Encryption Keys
  563. For encryption keys, the end-entity can be required to decrypt a value 
  564. in order to prove possession of the private key. This can be achieved 
  565. either directly or indirectly. 
  566.  
  567. The direct method is to issue a random challenge to which an immediate 
  568. response is required.
  569.  
  570. The indirect method is to issue a certificate which is encrypted for the 
  571.  
  572. Farrell, Adams                                              [Page 10]
  573.  
  574.  
  575. INTERNET-DRAFT                                         December 1996
  576.  
  577. end entity (and have the end entity demonstrate its ability to decrypt 
  578. this certificate in the confirmation message). This allows a CA to issue 
  579. a certificate in a form which can only be used by the intended end 
  580. entity.
  581.  
  582. This specification uses the indirect method because this requires no 
  583. extra messages to be sent (i.e., the proof can be demonstrated using the 
  584. {request, response, confirmation} triple of messages).
  585.  
  586. 2.3.3 Key Agreement Keys
  587. For key agreement keys, the end entity and the PKI management entity 
  588. (i.e. CA or RA) must establish a shared secret key in order to prove 
  589. that the end entity has possession of the private key.
  590.  
  591. Note that this need not impose any restrictions on the keys which can be 
  592. certified by a given CA -- in particular, for Diffie-Hellman keys the 
  593. end entity may freely choose its algorithm parameters -- provided that 
  594. the CA can generate a short-term (or one-time) key pair with the 
  595. appropriate parameters when necessary.
  596.  
  597. 2.4 Root CA key update
  598. This discussion only applies to CAs which are a root CA for some end 
  599. entity.
  600.  
  601. The basis of the procedure described here is that the CA protects its 
  602. new public key using its previous private key and vice versa. Thus when 
  603. a CA updates its key pair it must generate two new cACertificate 
  604. attribute values if certificates are made available using an X.500 
  605. directory. 
  606.  
  607. When a CA changes its key pair those entities who have acquired the old 
  608. CA public key via "out-of-band" means are most affected. It is these end 
  609. entities who will need access to the new CA public key protected with 
  610. the old CA private key. However, they will only require this for a 
  611. limited period (until they have acquired the new CA public key via the 
  612. "out-of-band" mechanism). This will typically be easily achieved when 
  613. these end entity's certificates expire. 
  614.  
  615. The data structure used to protect the new and old CA public keys is a 
  616. standard certificate (which may also contain extensions). There are no 
  617. new data structures required. 
  618.  
  619.   Notes: 
  620.  
  621. 1.This scheme does not make use of any of the X.509 v3 extensions as it 
  622. should be able to work even for version 1 certificates. The presence of 
  623. the KeyIdentifier extension would make for efficiency improvements. 
  624.  
  625. 2.While the scheme could be generalized to cover cases where the CA 
  626. updates its key pair more than once during the validity period of one of 
  627. its end entity's certificates, this generalization seems of dubious 
  628. value. This means that the validity period of a CA key pair must be 
  629.  
  630. Farrell, Adams                                              [Page 11]
  631.  
  632.  
  633. INTERNET-DRAFT                                         December 1996
  634.  
  635. greater than the validity period of any certificate issued by that CA 
  636. using that key pair. 
  637.  
  638. 3.This scheme forces end entities to acquire the new CA public key on 
  639. the expiry of the last certificate they owned which was signed with the 
  640. old CA private key (via the "out-of-band" means).  Certificate and/or 
  641. key update operations occurring at other times do not necessarily 
  642. require this (depending on the end entity's equipment). 
  643. 2.4.1 CA Operator actions 
  644.   To change the key of the CA, the CA operator does the following: 
  645.  
  646.   1.Generate a new key pair. 
  647.  
  648.   2.Create a certificate containing the old CA public key signed with 
  649. the new private key (the "old with new" certificate). 
  650.  
  651.   3.Create a certificate containing the new CA public key signed with 
  652. the old private key (the "new with old" certificate). 
  653.  
  654.   4.Create a certificate containing the new CA public key signed with 
  655. the new private key (the "new with new" certificate). 
  656.  
  657.   5.Publish these new certificates via the directory and/or other means. 
  658. (A CAKeyUpdAnn message.) 
  659.  
  660.   6.Export the new CA public key so that end entities may acquire it 
  661. using the "out-of-band" mechanism. 
  662.  
  663. The old CA private key is then no longer required. The old CA public key 
  664. will however remain in use for some time. The time when the old CA 
  665. public key is no longer required (other than for non-repudiation) will 
  666. be when all end entities of this CA have acquired the new CA public key 
  667. via "out-of-band" means. 
  668.  
  669. The "old with new" certificate should have a validity period starting at 
  670. the generation time of the old key pair and ending at the time at which 
  671. the CA will next update its key pair. 
  672.  
  673. The "new with old" certificate should have a validity period starting at 
  674. the generation time of the new key pair and ending at the time by which 
  675. all end entities of this CA will securely possess the new CA public key. 
  676.  
  677. The "new with new" certificate should have a validity period starting at 
  678. the generation time of the new key pair and ending at the time at which 
  679. the CA will next update its key pair. 
  680.  
  681. 2.4.2 Verifying Certificates. 
  682. Normally when verifying a signature the verifier simply(!) verifies the 
  683. certificate containing the public key of the signer. However, once a CA 
  684. is allowed to update its key there are a range of new possibilities. 
  685. These are shown in the table below. 
  686.  
  687.  
  688. Farrell, Adams                                              [Page 12]
  689.  
  690.  
  691. INTERNET-DRAFT                                         December 1996
  692.  
  693.             Repository contains NEW     Repository contains only OLD 
  694.               and OLD public keys        public key (due to e.g. 
  695.                                           delay in publication) 
  696.  
  697.                PSE      PSE Contains  PSE Contains    PSE Contains 
  698.             Contains     OLD public    NEW public      OLD public 
  699.            NEW public       key            key            key 
  700.                key 
  701.  
  702. Signer's   Case 1:      Case 3:       Case 5:        Case 7: 
  703. certifi-   This is      In this case  Although the   In this case 
  704. cate is    the          the verifier  CA operator    the CA 
  705. protected  standard     must access   has not        operator  has 
  706. using NEW  case where   the           updated the    not updated 
  707. public     the          directory in  directory the  the directory 
  708. key        verifier     order to get  verifier can   and so the 
  709.            can          the value of  verify the     verification 
  710.            directly     the NEW       certificate    will FAIL 
  711.            verify the   public key    directly - 
  712.            certificate                this is thus 
  713.            without                    the same as 
  714.            using the                  case 1. 
  715.            directory 
  716.  
  717. Signer's   Case 2:      Case 4:       Case 6:        Case 8: 
  718. certifi-   In this      In this case  The verifier   Although the 
  719. cate is    case the     the verifier  thinks this    CA operator 
  720. protected  verifier     can directly  is the         has not 
  721. using OLD  must         verify the    situation of   updated the 
  722. public     access the   certificate   case 2 and     directory the 
  723. key        directory    without       will access    verifier can 
  724.            in order     using the     the            verify the 
  725.            to get the   directory     directory,     certificate 
  726.            value of                   however the    directly - 
  727.            the OLD                    verification   this is thus 
  728.            public key                 will FAIL      the same as 
  729.                                                      case 4. 
  730.  
  731. 2.4.2.1 Verification in cases 1, 4, 5 and 8. 
  732. In these cases the verifier has a local copy of the CA public key which 
  733. can be used to verify the certificate directly. This is the same as the 
  734. situation where no key change has ever occurred. 
  735.  
  736. Note that case 8 may arise between the time when the CA operator has 
  737. generated the new key pair and the time when the CA operator stores the 
  738. updated attributes in the directory. Case 5 can only arise if the CA 
  739. operator has issued both the signer's and verifier's certificates during 
  740. this "gap" (the CA operator should avoid this as it leads to the failure 
  741. cases described below). 
  742. 2.4.2.2 Verification in case 2. 
  743. In case 2 the verifier must get access to the old public key of the CA. 
  744. The verifier does the following: 
  745.  
  746.  
  747. Farrell, Adams                                              [Page 13]
  748.  
  749. INTERNET-DRAFT                                         December 1996
  750.  
  751. 1.Lookup the CACertificate attribute in the directory and pick the 
  752. appropriate value (based on validity periods) 
  753. 2.Verify that this is correct using the new CA key (which the verifier 
  754. has locally). 
  755. 3.If correct then check the signer's certificate using the old CA key. 
  756.  
  757. Case 2 will arise when the CA operator has issued the signer's 
  758. certificate, then changed key and then issued the verifier's 
  759. certificate, so it is quite a typical case. 
  760.  
  761. 2.4.2.3 Verification in case 3. 
  762. In case 3 the verifier must get access to the new public key of the CA. 
  763. The verifier does the following: 
  764.  
  765. 1.Lookup the CACertificate attribute in the directory and pick the 
  766. appropriate value (based on validity periods).  
  767. 2.Verify that this is correct using the old CA key (which the verifier 
  768. has stored locally). 
  769. 3.If correct then  check the signer's certificate using the new CA key. 
  770.  
  771. Case 3 will arise when the CA operator has issued the verifier's 
  772. certificate, then changed key and then issued the signer's certificate, 
  773. so it is also quite a typical case. 
  774.  
  775. 2.4.2.4 Failure of verification in case 6. 
  776. In this case the CA has issued the verifier's PSE containing the new key 
  777. without updating the directory attributes. This means that the verifier 
  778. has no means to get a trustworthy version of the CA's old key and so 
  779. verification fails. 
  780.  
  781. Note that the failure is the CA operator's fault. 
  782. 2.4.2.5 Failure of verification in case 7. 
  783. In this case the CA has issued the signer's certificate protected with 
  784. the new key without updating the directory attributes. This means that 
  785. the verifier has no means to get a trustworthy version of the CA's new 
  786. key and so verification fails. 
  787.  
  788. Note that the failure is again the CA operator's fault. 
  789. 2.4.3 Revocation - Change of CA key 
  790. As we saw above the verification of a certificate becomes more complex 
  791. once the CA is allowed to change its key. This is also true for 
  792. revocation checks as the CA may have signed the CRL using a newer 
  793. private key than the one that is within the user's PSE. 
  794.  
  795. The analysis of the alternatives is as for certificate verification. 
  796.  
  797.  
  798. 3. Data Structures 
  799. This section contains descriptions of the data structures required for 
  800. PKI management messages. Section 4 describes constraints on their values 
  801.  
  802. Farrell, Adams                                              [Page 14]
  803.  
  804.  
  805. INTERNET-DRAFT                                         December 1996
  806.  
  807. and the sequence of events for each of the various PKI management 
  808. operations. Section 5 describes how these may be encapsulated in various 
  809. transport mechanisms. 
  810. 3.1 Overall PKI Message 
  811. All of the messages used in PKI management use the following structure:
  812.  
  813.   PKIMessage ::= SEQUENCE { 
  814.       header           PKIHeader, 
  815.       body             PKIBody, 
  816.       protection   [0] PKIProtection OPTIONAL,
  817.       extraCerts   [1] SEQUENCE OF Certificate OPTIONAL
  818.   }
  819.  
  820. The PKIHeader contains information which is common to many PKI messages.
  821.  
  822. The PKIBody contains message-specific information.
  823.  
  824. The PKIProtection contains bits which protect the PKI message.
  825.  
  826. The extra certificates field can contain certificates which may be 
  827. useful to the recipient. For example, this can be used by a CA or RA to 
  828. present an end entity with certificates which it needs to verify it's 
  829. own new certificate (if the CA that issued the end entity's certificate 
  830. is not a root CA for the end entity). 
  831.  
  832. Note also that this field does not necessarily contain a certification 
  833. path - the recipient may have to sort, select from, or otherwise process 
  834. the extra certificates in order to use them.
  835. 3.1.1 PKI Message Header 
  836. All PKI messages require some header information for addressing and 
  837. transaction identification. Some of this information will also be 
  838. present in a transport-specific envelope; however, if the PKI message is 
  839. protected then this information is also protected (i.e. we make no 
  840. assumption about secure transport). 
  841.  
  842. The following data structure is used to contain this information: 
  843.  
  844.   PKIHeader ::= SEQUENCE { 
  845.       pvno                INTEGER     { ietf-version1 (0) }, 
  846.       sender              GeneralName, 
  847.       -- identifies the sender
  848.       recipient           GeneralName, 
  849.       -- identifies the intended recipient
  850.       messageTime     [0] GeneralizedTime        OPTIONAL, 
  851.       -- time of production of this message (used when sender
  852.       -- believes that the transport will be "suitable"; i.e., 
  853.       -- that the time will still be meaningful upon receipt)
  854.       protectionAlg   [1] AlgorithmIdentifier    OPTIONAL, 
  855.       -- algorithm used for calculation of protection bits
  856.       senderKID       [2] KeyIdentifier          OPTIONAL,
  857.       recipKID        [3] KeyIdentifier          OPTIONAL,
  858.  
  859.  
  860. Farrell, Adams                                              [Page 15]
  861.  
  862.  
  863. INTERNET-DRAFT                                         December 1996
  864.  
  865.       -- to identify specific keys used for protection
  866.       transactionID   [4] OCTET STRING           OPTIONAL, 
  867.       -- identifies the transaction, i.e. this will be the same in 
  868.            -- corresponding request, response and confirmation messages
  869.       senderNonce     [5] OCTET STRING           OPTIONAL, 
  870.       recipNonce      [6] OCTET STRING           OPTIONAL, 
  871.       -- nonces used to provide replay protection, senderNonce 
  872.       -- is inserted by the creator of this message; recipNonce 
  873.       -- is a nonce previously inserted in a related message by 
  874.       -- the intended recipient of this message 
  875.       freeText        [7] PKIFreeText            OPTIONAL
  876.       -- this may be used to indicate context-specific 
  877.       -- instructions (this field is intended for human 
  878.       -- consumption) 
  879.   }
  880.  
  881.   PKIFreeText ::= CHOICE { 
  882.       iA5String  [0] IA5String, 
  883.       bMPString  [1] BMPString
  884.   }
  885.  
  886. The pvno field is fixed for this version of IPKI.
  887.  
  888. The sender field contains the name of the sender of the PKIMessage. This 
  889. name (in conjunction with senderKID, if supplied) should be usable to 
  890. verify the protection on the message.  If nothing about the sender is 
  891. known to the sending entity (e.g., in the InitReqContent message, where 
  892. the end entity may not know its own DN, e-mail name, IP address, etc.), 
  893. then the "sender" field must contain a "NULL" value; that is, the 
  894. SEQUENCE OF relative distinguished names is of zero length.  In such a 
  895. case the senderKID field must hold an identifier (i.e., a reference 
  896. number) which indicates to the receiver the appropriate shared secret 
  897. information to use to verify the message.
  898.  
  899. The recipient field contains the name of the recipient of the 
  900. PKIMessage. This name (in conjunction with recipKID, if supplied) should 
  901. be usable to verify the protection on the message.
  902.  
  903. The protectionAlg field specifies the algorithm used to protect the 
  904. message. If no protection bits are supplied (PKIProtection is optional) 
  905. then this field must be omitted; if protection bits are supplied then 
  906. this field must be supplied.
  907.  
  908. senderKID and recipKID are usable to indicate which keys have been used 
  909. to protect the message (recipKID will normally only be required where 
  910. protection of the message uses DH keys).
  911.  
  912. The transactionID field within the message header is required so that 
  913. the recipient of a response message can correlate this with a previously 
  914. issued request. For example, in the case of an RA there may be many 
  915. requests "outstanding" at a given moment.
  916.  
  917.  
  918. Farrell, Adams                                              [Page 16]
  919.  
  920.  
  921. INTERNET-DRAFT                                         December 1996
  922.  
  923. The senderNonce and recipNonce fields protect the PKIMessage against 
  924. replay attacks.
  925.  
  926. The messageTime field contains the time at which the sender created the 
  927. message. This may be useful to allow end entities to correct their local 
  928. time to be consistent with the time on a central system.
  929.  
  930. The freeText field may be used to send a human-readable message to the 
  931. recipient.
  932. 3.1.2 PKI Message Body 
  933.   PKIBody ::= CHOICE {       -- message-specific body elements 
  934.       ir      [0]  InitReqContent, 
  935.       ip      [1]  InitRepContent, 
  936.       cr      [2]  CertReqContent, 
  937.       cp      [3]  CertRepContent, 
  938.       kur     [4]  KeyUpdReqContent, 
  939.       kup     [5]  KeyUpdRepContent, 
  940.       krr     [6]  KeyRecReqContent, 
  941.       krp     [7]  KeyRecRepContent, 
  942.       rr      [8]  RevReqContent, 
  943.       rp      [9]  RevRepContent, 
  944.       ccr     [10] CrossCertReqContent, 
  945.       ccp     [11] CrossCertRepContent, 
  946.       ckuann  [12] CAKeyUpdAnnContent, 
  947.       cann    [13] CertAnnContent, 
  948.       rann    [14] RevAnnContent, 
  949.       crlann  [15] CRLAnnContent, 
  950.       conf    [16] PKIConfirmContent, 
  951.       nested  [17] NestedMessageContent,
  952.       infor   [18] PKIInfoReqContent,
  953.       infop   [19] PKIInfoRepContent,
  954.       error   [20] ErrorMsgContent
  955.   }
  956.  
  957. The specific types are described in section 3.3 below.
  958. 3.1.3 PKI Message Protection 
  959. Some PKI messages will be protected for integrity. (Note that if an 
  960. asymmetric algorithm is used to protect a message and the relevant 
  961. public component has been certified already, then the origin of message 
  962. can also be authenticated.  On the other hand, if the public component 
  963. is uncertified then the message origin cannot be automatically 
  964. authenticated, but may be authenticated via out-of-band means.) 
  965.  
  966. When protection is applied the following structure is used: 
  967.  
  968.   PKIProtection ::= BIT STRING 
  969.  
  970. The input to the calculation of the protectionBits is the DER encoding 
  971. of the following data structure: 
  972.  
  973.   ProtectedPart ::= SEQUENCE { 
  974.  
  975.  
  976. Farrell, Adams                                              [Page 17]
  977.  
  978.  
  979. INTERNET-DRAFT                                         December 1996
  980.  
  981.       header    PKIHeader, 
  982.       body      PKIBody
  983.   }
  984.  
  985. Depending on the circumstances the PKIProtection bits may contain a MAC 
  986. or signature. Only the following cases can occur:
  987.  
  988. - shared secret information
  989.  
  990. In this case the sender and recipient share secret information 
  991. (established via out-of-band means or from a previous PKI management 
  992. operation). The protection bits will typically contain a MAC value and 
  993. the protectionAlg will be the following:
  994.  
  995.   PasswordBasedMac ::= OBJECT IDENTIFIER
  996.  
  997.   PBMParameter ::= SEQUENCE {
  998.       salt                OCTET STRING,
  999.       owf                 AlgorithmIdentifier,
  1000.       -- AlgId for a One-Way Function (SHA-1 recommended)
  1001.       iterationCount      INTEGER,
  1002.       -- number of times the OWF is applied
  1003.       mac                 AlgorithmIdentifier
  1004.       -- the MAC AlgId (e.g., DES-MAC or Triple-DES-MAC [PKCS #11])
  1005.   }
  1006.  
  1007. In the above protectionAlg the salt value is appended to the shared 
  1008. secret input. The OWF is then applied iterationCount times, where the 
  1009. salted secret is the input to the first iteration and, for each 
  1010. successive iteration, the input is set to be the output of the previous 
  1011. iteration. The output of the final iteration (called "BASEKEY" for 
  1012. ease of reference, with a size of "H") is what is used to form the 
  1013. symmetric key. If the MAC algorithm requires a K-bit key and K <= H, 
  1014. then the most significant K bits of BASEKEY are used. If K > H, then all 
  1015. of BASEKEY is used for the most significant H bits of the key, OWF("1" 
  1016. || BASEKEY) is used for the next most significant H bits of the key, 
  1017. OWF("2" || BASEKEY) is used for the next most significant H bits of 
  1018. the key, and so on, until all K bits have been derived. [Here "N" is 
  1019. the ASCII byte encoding the number N and "||" represents 
  1020. concatenation.]
  1021.  
  1022. - DH key pairs
  1023.  
  1024. Where the sender and receiver possess Diffie-Hellman certificates with 
  1025. compatible DH parameters, then in order to protect the message the end 
  1026. entity must generate a symmetric key based on its private DH key value 
  1027. and the DH public key of the recipient of the PKI message. The 
  1028. protection bits will typically contain a MAC value keyed with this 
  1029. derived symmetric key and the protectionAlg will be the following:.
  1030.  
  1031.  
  1032. Farrell, Adams                                              [Page 18]
  1033.  
  1034.  
  1035. INTERNET-DRAFT                                         December 1996
  1036.  
  1037.   DHBasedMac ::= OBJECT IDENTIFIER
  1038.  
  1039.   DHBMParameter ::= SEQUENCE {
  1040.       owf                 AlgorithmIdentifier,
  1041.       -- AlgId for a One-Way Function (SHA-1 recommended)
  1042.       mac                 AlgorithmIdentifier
  1043.       -- the MAC AlgId (e.g., DES-MAC or Triple-DES-MAC [PKCS #11])
  1044.   }
  1045.  
  1046. In the above protectionAlg OWF is applied to the result of the Diffie-
  1047. Hellman computation. The OWF output (called "BASEKEY" for ease of 
  1048. reference, with a size of "H") is what is used to form the symmetric 
  1049. key. If the MAC algorithm requires a K-bit key and K <= H, then the most 
  1050. significant K bits of BASEKEY are used. If K > H, then all of BASEKEY is 
  1051. used for the most significant H bits of the key, OWF("1" || BASEKEY) 
  1052. is used for the next most significant H bits of the key, OWF("2" || 
  1053. BASEKEY) is used for the next most significant H bits of the key, and so 
  1054. on, until all K bits have been derived. [Here "N" is the ASCII byte 
  1055. encoding the number N and "||" represents concatenation.]
  1056.  
  1057. - signature
  1058.  
  1059. Where the sender possesses a signature key pair it may simply sign the 
  1060. PKI message. The protection bits will contain a signature value and the 
  1061. protectionAlg will be an AlgorithmIdentifier for a digital signature 
  1062. (e.g., md5WithRSAEncryption or dsaWithSha-1). 
  1063.  
  1064. - multiple protection
  1065.  
  1066. In cases where an end entity sends a protected PKI message to an RA, the 
  1067. RA may forward that message to a CA, attaching it's own protection. This 
  1068. is accomplished by nesting the entire message sent by the end entity 
  1069. within a new PKI message. The structure used is as follows.
  1070.  
  1071.   NestedMessageContent ::= ANY 
  1072.   -- This will be a PKIMessage
  1073.  
  1074. 3.2 Common Data Structures 
  1075. Before specifying the specific types which may be placed in a PKIBody we 
  1076. define some useful data structures which are used in more than one case. 
  1077. 3.2.1 Requested Certificate Contents 
  1078. Various PKI management messages require that the originator of the 
  1079. message indicate some of the fields which are required to be present in 
  1080. a certificate. The CertTemplate structure allows an end entity or RA to 
  1081. specify as much as they wish about the certificate it requires. 
  1082. ReqCertContent is basically the same as a Certificate but with all 
  1083. fields optional. 
  1084.  
  1085. Note that even if the originator completely specifies the contents of a 
  1086.  
  1087. Farrell, Adams                                              [Page 19]
  1088.  
  1089.  
  1090. INTERNET-DRAFT                                         December 1996
  1091.  
  1092. certificate it requires, a CA is free to modify fields within the 
  1093. certificate actually issued. 
  1094.  
  1095.   CertTemplate ::= SEQUENCE { 
  1096.       version    [0] Version               OPTIONAL, 
  1097.       -- used to ask for a particular syntax version 
  1098.       serial     [1] INTEGER               OPTIONAL, 
  1099.       -- used to ask for a particular serial number 
  1100.       signingAlg [2] AlgorithmIdentifier   OPTIONAL, 
  1101.       -- used to ask the CA to use this alg. for signing the cert 
  1102.       subject    [3] Name                  OPTIONAL, 
  1103.       validity   [4] OptionalValidity      OPTIONAL, 
  1104.       issuer     [5] Name                  OPTIONAL, 
  1105.       publicKey  [6] SubjectPublicKeyInfo  OPTIONAL, 
  1106.       issuerUID  [7] UniqueIdentifier      OPTIONAL, 
  1107.       subjectUID [8] UniqueIdentifier      OPTIONAL, 
  1108.       extensions [9] Extensions            OPTIONAL
  1109.       -- the extensions which the requester would like in the cert. 
  1110.   }
  1111.  
  1112.   OptionalValidity ::= SEQUENCE { 
  1113.       notBefore  [0] UTCTime OPTIONAL, 
  1114.       notAfter   [1] UTCTime OPTIONAL 
  1115.   }
  1116.  
  1117. 3.2.2 Encrypted Values 
  1118. Where encrypted values (restricted, in this specification, to be either 
  1119. private keys or certificates) are sent in PKI messages the following 
  1120. data structure is used. 
  1121.  
  1122.   EncryptedValue ::= SEQUENCE { 
  1123.       encValue          BIT STRING, 
  1124.       -- the encrypted value itself
  1125.       intendedAlg   [0] AlgorithmIdentifier  OPTIONAL,
  1126.       -- the intended algorithm for which the value will be used
  1127.       symmAlg       [1] AlgorithmIdentifier  OPTIONAL, 
  1128.       -- the symmetric algorithm used to encrypt the value 
  1129.       encSymmKey    [2] BIT STRING           OPTIONAL,
  1130.       -- the (encrypted) symmetric key used to encrypt the value
  1131.       keyAlg        [3] AlgorithmIdentifier  OPTIONAL 
  1132.       -- algorithm used to encrypt the symmetric key 
  1133.   }
  1134.  
  1135. Use of this data structure requires that the creator and intended 
  1136. recipient are respectively able to encrypt and decrypt. Typically, this 
  1137. will mean that the sender and recipient have, or are able to generate, a 
  1138. shared secret key. 
  1139.  
  1140. If the recipient of the PKIMessage already possesses a private key 
  1141. usable for decryption, then the encSymmKey field may contain a session 
  1142.  
  1143. Farrell, Adams                                              [Page 20]
  1144.  
  1145.  
  1146. INTERNET-DRAFT                                         December 1996
  1147.  
  1148. key encrypted using the recipient's public key. 
  1149. 3.2.3 Status codes and Failure Information for PKI messages 
  1150. All response messages will include some status information. The 
  1151. following values are defined. 
  1152.    
  1153.   PKIStatus ::= INTEGER { 
  1154.       granted                (0), 
  1155.       -- you got exactly what you asked for 
  1156.       grantedWithMods        (1), 
  1157.       -- you got something like what you asked for; the 
  1158.       -- requester is responsible for ascertaining the differences 
  1159.       rejection              (2), 
  1160.       -- you don't get it, more information elsewhere in the message
  1161.       waiting                (3), 
  1162.       -- the request body part has not yet been processed, 
  1163.       -- expect to hear more later 
  1164.       revocationWarning      (4), 
  1165.       -- this message contains a warning that a revocation is 
  1166.       -- imminent 
  1167.       revocationNotification (5), 
  1168.       -- notification that a revocation has occurred 
  1169.       keyUpdateWarning       (6)
  1170.       -- update already done for the oldCertId specified in 
  1171.       -- FullCertTemplate
  1172.   }
  1173.  
  1174. Responders may use the following syntax to provide more information 
  1175. about failure cases. 
  1176.  
  1177.   PKIFailureInfo ::= BIT STRING { 
  1178.   -- since we can fail in more than one way! 
  1179.       badAlg           (0), 
  1180.       badMessageCheck  (1) 
  1181.       -- more TBS
  1182.   }
  1183.  
  1184.   PKIStatusInfo ::= SEQUENCE {
  1185.       status    PKIStatus, 
  1186.       failInfo  PKIFailureInfo  OPTIONAL
  1187.   }
  1188.  
  1189. 3.2.4 Certificate Identification 
  1190. In order to identify particular certificates the following data 
  1191. structure is used. 
  1192.  
  1193.   CertId ::= SEQUENCE { 
  1194.       issuer           GeneralName, 
  1195.       serialNumber     INTEGER 
  1196.   }
  1197.  
  1198. 3.2.5 "Out-of-band" root CA public key 
  1199. Each root CA must be able to publish its current public key via some 
  1200.  
  1201. Farrell, Adams                                              [Page 21]
  1202.  
  1203.  
  1204. INTERNET-DRAFT                                         December 1996
  1205.  
  1206. "out- of-band" means. While such mechanisms are beyond the scope of this 
  1207. document, we define data structures which can support such mechanisms. 
  1208.  
  1209. There are generally two methods available; either the CA directly 
  1210. publishes its public key and associated attributes, or this information 
  1211. is available via the Directory (or equivalent) and the CA publishes a 
  1212. hash of this value to allow verification of its integrity before use. 
  1213.  
  1214.   OOBCert ::= Certificate 
  1215.  
  1216. The fields within this certificate are restricted as follows:
  1217.  
  1218. - The certificate should be self-signed, i.e. the signature should be 
  1219. verifiable using the subjectPublicKey field.
  1220. - The subject and issuer fields should be identical.
  1221. - If the subject field is NULL then both subjectAltNames and 
  1222. issuerAltNames extensions must be present and have exactly the same 
  1223. value.
  1224. - The values of all other extensions should be suitable for a self-
  1225. certificate (e.g. key identifiers for subject and issuer should be 
  1226. the same).
  1227.  
  1228.   OOBCertHash ::= SEQUENCE { 
  1229.       hashAlg     [0] AlgorithmIdentifier     OPTIONAL, 
  1230.       certId      [1] CertId                  OPTIONAL, 
  1231.       hashVal         BIT STRING
  1232.       -- hashVal is calculated over DER encoding of the 
  1233.       -- subjectPublicKey field of the corresponding cert. 
  1234.   }
  1235.  
  1236. The intention of the hash value here is that anyone who has securely 
  1237. gotten the hash value (via the out-of-band means) can verify a self-
  1238. signed certificate for that CA. The hash value is only calculated over 
  1239. the subjectPublicKey field in order to allow the CA to change its self-
  1240. signed certificate (e.g. perhaps to modify some policy constraints). 
  1241.  
  1242. 3.2.6 Archival Options
  1243. Requesters may indicate that they wish the PKI to archive a private key 
  1244. value using the following structure:
  1245.  
  1246.   PKIArchiveOptions ::= CHOICE {
  1247.       encryptedPrivKey     [0] EncryptedValue,
  1248.       -- the actual value of the private key
  1249.       keyGenParameters     [1] KeyGenParameters,
  1250.       -- parameters which allow the private key to be re-generated
  1251.       archiveRemGenPrivKey [2] BOOLEAN
  1252.       -- set to TRUE if sender wishes receiver to archive the private
  1253.       -- key of a key pair which the receiver generates in response to
  1254.       -- this request; set to FALSE if no archival is desired.
  1255. }
  1256.  
  1257.   KeyGenParameters ::= OCTET STRING
  1258.  
  1259.  
  1260. Farrell, Adams                                              [Page 22]
  1261.  
  1262. INTERNET-DRAFT                                         December 1996
  1263.  
  1264.       -- actual syntax is <<TBS>>
  1265.       -- an alternative to sending the key is to send the information 
  1266.       -- about how to re-generate the key (e.g. for many RSA 
  1267.       -- implementations one could send the first random number tested 
  1268.       -- for primality)
  1269.  
  1270. <<Microsoft's PFX stuff could be re-used here?>>
  1271. 3.2.7 Publication Information
  1272. Requesters may indicate that they wish the PKI to publish a certificate 
  1273. using the structure below. 
  1274.  
  1275. If the dontPublish option is chosen, the requester indicates that the 
  1276. PKI should not publish the certificate (this may indicate that the 
  1277. requester intends to publish the certificate him/herself).
  1278.  
  1279. If the dontCare method is chosen, the requester indicates that the PKI 
  1280. may publish the certificate using whatever means it chooses.
  1281.  
  1282. The pubLocation field, if supplied, indicates where the requester would 
  1283. like the certificate to be found (note that the CHOICE within 
  1284. GeneralName includes a URL and an IP address, for example).
  1285.  
  1286.   PKIPublicationInfo ::= SEQUENCE {
  1287.      action     INTEGER {
  1288.                   dontPublish (0),
  1289.                   pleasePublish (1)
  1290.                 },
  1291.      pubInfos  SEQUENCE OF SinglePubInfo OPTIONAL
  1292.        -- pubInfos should not be present if action is "dontPublish"
  1293.        -- (if action is "pleasePublish" and pubInfos is omitted, 
  1294.        -- "dontCare" is assumed)
  1295.   }
  1296.  
  1297.   SinglePubInfo ::= SEQUENCE {
  1298.       pubMethod    INTEGER {
  1299.           dontCare    (0),
  1300.           x500        (1),
  1301.           web         (2)
  1302.       },
  1303.       pubLocation  GeneralName OPTIONAL
  1304.   }
  1305.  
  1306. 3.2.8  "Full" Request Template
  1307. The following structure groups together the fields which may be sent as 
  1308. part of a certification request:
  1309.  
  1310.   FullCertTemplates ::= SEQUENCE OF FullCertTemplate
  1311.  
  1312.   FullCertTemplate ::= SEQUENCE {
  1313.       certReqId              INTEGER,
  1314.       -- to match this request with corresponding response
  1315.       -- (note:  must be unique over all FullCertReqs in this message)
  1316.  
  1317.  
  1318. Farrell, Adams                                              [Page 23]
  1319.  
  1320. INTERNET-DRAFT                                         December 1996
  1321.  
  1322.       certTemplate           CertTemplate,
  1323.       popoSigningKey     [0] POPOSigningKey      OPTIONAL,
  1324.       archiveOptions     [1] PKIArchiveOptions   OPTIONAL,
  1325.       publicationInfo    [2] PKIPublicationInfo  OPTIONAL,
  1326.       oldCertId          [3] CertId              OPTIONAL
  1327.       -- id. of cert. which is being updated by this one
  1328.   }
  1329.  
  1330. If the certification request is for a signing key pair (i.e., a request 
  1331. for a verification certificate), then the proof of possession of the 
  1332. private signing key is demonstrated through use of the POPOSigningKey 
  1333. structure.
  1334.  
  1335.   POPOSigningKey ::= SEQUENCE {
  1336.       alg                 AlgorithmIdentifier,
  1337.       signature           BIT STRING
  1338.       -- the signature (using "alg") on the DER-encoded 
  1339.       -- POPOSigningKeyInput structure given below
  1340.   }
  1341.  
  1342.   POPOSigningKeyInput ::= SEQUENCE {
  1343.       authInfo            CHOICE {
  1344.           sender              [0] GeneralName,
  1345.           -- from PKIHeader (used only if an authenticated identity
  1346.           -- has been established for the sender (e.g., a DN from a
  1347.           -- previously-issued and currently-valid certificate)
  1348.           publicKeyMAC        [1] BIT STRING
  1349.           -- used if no authenticated GeneralName currently exists for
  1350.           -- the sender; publicKeyMAC contains a password-based MAC
  1351.           -- (using the protectionAlg AlgId from PKIHeader) on the
  1352.           -- DER-encoded value of publicKey
  1353.       }
  1354.       publicKey           SubjectPublicKeyInfo    -- from CertTemplate
  1355.   }
  1356.  
  1357. On the other hand, if the certification request is for an encryption key 
  1358. pair (i.e., a request for an encryption certificate), then the proof of 
  1359. possession of the private decryption key may be demonstrated by the 
  1360. inclusion of the private key (encrypted) in the FullCertTemplate (in the 
  1361. PKIArchivalOptions structure). Alternatively (i.e., if the private key 
  1362. is not included), the CA may return not the certificate, but an 
  1363. encrypted certificate (i.e., the certificate encrypted under a randomly-
  1364. generated symmetric key, and the symmetric key encrypted under the 
  1365. public key for which the certification request is being made).  The end 
  1366. entity proves knowledge of the private decryption key to the CA by 
  1367. MACing the PKIConfirm message using a key derived from this symmetric 
  1368. key.  [Note that if several FullCertTemplates are included in the 
  1369. PKIMessage, then the CA uses a different symmetric key for each 
  1370. FullCertTemplate and the MAC uses a key derived from the concatenation 
  1371. of all these keys.]  The MACing procedure uses the PasswordBasedMac 
  1372. AlgId defined in Section 3.1.
  1373.  
  1374.  
  1375. Farrell, Adams                                              [Page 24]
  1376.  
  1377.  
  1378. INTERNET-DRAFT                                         December 1996
  1379.  
  1380. 3.3 Operation-Specific Data Structures 
  1381. 3.3.1 Initialization Request 
  1382. An Initialization request message (InitReq) contains an InitReqContent 
  1383. data structure which specifies the requested certificate(s).  Typically, 
  1384. SubjectPublicKeyInfo, KeyId, and Validity are the template fields which 
  1385. may be supplied for each certificate requested.
  1386.  
  1387.   InitReqContent ::= SEQUENCE { 
  1388.       protocolEncKey      [0] SubjectPublicKeyInfo  OPTIONAL,
  1389.       fullCertTemplates       FullCertTemplates
  1390.   }
  1391.  
  1392. 3.3.2 Initialization Response 
  1393. An Initialization response message (InitRep) contains an InitRepContent 
  1394. data structure which has for each certificate requested a PKIStatusInfo 
  1395. field, a subject certificate, and possibly a private key (normally 
  1396. encrypted with a session key, which is itself encrypted with the 
  1397. protocolEncKey).  
  1398.  
  1399.   InitRepContent ::= CertRepContent
  1400.  
  1401. 3.3.3 Registration/Certification Request 
  1402.  
  1403. A Registration/Certification request message (CertReq) contains a 
  1404. CertReqContent data structure which specifies the requested certificate. 
  1405.  
  1406.   CertReqContent ::= FullCertTemplates 
  1407.  
  1408. 3.3.4 Registration/Certification Response 
  1409.  
  1410. A registration response message (CertRep) contains a CertRepContent data 
  1411. structure which has a CA public key, a status value and optionally 
  1412. failure information, a subject certificate, and an encrypted private 
  1413. key. 
  1414.  
  1415.   CertRepContent ::= SEQUENCE { 
  1416.       caPub           [1] Certificate             OPTIONAL, 
  1417.       response            SEQUENCE OF CertResponse 
  1418.   }
  1419.  
  1420.   CertResponse ::= SEQUENCE { 
  1421.       certReqId           INTEGER,
  1422.       -- to match this response with corresponding request
  1423.       status              PKIStatusInfo, 
  1424.       certifiedKeyPair    CertifiedKeyPair    OPTIONAL
  1425.   }
  1426.  
  1427.   CertifiedKeyPair ::= SEQUENCE { 
  1428.       certificate     [0] Certificate         OPTIONAL,
  1429.  
  1430.  
  1431. Farrell, Adams                                              [Page 25]
  1432.  
  1433.  
  1434. INTERNET-DRAFT                                         December 1996
  1435.  
  1436.       encryptedCert   [1] EncryptedValue      OPTIONAL,
  1437.       privateKey      [2] EncryptedValue      OPTIONAL,
  1438.       publicationInfo [3] PKIPublicationInfo  OPTIONAL 
  1439.   }
  1440.  
  1441. Only one of the failInfo (in PKIStatusInfo) and certificate fields 
  1442. should be present in CertRepResponse (depending on the status). For some 
  1443. status values (e.g., waiting) neither of the optional fields will be 
  1444. present. 
  1445.  
  1446. The CertifiedKeyPair structure must contain either a Certificate or an 
  1447. EncryptedCert, and an optional EncryptedPrivateKey (i.e. not both a 
  1448. Certificate and EncryptedCert).
  1449.  
  1450. Given an EncryptedCert and the relevant decryption key the certificate 
  1451. may be obtained. The purpose of this is to allow a CA to return the 
  1452. value of a certificate, but with the constraint that only the intended 
  1453. recipient can obtain the actual certificate. The benefit of this 
  1454. approach is that a CA may reply with a certificate even in the absence 
  1455. of a proof that the requester is the end entity which can use the 
  1456. relevant private key (note that the proof is not obtained until the 
  1457. PKIConfirm message is received by the CA). Thus the CA will not have to 
  1458. revoke that certificate in the event that something goes wrong.
  1459. 3.3.5 Key update request content 
  1460. For key update requests the following syntax is used.  Typically, 
  1461. SubjectPublicKeyInfo, KeyId, and Validity are the template fields which 
  1462. may be supplied for each key to be updated. 
  1463.  
  1464.   KeyUpdReqContent ::= SEQUENCE { 
  1465.       protocolEncKey      [0] SubjectPublicKeyInfo  OPTIONAL, 
  1466.       fullCertTemplates   [1] FullCertTemplates     OPTIONAL 
  1467.   }
  1468.  
  1469. 3.3.6 Key Update response content 
  1470. For key update responses the syntax used is identical to the 
  1471. initialization response.
  1472.  
  1473.   KeyUpdRepContent ::= InitRepContent 
  1474.  
  1475. 3.3.7 Key Recovery Request content 
  1476.  
  1477. For key recovery requests the syntax used is identical to the 
  1478. initialization request InitReqContent.  Typically, SubjectPublicKeyInfo 
  1479. and KeyId are the template fields which may be used to supply a 
  1480. signature public key for which a certificate is required.
  1481.  
  1482.   KeyRecReqContent ::= InitReqContent 
  1483.  
  1484. 3.3.8 Key recovery response content 
  1485.  
  1486. For key recovery responses the following syntax is used.  For some 
  1487.  
  1488. Farrell, Adams                                              [Page 26]
  1489.  
  1490.  
  1491. INTERNET-DRAFT                                         December 1996
  1492.  
  1493. status values (e.g., waiting) none of the optional fields will be 
  1494. present.
  1495.  
  1496.   KeyRecRepContent ::= SEQUENCE { 
  1497.       status                  PKIStatusInfo,
  1498.       newSigCert          [0] Certificate                   OPTIONAL, 
  1499.       caCerts             [1] SEQUENCE OF Certificate       OPTIONAL,
  1500.       keyPairHist         [2] SEQUENCE OF CertifiedKeyPair  OPTIONAL
  1501.   }
  1502.  
  1503. 3.3.9 Revocation Request Content 
  1504. When requesting revocation of a certificate (or several certificates) 
  1505. the following data structure is used. The name of the requester is 
  1506. present in the PKIHeader structure. 
  1507.  
  1508.   RevReqContent ::= SEQUENCE OF RevDetails
  1509.  
  1510.   RevDetails ::= SEQUENCE { 
  1511.       certDetails         CertTemplate, 
  1512.       -- allows requester to specify as much as they can about 
  1513.       -- the cert. for which revocation is requested 
  1514.       -- (e.g. for cases in which serialNumber is not available)
  1515.       revocationReason    ReasonFlags, 
  1516.       -- from the DAM, so that CA knows which Dist. point to use
  1517.       badSinceDate        GeneralizedTime  OPTIONAL, 
  1518.       -- indicates best knowledge of sender 
  1519.       crlEntryDetails     Extensions 
  1520.       -- requested crlEntryExtensions 
  1521.   }
  1522.  
  1523. 3.3.10 Revocation Response Content 
  1524. The response to the above message. If produced, this is sent to the 
  1525. requester of the revocation. (A separate revocation announcement message 
  1526. may be sent to the subject of the certificate for which revocation was 
  1527. requested.) 
  1528.  
  1529.   RevRepContent ::= SEQUENCE { 
  1530.       status              PKIStatusInfo, 
  1531.       revCerts        [0] SEQUENCE OF CertId OPTIONAL, 
  1532.       -- identifies the certs for which revocation was requested 
  1533.       crls            [1] SEQUENCE OF CertificateList  OPTIONAL 
  1534.       -- the resulting CRLs (there may be more than one) 
  1535.   }
  1536.  
  1537. 3.3.11 Cross certification request content 
  1538. Cross certification requests use the same syntax as for normal 
  1539. certification requests with the restriction that the key should have 
  1540. been generated by the requesting CA and should not be sent to the 
  1541. responding CA. 
  1542.  
  1543.   CrossCertReqContent ::= CertReqContent 
  1544.  
  1545.  
  1546. Farrell, Adams                                              [Page 27]
  1547.  
  1548.  
  1549. INTERNET-DRAFT                                         December 1996
  1550.  
  1551. 3.3.12 Cross certification response content 
  1552.  
  1553. Cross certification responses use the same syntax as for normal 
  1554. certification responses with the restriction that no encrypted private 
  1555. key can be sent.
  1556.  
  1557.   CrossCertRepContent ::= CertRepContent 
  1558.  
  1559. 3.3.13 CA Key Update Announcement content 
  1560. When a CA updates its own key pair the following data structure may be 
  1561. used to announce this event.
  1562.  
  1563.   CAKeyUpdAnnContent ::= SEQUENCE { 
  1564.       oldWithNew          Certificate, -- old pub signed with new priv 
  1565.       newWithOld          Certificate, -- new pub signed with old priv 
  1566.       newWithNew          Certificate  -- new pub signed with new priv 
  1567.   }
  1568.  
  1569. 3.3.14 Certificate Announcement 
  1570. This data structure may be used to announce the existence of 
  1571. certificates. 
  1572.  
  1573. Note that this structure (and the CertAnn message itself) is intended to 
  1574. be used for those cases (if any) where there is no pre-existing method 
  1575. for publication of certificates; it is not intended to be used where, 
  1576. for example, X.500 is the method for publication of certificates. 
  1577.  
  1578.   CertAnnContent ::= Certificate 
  1579.  
  1580. 3.3.15 Revocation Announcement 
  1581. When a CA has revoked, or is about to revoke, a particular certificate 
  1582. it may issue an announcement of this (possibly upcoming) event. 
  1583.  
  1584.   RevAnnContent ::= SEQUENCE { 
  1585.       status              PKIStatus, 
  1586.       certId              CertId, 
  1587.       willBeRevokedAt     GeneralizedTime, 
  1588.       badSinceDate        GeneralizedTime, 
  1589.       crlDetails          Extensions  OPTIONAL 
  1590.       -- extra CRL details(e.g., crl number, reason, location, etc.) 
  1591. }
  1592.  
  1593. A CA may use such an announcement to warn (or notify) a subject that its 
  1594. certificate is about to be (or has been) revoked. This would typically 
  1595. be used where the request for revocation did not come from the subject 
  1596. concerned.
  1597.  
  1598. The willBeRevokedAt field contains the time at which a new entry will be 
  1599. added to the relevant CRLs.
  1600.  
  1601. 3.3.16 CRL Announcement 
  1602. 3.3.17 
  1603.  
  1604. Farrell, Adams                                              [Page 28]
  1605.  
  1606.  
  1607. INTERNET-DRAFT                                         December 1996
  1608.  
  1609. When a CA issues a new CRL (or set of CRLs) the following data structure 
  1610. may be used to announce this event. 
  1611.  
  1612.   CRLAnnContent ::= SEQUENCE OF CertificateList 
  1613.  
  1614. 3.3.18 PKI Confirmation content 
  1615. This data structure is used in three-way protocols as the final 
  1616. PKIMessage. Its content is the same in all cases - actually there is no 
  1617. content since the PKIHeader carries all the required information. 
  1618.  
  1619.   PKIConfirmContent ::= NULL 
  1620.  
  1621. 3.3.19 PKI Information Request content
  1622.  
  1623.   PKIInfoReqContent ::= BIT STRING {
  1624.       caProtEncCert       (0),
  1625.       signKeyPairTypes    (1),
  1626.       enckeyPairTypes     (2),
  1627.       preferredSymmAlg    (3),
  1628.       caKeyUpdateInfo     (4),
  1629.       currentCRL          (5)
  1630.   }
  1631.  
  1632. 3.3.20 PKI Information Response content
  1633.   PKIInfoRepContent ::= SEQUENCE {
  1634.       caProtEncCert      [0] Certificate                      OPTIONAL,
  1635.       signKeyPairTypes   [1] SEQUENCE OF AlgorithmIdentifier  OPTIONAL,
  1636.       encKeypairTypes    [2] SEQUENCE OF AlgorithmIdentifier  OPTIONAL,
  1637.       preferredSymmAlg   [3] AlgorithmIdentifier              OPTIONAL,
  1638.       caKeyUpdateInfo    [4] CAKeyUpdAnnContent               OPTIONAL,
  1639.       currentCRL         [5] CertificateList                  OPTIONAL
  1640.   }
  1641.  
  1642. 3.3.21 Error Message content
  1643.   ErrorMsgContent ::= SEQUENCE {
  1644.       pKIStatusInfo          PKIStatusInfo,
  1645.       errorCode              INTEGER                          OPTIONAL,
  1646.       -- implementation-specific error codes
  1647.       errorDetails           CHOICE { IA5String, BMPString }  OPTIONAL
  1648.       -- implementation-specific error details
  1649.   }
  1650.  
  1651. 4. PKI Management functions
  1652. The PKI management functions outlined in section 1 above are described 
  1653. in this section.
  1654.  
  1655. This section is split into two, the first part dealing with functions 
  1656. which are "mandatory" in the sense that all end-entity and CA/RA 
  1657. implementations must be able to provide functionality described via one 
  1658. of the transport mechanisms defined in section 5. This part is 
  1659. effectively the profile of the PKI management functionality which must 
  1660. be supported.
  1661.  
  1662.  
  1663. Farrell, Adams                                              [Page 29]
  1664.  
  1665. INTERNET-DRAFT                                         December 1996
  1666.  
  1667. The second part defines "additional" functions.
  1668.  
  1669. Note that not all PKI management functions result in the creation of a 
  1670. PKI message.
  1671. 4.1 Mandatory Functions
  1672. 4.1.1 Root CA initialisation
  1673. A newly created root CA must produce a "self-certificate" which is a 
  1674. Certificate structure with the profile defined for the "newWithNew" 
  1675. certificate issued following a root CA key update.
  1676.  
  1677. In  order to make the CA's self certificate useful to end entities which 
  1678. do not acquire this information via "out-of-band" means, the CA must 
  1679. also produce a fingerprint for its public key. End entities which 
  1680. acquire this value securely via some "out-of-band" means can then 
  1681. verify the CA's self-certificate and hence the other attributes 
  1682. contained therein.
  1683.  
  1684. The data structure used to carry the fingerprint is the OOBCertHash.
  1685.  
  1686. The root CA must also produce an initial revocation list.
  1687.  
  1688. 4.1.2 Root CA key update
  1689.  
  1690. 4.1.3 Subordinate CA initialisation
  1691. From the perspective of PKI management protocols the initialisation of a 
  1692. subordinate CA is the same as the initialisation of an end-entity. The 
  1693. only difference is that the subordinate CA must also produce an initial 
  1694. revocation list.
  1695. 4.1.4 CRL production
  1696. Before issuing any certificates a newly established CA (which issues 
  1697. CRLs) must produce "empty" versions of each CRL which is to be 
  1698. periodically produced.
  1699. 4.1.5 PKI information request
  1700. The above operations produce various data structures which are used in 
  1701. PKI management protocols.
  1702.  
  1703. When a PKI entity wishes to acquire information about the current status 
  1704. of a CA it may send that CA a PKIInfoReq PKIMessage. The response will 
  1705. be a PKIInfoRep message.
  1706.  
  1707. The CA should respond to the request with a response providing all of 
  1708. the information requested by the requester. If some of the information 
  1709. cannot be provided then an error message should be returned.
  1710.  
  1711. The PKIInfoReq and PKIInfoRep messages are protected using a MAC based 
  1712. on shared secret information (i.e., PasswordBasedMAC) or any other 
  1713. authenticated means (if the end entity has an existing certificate).
  1714. 4.1.6 Cross certification
  1715. The initiating CA is the CA which will become the subject of the cross-
  1716. certificate, the responding CA will become the issuer of the cross-
  1717.  
  1718. Farrell, Adams                                              [Page 30]
  1719.  
  1720.  
  1721. INTERNET-DRAFT                                         December 1996
  1722.  
  1723. certificate. 
  1724.  
  1725. The initiating CA must be "up and running" before initiating the cross-
  1726. certification operation. 
  1727.  
  1728. As with registration/certification there are a few possibilities here. 
  1729. 4.1.6.1 One-way request-response scheme: 
  1730. The cross-certification scheme is essentially a one way operation; that 
  1731. is, when successful, this operation results in the creation of one new 
  1732. cross-certificate. If the requirement is that cross- certificates be 
  1733. created in "both directions" then each CA in turn must initiate a cross-
  1734. certification operation (or use another scheme). 
  1735.  
  1736. This scheme is suitable where the two CAs in question can already verify 
  1737. each other's signatures (they have some common points of trust) or where 
  1738. there is an out-of-band verification of the origin of the certification 
  1739. request.
  1740.  
  1741. The followings steps occur: 
  1742.  
  1743. 1.The initiating CA gathers the information required for the cross 
  1744. certification request; 
  1745. 2.The initiating CA creates the cross-certification request message 
  1746. (CrossCertReq); 
  1747. 3.The CrossCertReq message is transported to the responding CA; 
  1748. 4.The responding CA processes the CrossCertReq -- this results in the 
  1749. creation of a cross-certification response (CrossCertRep) message; 
  1750. 5.The CrossCertRep message is transported to the initiating CA; 
  1751. 6.The initiating CA processes the CrossCertRep (depending on its content 
  1752. some looping may be required; that is, the initiating CA may have to 
  1753. await further responses or generate a new CrossCertReq for the 
  1754. responding CA);
  1755. 7.The initiating CA creates a PKIConfirm message and transports it to 
  1756. the responding CA.
  1757.  
  1758. Notes: 
  1759.  
  1760. 1.The CrossCertReq should contain a "complete" certification request, 
  1761. that is, all fields (including e.g. a BasicConstraints extension) should 
  1762. be specified by the initiating CA.
  1763. 2.The CrossCertRep message should contain the verification certificate 
  1764. of the responding CA - the initiating CA should then verify this via the 
  1765. "out-of-band" mechanism. 
  1766. 4.1.7 End entity initialisation
  1767. As with CAs, end entity's must be initialised. Initialisation of end 
  1768. entities requires two steps:
  1769.  
  1770.       - acquisition of PKI information
  1771.       - out-of-band verification of root-CA public key
  1772.  
  1773. 4.1.7.1 Acquisition of PKI information
  1774. The information required is:
  1775.  
  1776.  
  1777. Farrell, Adams                                              [Page 31]
  1778.  
  1779. INTERNET-DRAFT                                         December 1996
  1780.  
  1781. - the current root-CA public key
  1782. - (if the certifying CA is not a root-CA) the certification path from 
  1783. the root CA to the certifying CA together with appropriate revocation 
  1784. lists
  1785. - the algorithms and algorithm parameters which the certifying CA 
  1786. supports for each relevant usage
  1787.  
  1788. Additional information could be required (e.g. supported extensions
  1789. or CA policy information) in order to produce a certification request 
  1790. which will be successful. However, for simplicity we do not mandate that 
  1791. the end entity acquires this information via the PKI messages. The end 
  1792. result is simply that some certification requests may fail (e.g., if the 
  1793. end entity wants to generate its own encryption key but the CA doesn't 
  1794. allow that).
  1795.  
  1796. The required information is acquired as follows:
  1797.  
  1798.   - the end entity sends a pKIInfoReq to the certifying CA requesting 
  1799. (with the xxxxxx bits set) the information it requires;
  1800.  
  1801.   - the certifying CA responds with a pKIInfoRep message which contains 
  1802. the requested information.
  1803.  
  1804. 4.1.8 Certificate Update
  1805. When a certificate is due to expire the relevant end entity may request 
  1806. that the CA update the certificate - that is, that the CA issue a new 
  1807. certificate which differs from the previous one only in terms of PKI 
  1808. attributes (serialNumber, validity, some extensions) and is otherwise 
  1809. identical.
  1810.  
  1811. Two options must be catered for here, where the end entity initiates 
  1812. this operation, and where the CA initiates the operation and then 
  1813. creates a message informing the end entity of the existence of the new 
  1814. certificate.
  1815.  
  1816. 4.2 Additional Functions
  1817.  
  1818. 4.2.1 Cross certification
  1819. 4.2.1.1 Two-way request-response scheme: 
  1820. 4.2.1.1.1 Overview of Exchange 
  1821. This cross certification exchange allows two CAs to simultaneously 
  1822. certify each other. This means that each CA will create a certificate 
  1823. that contains the CA verification key of the other CA. 
  1824.  
  1825. Cross certification is initiated at one CA known as the responder.  The 
  1826. CA administrator for the responder identifies the CA it wants to cross 
  1827. certify and the responder CA equipment generates an authorization code. 
  1828. The responder CA administrator passes this authorization code by out-of-
  1829. band means to the requester CA administrator. The requester CA 
  1830. administrator enters the authorization code at the requester CA in order 
  1831. to initiate the on-line exchange. 
  1832.  
  1833.  
  1834. Farrell, Adams                                              [Page 32]
  1835.  
  1836.  
  1837. INTERNET-DRAFT                                         December 1996
  1838.  
  1839. The authorization code is used for authentication and integrity 
  1840. purposes. This is done by generating a symmetric key based on the 
  1841. authorization code and using the symmetric key for generating Message 
  1842. Authentication Codes (MACs) on all messages exchanged. 
  1843.  
  1844. Serial numbers and protocol version are used in the same manner as in 
  1845. the above CA-client exchanges. 
  1846.  
  1847. 4.2.1.1.2 Detailed Description 
  1848. The requester CA initiates the exchange by generating a random number 
  1849. (requester random number). The requester CA then sends the responder CA 
  1850. the message CrossReq. The fields in this message are protected from 
  1851. modification with a MAC based on the authorization code. 
  1852.  
  1853. Upon receipt of the CrossReq message, the responder CA checks the 
  1854. protocol version, saves the requester random number, generates its own 
  1855. random number (responder random number) and validates the MAC. It then 
  1856. generates and archives a new requester certificate which contains the 
  1857. requester CA public key and is signed with the responder CA signature 
  1858. private key. The responder CA responds with the message CrossRep. The 
  1859. fields in this message are protected from modification with a MAC based 
  1860. on the authorization code. 
  1861.  
  1862. Upon receipt of the CrossRep message,  the requester CA checks that its 
  1863. own system time is close to the responder CA system time, checks the 
  1864. received random numbers and validates the MAC. It then generates and 
  1865. archives a new responder certificate which contains the responder CA 
  1866. public key and is signed by the requester CA signature private key.  The 
  1867. requester CA responds with the message PKIConfirm. The fields in this 
  1868. message are protected from modification with a MAC based on the 
  1869. authorization code. 
  1870.  
  1871. Upon receipt of the PKIConfirm message, the responder CA checks the 
  1872. random numbers, archives the responder certificate, and validates the 
  1873. MAC. It writes both the request and responder certificates to the 
  1874. Directory. It then responds with its own PKIConfirm message. The fields 
  1875. in this message are protected from modification with a MAC based on the 
  1876. authorization code. 
  1877.  
  1878. Upon receipt of the PKIConfirm message, the requester CA checks the 
  1879. random numbers and validates the MAC. The requester CA writes both the 
  1880. requester and responder certificates to the Directory. 
  1881. 4.2.2 End entity initialisation
  1882. As with CAs, end entities must be initialised. Initialisation of end 
  1883. entities requires two steps:
  1884.  
  1885.       - acquisition of PKI information
  1886.       - out-of-band verification of root-CA public key
  1887.  
  1888. 4.2.2.1 Acquisition of PKI information
  1889. See previous section.
  1890.  
  1891.  
  1892. Farrell, Adams                                              [Page 33]
  1893.  
  1894.  
  1895. INTERNET-DRAFT                                         December 1996
  1896.  
  1897. 4.2.2.2 Import of CA key fingerprint
  1898. An end entity must possess the public key of it's root CA. One method to 
  1899. achieve this is to provide the end entity with the CA's public key 
  1900. fingerprint via some secure "out-of-band" means. The end entity can 
  1901. then securely use the CA's self-certificate.
  1902.  
  1903. The data structure used is the OOBcertHash
  1904.  
  1905. 5. Transports 
  1906. The transport protocols specified below allow end entities, RAs and CAs 
  1907. to pass PKI messages between them. There should be no requirement for 
  1908. specific security mechanisms to be applied at this level as the PKI 
  1909. messages should be suitably protected.
  1910.  
  1911. Caution should be taken that no "password" encrypted value is sent 
  1912. across a network using these protocols. If values are to be encrypted 
  1913. based on passwords then they should be transported using off-line means 
  1914. (e.g. files).
  1915. 5.1 File based protocol
  1916. A file containing a PKI message should contain only the DER encoding of 
  1917. one PKI message, i.e. there should be no extraneous header or trailer 
  1918. information in the file.
  1919.  
  1920. Such files can be used to transport PKI messages using e.g. FTP. 
  1921. 5.2 Socket based Management Protocol 
  1922. The following simple socket based protocol is to be used for transport 
  1923. of PKI messages. This protocol is suitable for cases where an end entity 
  1924. (or an RA) initiates a transaction and can poll to pick up the results. 
  1925.  
  1926. If a transaction is initiated by a PKI entity (RA or CA) then an end 
  1927. entity must either supply a listener process or be supplied with a 
  1928. polling reference (see below) in order to allow it to pick up the PKI 
  1929. message from the PKI management component.
  1930.  
  1931. The protocol basically assumes a listener process (on an RA or CA) which 
  1932. can accept PKI messages on a well defined port (port number TBS). 
  1933. Typically an initiator binds to this port and submits the initial PKI 
  1934. message for a given transaction ID. The responder replies with a PKI 
  1935. message and/or with a reference number to be used later when polling for 
  1936. the actual PKI message response. 
  1937.  
  1938. If a number of PKI response messages are to be produced for a given 
  1939. request (say if some part of the request is handled more quickly than 
  1940. another) then a new polling reference is also returned.
  1941.  
  1942. When the final PKI response message has been picked up by the initiator 
  1943. then no new polling reference is supplied.
  1944.  
  1945. The initiator of a transaction sends a "socket PKI message" to the 
  1946. recipient. The recipient responds with a similar message.
  1947.  
  1948.  
  1949.  
  1950. Farrell, Adams                                              [Page 34]
  1951.  
  1952.  
  1953. INTERNET-DRAFT                                         December 1996
  1954.  
  1955. A "socket PKI message" consists of:
  1956.  
  1957.       length (32-bits), flag (8-bits), value (defined below)
  1958.  
  1959. The length field contains the number of octets of the remainder of the 
  1960. message (i.e. number of octets of "value" plus one).
  1961.  
  1962. Message name
  1963. flag
  1964. value
  1965. comment
  1966.  
  1967.  
  1968.  
  1969.  
  1970. msgReq        `00'H  DER-encoded PKI message      PKI message from initiator
  1971. pollRep       `01'H  polling reference (32-bits)  poll response where no PKI 
  1972.                                                   message response ready; use 
  1973.                                                   polling reference value for 
  1974.                                                   later polling
  1975. pollReq       `02'H  polling reference (32 bits)  request for a PKI message 
  1976.                                                   response to initial message
  1977. negPollRep    `03'H  `00'H                        no further polling responses 
  1978.                                                   (i.e., transaction complete)
  1979. partialMsgRep `04'H  next polling reference       partial response to initial
  1980.                      (32-bits),                   message plus new polling
  1981.                      DER encoded PKI message      reference to use to get next
  1982.                                                   part of response
  1983. finalMsgRep   `05'H  DER encoded PKI message      final (and possibly sole) 
  1984.                                                   response to initial message
  1985. errorMsgRep   `06'H  human readable error         produced when an error is
  1986.                      message                      detected (e.g., a polling
  1987.                                                   reference is received which 
  1988.                                                   doesn't exist or is finished 
  1989.                                                   with)
  1990.  
  1991. Where a PKIConfirm message is to be transported (always from the 
  1992. initiator to the responder) then a msgReq message is sent and a 
  1993. negPollRep is returned.
  1994.  
  1995. The sequence of messages which can occur is then:
  1996.  
  1997. a) end entity sends msgReq and receives one of pollRep, negPollRep, 
  1998. partialMsgRep or finalMsgRep in response.
  1999. b) end entity sends pollReq message and receives one of negPollRep, 
  2000. partialMsgRep, finalMsgRep or ErrorMsgRep in response.
  2001. 5.3 Management Protocol via E-mail 
  2002.  
  2003.   << To be supplied.  This subsection will specify a means for 
  2004.   conveying ASN.1-encoded messages for the protocol exchanges described 
  2005.   in Section 4 via Internet mail. >> 
  2006.  
  2007.  
  2008. Farrell, Adams                                              [Page 35]
  2009.  
  2010. INTERNET-DRAFT                                         December 1996
  2011.  
  2012. 5.4 Management Protocol via HTTP 
  2013.  
  2014.   << To be supplied.  This subsection will specify a means for 
  2015.   conveying ASN.1-encoded messages for the protocol exchanges described 
  2016.   in Section 4 over WWW browser-server links, employing HTTP or related 
  2017.   WWW protocols. >> 
  2018.  
  2019. 6. SAMPLES 
  2020.  
  2021. <<TBS>>
  2022.  
  2023. SECURITY CONSIDERATIONS 
  2024.  
  2025.    This entire memo is about security mechanisms. 
  2026.  
  2027. One cryptographic consideration is worth explicitly spelling out. In the 
  2028. protocols specified above, when an end entity is required to prove 
  2029. possession of a decryption key, it is effectively challenged 
  2030. to decrypt something (its own certificate). This scheme (and many 
  2031. others!) could be vulnerable to an attack if the possessor of the 
  2032. decryption key in question could be fooled into decrypting an arbitrary 
  2033. challenge and returning the cleartext to an attacker. Although in this 
  2034. specification a number of other failures in security are required in 
  2035. order for this attack to succeed, it is conceivable that some future 
  2036. services (e.g., notary, trusted time) could potentially be vulnerable to 
  2037. such attacks. For this reason we re-iterate the general rule that 
  2038. implementations should be very careful about decrypting arbitrary 
  2039. "ciphertext" and revealing recovered "plaintext" since such a 
  2040. practice can lead to serious security vulnerabilities.
  2041.  
  2042.  
  2043.  
  2044. Authors' Addresses 
  2045.  
  2046.    Stephen Farrell 
  2047.    Software and Systems Engineering Ltd. 
  2048.    Fitzwilliam Court 
  2049.    Leeson Close 
  2050.    Dublin 2 
  2051.    IRELAND 
  2052.    stephen.farrell@sse.ie 
  2053.  
  2054.    Carlisle Adams 
  2055.    Nortel Secure Networks 
  2056.    PO Box 3511, Station C 
  2057.    Ottawa, Ontario 
  2058.    Canada K1Y 4H7 
  2059.    cadams@entrust.com 
  2060.  
  2061.  
  2062.  
  2063. APPENDIX A: Reasons for the presence of RAs
  2064.  
  2065. The reasons which justify the presence of an RA can be split into those 
  2066. which are due to technical factors and those which are organizational in 
  2067. nature. Technical reasons include the following. 
  2068.  
  2069.   -If hardware tokens are in use, then not all end entities will have 
  2070. the equipment needed to initialize these; the RA equipment can include 
  2071. the necessary functionality (this may also be a matter of policy). 
  2072.  
  2073.   -Some end entities may not have the capability to publish 
  2074. certificates; again, the RA may be suitably placed for this. 
  2075.  
  2076.   -The RA will be able to issue signed revocation requests on behalf of 
  2077. end entities associated with it, whereas the end entity may not be able 
  2078. to do this (if the key pair is completely lost). 
  2079.  
  2080.  
  2081. Farrell, Adams                                              [Page 36]
  2082.  
  2083.  
  2084. INTERNET-DRAFT                                         December 1996
  2085.  
  2086.   Some of the organisational reasons which argue for the presence of an 
  2087. RA are the following. 
  2088.  
  2089.   -It may be more cost effective to concentrate functionality in the RA 
  2090. equipment than to supply functionality to all end entities  (especially 
  2091. if special token initialization equipment is to be used). 
  2092.  
  2093.   -Establishing RAs within an organization can reduce the number of CAs 
  2094. required, which is sometimes desirable. 
  2095.  
  2096.   -RAs may be better placed to identify people with their "electronic" 
  2097. names, especially if the CA is physically remote from the end entity. 
  2098.  
  2099.   -For many applications there will already be in place some 
  2100. administrative structure so that candidates for the role of RA are easy 
  2101. to find (which may not be true of the CA). 
  2102.  
  2103.  
  2104. Appendix B. PKI management message profiles.
  2105.  
  2106. This appendix contains detailed profiles for those PKIMessages which 
  2107. must be supported by conforming implementations.
  2108.  
  2109. Profiles for the PKIMessages used in the following PKI management 
  2110. operations are provided:
  2111.  
  2112. - root CA key update
  2113. - information  request/reponse
  2114. - cross-certification (1-way)
  2115. - initial registration and certification
  2116.     - centralised scheme
  2117.     - basic authenticated scheme
  2118.  
  2119. <<Later revisions will extend the above to include profiles for the 
  2120. operations listed below>>
  2121.  
  2122. - certificate update
  2123.     - end entity initiated
  2124.     - PKI initiated
  2125. - key update
  2126. - revocation request
  2127. - certificate publcation
  2128. - CRL publication
  2129. 1. General Rules for interpretation of these profiles.
  2130.  
  2131. 1. Where fields are not mentioned in individual profiles then they 
  2132. should be absent (if OPTIONAL or DEFAULT) from the relevant 
  2133. message. For example, pvno is never mentioned since it is always 
  2134. fixed for this version of the specification.
  2135. 2. Where structures occur in more than one message, they are 
  2136. separately profiled as appropriate.
  2137. 3. The algorithmIdentifiers from PKIMessage structures are profiled 
  2138. separately.
  2139. 4. A "special" X.500 DN is called the "NULL-DN"; this means a DN 
  2140. containing a zero-
  2141. 5. 
  2142. Farrell, Adams                                              [Page 37]
  2143.  
  2144.  
  2145. INTERNET-DRAFT                                         December 1996
  2146.  
  2147. 1. length SEQUENCE OF rdns (it's DER encoding is then `3000'H).
  2148. 2. Where a GeneralName is required for a field but no suitable 
  2149. value is available (e.g. an end-entity produces a request before 
  2150. knowing its name) then the GeneralName is to be an X.500 NULL-DN 
  2151. (i.e. the Name field of the CHOICE is to contain a NULL-DN). 
  2152. This special value can be called a "NULL-GeneralName".
  2153. 3. Where a profile omits to specify the value for a GeneralName 
  2154. then the NULL-GeneralName value is to be present in the relevant 
  2155. PKIMessage field. This occurs with the sender field of the 
  2156. PKIHeader for some messages.
  2157. 4. Where any ambiguity arises due to naming of fields, the profile 
  2158. names these using a "dot" notation (e.g., 
  2159. "certTemplate.subject" means the subject field within a field 
  2160. called certTemplate).
  2161. 5. Where a "SEQUENCE OF types" is part of a message, a zero-based 
  2162. array notation is used to describe fields within the SEQUENCE OF 
  2163. (e.g., FullCertTemplates[0].certTemplate.subject refers to a 
  2164. subfield of the first FullCertTemplate contained in a request 
  2165. message).
  2166. 6. All PKI message exchanges (other than the centralised initial 
  2167. registration/certification scheme) require a PKIConfirm message 
  2168. to be sent by the initiating entity.  This message is not 
  2169. included in many of the profiles given below since its body is 
  2170. NULL and its header contents are clear from the context.  Any 
  2171. authenticated means can be used for the protectionAlg (e.g., 
  2172. password-based MAC, if shared secret information is known, or 
  2173. signature).
  2174.  
  2175.  
  2176. <<profiles TBS>>
  2177.  
  2178.  
  2179. Appendix C: "Compilable" ASN.1 Module
  2180.  
  2181.  
  2182.   PKIMessage ::= SEQUENCE { 
  2183.       header           PKIHeader, 
  2184.       body             PKIBody, 
  2185.       protection   [0] PKIProtection OPTIONAL,
  2186.       extraCerts   [1] SEQUENCE OF Certificate OPTIONAL
  2187.  
  2188.  
  2189. Farrell, Adams                                              [Page 38]
  2190.  
  2191.  
  2192. INTERNET-DRAFT                                         December 1996
  2193.  
  2194.   }
  2195.  
  2196.   PKIHeader ::= SEQUENCE { 
  2197.       pvno                INTEGER     { ietf-version1 (0) }, 
  2198.       sender              GeneralName, 
  2199.       -- identifies the sender
  2200.       recipient           GeneralName, 
  2201.       -- identifies the intended recipient
  2202.       messageTime     [0] GeneralizedTime        OPTIONAL, 
  2203.       -- time of production of this message (used when sender
  2204.       -- believes that the transport will be "suitable"; i.e., 
  2205.       -- that the time will still be meaningful upon receipt)
  2206.       protectionAlg   [1] AlgorithmIdentifier    OPTIONAL, 
  2207.       -- algorithm used for calculation of protection bits
  2208.       senderKID       [2] KeyIdentifier          OPTIONAL,
  2209.       recipKID        [3] KeyIdentifier          OPTIONAL,
  2210.       -- to identify specific keys used for protection
  2211.       transactionID   [4] OCTET STRING           OPTIONAL, 
  2212.       -- identifies the transaction, i.e. this will be the same in 
  2213.            -- corresponding request, response and confirmation messages
  2214.       senderNonce     [5] OCTET STRING           OPTIONAL, 
  2215.       recipNonce      [6] OCTET STRING           OPTIONAL, 
  2216.       -- nonces used to provide replay protection, senderNonce 
  2217.       -- is inserted by the creator of this message; recipNonce 
  2218.       -- is a nonce previously inserted in a related message by 
  2219.       -- the intended recipient of this message 
  2220.       freeText        [7] PKIFreeText            OPTIONAL
  2221.       -- this may be used to indicate context-specific 
  2222.       -- instructions (this field is intended for human 
  2223.       -- consumption) 
  2224.   }
  2225.  
  2226.   PKIFreeText ::= CHOICE { 
  2227.       iA5String  [0] IA5String, 
  2228.       bMPString  [1] BMPString
  2229.   }
  2230.  
  2231.   PKIBody ::= CHOICE {       -- message-specific body elements 
  2232.       ir      [0]  InitReqContent, 
  2233.       ip      [1]  InitRepContent, 
  2234.       cr      [2]  CertReqContent, 
  2235.       cp      [3]  CertRepContent, 
  2236.       kur     [4]  KeyUpdReqContent, 
  2237.       kup     [5]  KeyUpdRepContent, 
  2238.       krr     [6]  KeyRecReqContent, 
  2239.       krp     [7]  KeyRecRepContent, 
  2240.       rr      [8]  RevReqContent, 
  2241.       rp      [9]  RevRepContent, 
  2242.       ccr     [10] CrossCertReqContent, 
  2243.       ccp     [11] CrossCertRepContent, 
  2244.       ckuann  [12] CAKeyUpdAnnContent, 
  2245.       cann    [13] CertAnnContent, 
  2246.  
  2247.  
  2248. Farrell, Adams                                              [Page 39]
  2249.  
  2250. INTERNET-DRAFT                                         December 1996
  2251.  
  2252.       rann    [14] RevAnnContent, 
  2253.       crlann  [15] CRLAnnContent, 
  2254.       conf    [16] PKIConfirmContent, 
  2255.       nested  [17] NestedMessageContent,
  2256.       infor   [18] PKIInfoReqContent,
  2257.       infop   [19] PKIInfoRepContent,
  2258.       error   [20] ErrorMsgContent
  2259.   }
  2260.  
  2261.   PKIProtection ::= BIT STRING 
  2262.  
  2263.   ProtectedPart ::= SEQUENCE { 
  2264.       header    PKIHeader, 
  2265.       body      PKIBody
  2266.   }
  2267.  
  2268.   PasswordBasedMac ::= OBJECT IDENTIFIER
  2269.  
  2270.   PBMParameter ::= SEQUENCE {
  2271.       salt                OCTET STRING,
  2272.       owf                 AlgorithmIdentifier,
  2273.       -- AlgId for a One-Way Function (SHA-1 recommended)
  2274.       iterationCount      INTEGER,
  2275.       -- number of times the OWF is applied
  2276.       mac                 AlgorithmIdentifier
  2277.       -- the MAC AlgId (e.g., DES-MAC or Triple-DES-MAC [PKCS #11])
  2278.   }
  2279.  
  2280.   DHBasedMac ::= OBJECT IDENTIFIER
  2281.  
  2282.   DHBMParameter ::= SEQUENCE {
  2283.       owf                 AlgorithmIdentifier,
  2284.       -- AlgId for a One-Way Function (SHA-1 recommended)
  2285.       mac                 AlgorithmIdentifier
  2286.       -- the MAC AlgId (e.g., DES-MAC or Triple-DES-MAC [PKCS #11])
  2287.   }
  2288.  
  2289.   NestedMessageContent ::= ANY 
  2290.   -- This will be a PKIMessage
  2291.  
  2292.   CertTemplate ::= SEQUENCE { 
  2293.       version    [0] Version               OPTIONAL, 
  2294.       -- used to ask for a particular syntax version 
  2295.       serial     [1] INTEGER               OPTIONAL, 
  2296.       -- used to ask for a particular serial number 
  2297.       signingAlg [2] AlgorithmIdentifier   OPTIONAL, 
  2298.       -- used to ask the CA to use this alg. for signing the cert 
  2299.       subject    [3] Name                  OPTIONAL, 
  2300.       validity   [4] OptionalValidity      OPTIONAL, 
  2301.       issuer     [5] Name                  OPTIONAL, 
  2302.       publicKey  [6] SubjectPublicKeyInfo  OPTIONAL, 
  2303.       issuerUID  [7] UniqueIdentifier      OPTIONAL, 
  2304.  
  2305.  
  2306. Farrell, Adams                                              [Page 40]
  2307.  
  2308. INTERNET-DRAFT                                         December 1996
  2309.  
  2310.       subjectUID [8] UniqueIdentifier      OPTIONAL, 
  2311.       extensions [9] Extensions            OPTIONAL
  2312.       -- the extensions which the requester would like in the cert. 
  2313.   }
  2314.  
  2315.   OptionalValidity ::= SEQUENCE { 
  2316.       notBefore  [0] UTCTime OPTIONAL, 
  2317.       notAfter   [1] UTCTime OPTIONAL 
  2318.   }
  2319.  
  2320.   EncryptedValue ::= SEQUENCE { 
  2321.       encValue          BIT STRING, 
  2322.       -- the encrypted value itself
  2323.       intendedAlg   [0] AlgorithmIdentifier  OPTIONAL,
  2324.       -- the intended algorithm for which the value will be used
  2325.       symmAlg       [1] AlgorithmIdentifier  OPTIONAL, 
  2326.       -- the symmetric algorithm used to encrypt the value 
  2327.       encSymmKey    [2] BIT STRING           OPTIONAL,
  2328.       -- the (encrypted) symmetric key used to encrypt the value
  2329.       keyAlg        [3] AlgorithmIdentifier  OPTIONAL 
  2330.       -- algorithm used to encrypt the symmetric key 
  2331.   }
  2332.  
  2333.   PKIStatus ::= INTEGER { 
  2334.       granted                (0), 
  2335.       -- you got exactly what you asked for 
  2336.       grantedWithMods        (1), 
  2337.       -- you got something like what you asked for; the 
  2338.       -- requester is responsible for ascertaining the differences 
  2339.       rejection              (2), 
  2340.       -- you don't get it, more information elsewhere in the message
  2341.       waiting                (3), 
  2342.       -- the request body part has not yet been processed, 
  2343.       -- expect to hear more later 
  2344.       revocationWarning      (4), 
  2345.       -- this message contains a warning that a revocation is 
  2346.       -- imminent 
  2347.       revocationNotification (5), 
  2348.       -- notification that a revocation has occurred 
  2349.       keyUpdateWarning       (6)
  2350.       -- update already done for the oldCertId specified in 
  2351.       -- FullCertTemplate
  2352.   }
  2353.  
  2354.   PKIFailureInfo ::= BIT STRING { 
  2355.   -- since we can fail in more than one way! 
  2356.       badAlg           (0), 
  2357.       badMessageCheck  (1) 
  2358.       -- more TBS
  2359.   }
  2360.  
  2361.   PKIStatusInfo ::= SEQUENCE {
  2362.  
  2363.  
  2364. Farrell, Adams                                              [Page 41]
  2365.  
  2366. INTERNET-DRAFT                                         December 1996
  2367.  
  2368.       status    PKIStatus, 
  2369.       failInfo  PKIFailureInfo  OPTIONAL
  2370.   }
  2371.  
  2372.   CertId ::= SEQUENCE { 
  2373.       issuer           GeneralName, 
  2374.       serialNumber     INTEGER 
  2375.   }
  2376.  
  2377.   OOBCert ::= Certificate 
  2378.  
  2379.   OOBCertHash ::= SEQUENCE { 
  2380.       hashAlg     [0] AlgorithmIdentifier     OPTIONAL, 
  2381.       certId      [1] CertId                  OPTIONAL, 
  2382.       hashVal         BIT STRING
  2383.       -- hashVal is calculated over DER encoding of the 
  2384.       -- subjectPublicKey field of the corresponding cert. 
  2385.   }
  2386.  
  2387.   PKIArchiveOptions ::= CHOICE {
  2388.       encryptedPrivKey     [0] EncryptedValue,
  2389.       -- the actual value of the private key
  2390.       keyGenParameters     [1] KeyGenParameters,
  2391.       -- parameters which allow the private key to be re-generated
  2392.       archiveRemGenPrivKey [2] BOOLEAN
  2393.       -- set to TRUE if sender wishes receiver to archive the private
  2394.       -- key of a key pair which the receiver generates in response to
  2395.       -- this request; set to FALSE if no archival is desired.
  2396. }
  2397.  
  2398.   KeyGenParameters ::= OCTET STRING
  2399.       -- actual syntax is <<TBS>>
  2400.       -- an alternative to sending the key is to send the information 
  2401.       -- about how to re-generate the key (e.g. for many RSA 
  2402.       -- implementations one could send the first random number tested 
  2403.       -- for primality)
  2404.  
  2405.   PKIPublicationInfo ::= SEQUENCE {
  2406.      action     INTEGER {
  2407.                   dontPublish (0),
  2408.                   pleasePublish (1)
  2409.                 },
  2410.      pubInfos  SEQUENCE OF SinglePubInfo OPTIONAL
  2411.        -- pubInfos should not be present if action is "dontPublish"
  2412.        -- (if action is "pleasePublish" and pubInfos is omitted, 
  2413.        -- "dontCare" is assumed)
  2414.   }
  2415.  
  2416.   SinglePubInfo ::= SEQUENCE {
  2417.       pubMethod    INTEGER {
  2418.           dontCare    (0),
  2419.           x500        (1),
  2420.  
  2421.  
  2422. Farrell, Adams                                              [Page 42]
  2423.  
  2424. INTERNET-DRAFT                                         December 1996
  2425.  
  2426.           web         (2)
  2427.       },
  2428.       pubLocation  GeneralName OPTIONAL
  2429.   }
  2430.  
  2431.   FullCertTemplates ::= SEQUENCE OF FullCertTemplate
  2432.  
  2433.   FullCertTemplate ::= SEQUENCE {
  2434.       certReqId              INTEGER,
  2435.       -- to match this request with corresponding response
  2436.       -- (note:  must be unique over all FullCertReqs in this message)
  2437.       certTemplate           CertTemplate,
  2438.       popoSigningKey     [0] POPOSigningKey      OPTIONAL,
  2439.       archiveOptions     [1] PKIArchiveOptions   OPTIONAL,
  2440.       publicationInfo    [2] PKIPublicationInfo  OPTIONAL,
  2441.       oldCertId          [3] CertId              OPTIONAL
  2442.       -- id. of cert. which is being updated by this one
  2443.   }
  2444.  
  2445.   POPOSigningKey ::= SEQUENCE {
  2446.       alg                 AlgorithmIdentifier,
  2447.       signature           BIT STRING
  2448.       -- the signature (using "alg") on the DER-encoded 
  2449.       -- POPOSigningKeyInput structure given below
  2450.   }
  2451.  
  2452.   POPOSigningKeyInput ::= SEQUENCE {
  2453.       authInfo            CHOICE {
  2454.           sender              [0] GeneralName,
  2455.           -- from PKIHeader (used only if an authenticated identity
  2456.           -- has been established for the sender (e.g., a DN from a
  2457.           -- previously-issued and currently-valid certificate)
  2458.           publicKeyMAC        [1] BIT STRING
  2459.           -- used if no authenticated GeneralName currently exists for
  2460.           -- the sender; publicKeyMAC contains a password-based MAC
  2461.           -- (using the protectionAlg AlgId from PKIHeader) on the
  2462.           -- DER-encoded value of publicKey
  2463.       },
  2464.       publicKey           SubjectPublicKeyInfo    -- from CertTemplate
  2465.   }
  2466.  
  2467.   InitReqContent ::= SEQUENCE { 
  2468.       protocolEncKey      [0] SubjectPublicKeyInfo  OPTIONAL,
  2469.       fullCertTemplates       FullCertTemplates
  2470.   }
  2471.  
  2472.   InitRepContent ::= CertRepContent
  2473.  
  2474.   CertReqContent ::= FullCertTemplates 
  2475.  
  2476.   CertRepContent ::= SEQUENCE { 
  2477.       caPub           [1] Certificate             OPTIONAL, 
  2478.  
  2479.  
  2480. Farrell, Adams                                              [Page 43]
  2481.  
  2482. INTERNET-DRAFT                                         December 1996
  2483.  
  2484.       response            SEQUENCE OF CertResponse 
  2485.   }
  2486.  
  2487.   CertResponse ::= SEQUENCE { 
  2488.       certReqId           INTEGER,
  2489.       -- to match this response with corresponding request
  2490.       status              PKIStatusInfo, 
  2491.       certifiedKeyPair    CertifiedKeyPair    OPTIONAL
  2492.   }
  2493.  
  2494.   CertifiedKeyPair ::= SEQUENCE { 
  2495.       certificate     [0] Certificate         OPTIONAL,
  2496.       encryptedCert   [1] EncryptedValue      OPTIONAL,
  2497.       privateKey      [2] EncryptedValue      OPTIONAL,
  2498.       publicationInfo [3] PKIPublicationInfo  OPTIONAL 
  2499.   }
  2500.  
  2501.   KeyUpdReqContent ::= SEQUENCE { 
  2502.       protocolEncKey      [0] SubjectPublicKeyInfo  OPTIONAL, 
  2503.       fullCertTemplates   [1] FullCertTemplates     OPTIONAL 
  2504.   }
  2505.  
  2506.   KeyUpdRepContent ::= InitRepContent 
  2507.  
  2508.   KeyRecReqContent ::= InitReqContent 
  2509.  
  2510.   KeyRecRepContent ::= SEQUENCE { 
  2511.       status                  PKIStatusInfo,
  2512.       newSigCert          [0] Certificate                   OPTIONAL, 
  2513.       caCerts             [1] SEQUENCE OF Certificate       OPTIONAL,
  2514.       keyPairHist         [2] SEQUENCE OF CertifiedKeyPair  OPTIONAL
  2515.   }
  2516.  
  2517.   RevReqContent ::= SEQUENCE OF RevDetails
  2518.  
  2519.   RevDetails ::= SEQUENCE { 
  2520.       certDetails         CertTemplate, 
  2521.       -- allows requester to specify as much as they can about 
  2522.       -- the cert. for which revocation is requested 
  2523.       -- (e.g. for cases in which serialNumber is not available)
  2524.       revocationReason    ReasonFlags, 
  2525.       -- from the DAM, so that CA knows which Dist. point to use
  2526.       badSinceDate        GeneralizedTime  OPTIONAL, 
  2527.       -- indicates best knowledge of sender 
  2528.       crlEntryDetails     Extensions 
  2529.       -- requested crlEntryExtensions 
  2530.   }
  2531.  
  2532.   RevRepContent ::= SEQUENCE { 
  2533.       status              PKIStatusInfo, 
  2534.       revCerts        [0] SEQUENCE OF CertId OPTIONAL, 
  2535.       -- identifies the certs for which revocation was requested 
  2536.  
  2537.  
  2538. Farrell, Adams                                              [Page 44]
  2539.  
  2540. INTERNET-DRAFT                                         December 1996
  2541.  
  2542.       crls            [1] SEQUENCE OF CertificateList  OPTIONAL 
  2543.       -- the resulting CRLs (there may be more than one) 
  2544.   }
  2545.  
  2546.   CrossCertReqContent ::= CertReqContent 
  2547.  
  2548.   CrossCertRepContent ::= CertRepContent 
  2549.  
  2550.   CAKeyUpdAnnContent ::= SEQUENCE { 
  2551.       oldWithNew          Certificate, -- old pub signed with new priv 
  2552.       newWithOld          Certificate, -- new pub signed with old priv 
  2553.       newWithNew          Certificate  -- new pub signed with new priv 
  2554.   }
  2555.  
  2556.   CertAnnContent ::= Certificate 
  2557.  
  2558.   RevAnnContent ::= SEQUENCE { 
  2559.       status              PKIStatus, 
  2560.       certId              CertId, 
  2561.       willBeRevokedAt     GeneralizedTime, 
  2562.       badSinceDate        GeneralizedTime, 
  2563.       crlDetails          Extensions  OPTIONAL 
  2564.       -- extra CRL details(e.g., crl number, reason, location, etc.) 
  2565. }
  2566.  
  2567.   CRLAnnContent ::= SEQUENCE OF CertificateList 
  2568.  
  2569.   PKIConfirmContent ::= NULL 
  2570.  
  2571.   PKIInfoReqContent ::= BIT STRING {
  2572.       caProtEncCert       (0),
  2573.       signKeyPairTypes    (1),
  2574.       enckeyPairTypes     (2),
  2575.       preferredSymmAlg    (3),
  2576.       caKeyUpdateInfo     (4),
  2577.       currentCRL          (5)
  2578.   }
  2579.  
  2580.   PKIInfoRepContent ::= SEQUENCE {
  2581.       caProtEncCert      [0] Certificate                      OPTIONAL,
  2582.       signKeyPairTypes   [1] SEQUENCE OF AlgorithmIdentifier  OPTIONAL,
  2583.       encKeypairTypes    [2] SEQUENCE OF AlgorithmIdentifier  OPTIONAL,
  2584.       preferredSymmAlg   [3] AlgorithmIdentifier              OPTIONAL,
  2585.       caKeyUpdateInfo    [4] CAKeyUpdAnnContent               OPTIONAL,
  2586.       currentCRL         [5] CertificateList                  OPTIONAL
  2587.   }
  2588.  
  2589.   ErrorMsgContent ::= SEQUENCE {
  2590.       pKIStatusInfo          PKIStatusInfo,
  2591.       errorCode              INTEGER                          OPTIONAL,
  2592.       -- implementation-specific error codes
  2593.       errorDetails           CHOICE { IA5String, BMPString }  OPTIONAL
  2594.  
  2595.  
  2596. Farrell, Adams                                              [Page 45]
  2597.  
  2598. INTERNET-DRAFT                                         December 1996
  2599.  
  2600.       -- implementation-specific error details
  2601.   }
  2602.  
  2603.  
  2604.