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-ocsp-00.txt < prev    next >
Text File  |  1997-10-23  |  18KB  |  498 lines

  1. PKIX Working Group                                         Michael Myers
  2. draft-ietf-pkix-ocsp-00.txt                               VeriSign, Inc.
  3. Expires in 6 months                                       September 1997
  4.  
  5.  
  6.                    Internet Public Key Infrastructure
  7.                 Online Certificate Status Protocol - OCSP
  8.                    <draft-ietf-pkix-ocsp-00.txt>
  9.  
  10.  
  11.  
  12. 1.  Status of this Memo
  13.  
  14. This document is an Internet-Draft. Internet-Drafts  are  working  docu-
  15. ments  of the Internet Engineering Task Force (IETF), its areas, and its
  16. working groups. Note that other groups may also distribute working docu-
  17. ments as Internet-Drafts.
  18.  
  19. Internet-Drafts are draft documents valid for a maximum  of  six  months
  20. and  may  be  updated,  replaced, or obsoleted by other documents at any
  21. time. It is inappropriate to use Internet-Drafts as  reference  material
  22. or to cite them other than as "work in progress."
  23.  
  24. To learn the current status of  any  Internet-Draft,  please  check  the
  25. "1id-abstracts.txt"  listing  contained  in  the  Internet-Drafts Shadow
  26. Directories   on   ftp.is.co.za   (Africa),   nic.nordu.net    (Europe),
  27. munnari.oz.au   (Pacific  Rim),  ds.internic.net  (US  East  Coast),  or
  28. ftp.isi.edu (US West Coast).
  29.  
  30. 1. Abstract
  31.  
  32. The protocol conventions described in this document satisfy some of the 
  33. operational requirements of the Internet Public Key Infrastructure 
  34. (PKI).  This document specifies an HTTP-based application protocol use-
  35. ful in determining the current status of a digital certificate without 
  36. the use of CRLs.  Additional mechanisms addressing PKIX operational re-
  37. quirements are specified in separate documents.
  38.  
  39. Please send comments on this document to the ietf-pkix@tandem.com mail 
  40. list.
  41.  
  42. 2. Protocol Overview
  43.  
  44. In lieu of or as a supplement to checking against a periodic CRL, it may 
  45. be necessary to obtain timely status regarding a  certificateÆs revoca-
  46. tion state (cf. PKIX Part 1, Section 3.3). Examples include high-value 
  47. funds transfer or the compromise of a highly sensitive key.
  48.  
  49. The Online Certificate Status Protocol (OCSP) enables applications to 
  50. efficiently and rapidly determine the validity and revocation state of 
  51. an identified certificate.  An OCSP client issues a status request to an 
  52. OCSP responder and suspends acceptance of the subject certificate until 
  53. the responder provides a response. 
  54.  
  55.  
  56. Myers                                                           [Page 1]
  57.  
  58.  
  59.  
  60.  
  61.  
  62. INTERNET DRAFT                                          October 21, 1997
  63.  
  64. 2.1 Request
  65.  
  66. An OCSP request contains the following data:
  67.  
  68. - protocol version
  69. - service request
  70. - target certificate identifier or a single end-entity certificate
  71.  
  72. Upon receipt of a request, an OCSP Responder first determines if: 1) the 
  73. message is well formed, 2) the responder is configured to provide the 
  74. requested service, and 3) the responder can perform the requested serv-
  75. ice for the subject certificate.  If any one of the prior conditions are 
  76. not met, an error message is produced; otherwise, a definitive response 
  77. is returned.
  78.  
  79. 2.2 Response
  80.  
  81. All definitive response messages shall be digitally signed.  The key 
  82. used to sign definitive responses need not be the same signing key used 
  83. to sign the certificate. Note that caching signed responses for fre-
  84. quently requested certificates may optionally provide some support for 
  85. reducing the cryptographic and bandwidth loads on the responder.
  86.  
  87. A definitive response message is composed of:
  88.  
  89. - date and time of response
  90. - target certificate identifier
  91. - certificate status value
  92. - identification of public key needed to validate the signature
  93. - signature algorithm OID
  94. - signature computed across hash of previous five values
  95.  
  96. This specification defines the following definitive response indicators 
  97. for use in the certificate status value:
  98.  
  99. - VALID
  100. - INVALID       {includes reason text}
  101. - REVOKED       {includes X.509 reason code}
  102. - EXPIRED       {includes date of expiration}
  103. - ON HOLD
  104. - NOT ACTIVE
  105.  
  106. The path validation logic implied by the VALID and INVALID indicators is 
  107. that defined by PKIX Part 1.
  108.  
  109. The INVALID state is distinguished from the REVOKED and EXPIRED states 
  110. in that a valid certificate may be revoked or expired but such informa-
  111. tion on an invalid certificate is misleading.
  112.  
  113.  
  114. Myers                                                           [Page 2]
  115.  
  116.  
  117.  
  118.  
  119.  
  120. INTERNET DRAFT                                          October 21, 1997
  121.  
  122. The ON HOLD state corresponds to valid certificates that are operation-
  123. ally suspended in accordance with PKIX Part 1.
  124. A request that receives a NOT ACTIVE response is a special case created 
  125. by the inclusion of a prior_to date field (see section 4.2).
  126.  
  127. Signed error messages extend the set of definitive response indicators 
  128. to include the following error conditions:
  129.  
  130. - ILLFORMED MESSAGE
  131. - NO SERVICE
  132.  
  133.  
  134. 3. Functional Requirements
  135.  
  136. 3.1 Certificate Content
  137.  
  138. In order to convey to OCSP clients a well-known point of information ac-
  139. cess, CAs shall provide the capability to include the AuthorityInfoAc-
  140. cess extension (defined in PKIX Part 1, section 4.2.2.1) in certificates 
  141. intended to be applied to the service.
  142.  
  143. CAs that support an OCSP service, either hosted locally or provided by a 
  144. Trusted Third Party, shall provide a value for a uniformResourceIndica-
  145. tor (URI) accessLocation and the OID value id-pkix-ocsp for the access-
  146. Method in the AccessDescription SEQUENCE.
  147.  
  148. The value of the accessLocation field in the subject certificate corre-
  149. sponds to the URL placed into an OCSP request (see section 5.1).
  150.  
  151. 3.2 Request Generation and Submission
  152.  
  153. OCSP clients shall be capable of transmitting OCSP as an HTTP 1.0 GET 
  154. and of receiving the response as the Entity-Body of an HTTP 1.0 Full-
  155. Response.
  156.  
  157. 3.3 Error Responses
  158.  
  159. Upon receipt of a request which fails to parse, the receiving OCSP re-
  160. sponder shall respond with an error message.  If the responder is con-
  161. figured to provide signed error responses, a failure to parse an incom-
  162. ing request shall be indicated by an ILLFORMED MESSAGE response.  The 
  163. value of the identifier of such a response shall be NULL_ID.
  164.  
  165. For service requests not supported by the responder, the responder shall 
  166. respond with an error message. If the responder is configured to provide 
  167. signed error responses, non-availability of the requested service shall 
  168. be indicated by a NO SERVICE response.
  169.  
  170.  
  171. Myers                                                           [Page 3]
  172.  
  173.  
  174.  
  175.  
  176.  
  177. INTERNET DRAFT                                          October 21, 1997
  178.  
  179. This protocol makes use of HTTP as a transport.  OCSP clients should 
  180. consequently enable automatic recovery from a lost connection.  An HTTP 
  181. timeout mechanism is one conventional means of doing so.
  182.  
  183. 3.4 Status Responses
  184.  
  185. Upon receipt of an OCSP request containing an end-entity certificate, if 
  186. the certificate fails to validate against Section 6 of PKIX Part 1 for 
  187. reasons other than revocation, OCSP responders shall respond with INVA-
  188. LID.  Responses may be supplemented with explanatory text that provides 
  189. additional context.  Section 5.2 of this document specifies a minimal 
  190. set of explanatory text for this purpose.
  191.  
  192. The OCSP service request syntax provides a means for clients to bound 
  193. the date of interest through the use of a prior_to field. Requests con-
  194. cerned with current status would thus include the current date in the 
  195. prior_to field while requests concerned with the validity of aged signed 
  196. content may supply the date of the signed document.  
  197.  
  198. The following mandatory and optional requirements apply to OCSP respond-
  199. ers with respect to prior_to field and current date:
  200.  
  201. 1.  Shall be capable of generating responses to requests that contain 
  202. values for prior_to matching the current date.
  203.  
  204. 2.  May provide services for values of prior_to that are earlier than the 
  205. current date.
  206.  
  207. 3.  Shall respond with NO SERVICE if the prior_to date in a request is 
  208. later than the current date.
  209.  
  210. The means by which OCSP clients and servers establish a common value for 
  211. "current date" is beyond the scope of this document.
  212.  
  213. If the prior_to date is earlier than the notBefore date of certificateÆs 
  214. validity interval and the certificate otherwise satisfies the validation 
  215. requirements of Section 6 of PKIX Part 1, OCSP servers shall respond 
  216. with NOT ACTIVE.
  217.  
  218. If the prior_to date lies within the subject certificateÆs validity in-
  219. terval and the certificate otherwise satisfies the validation require-
  220. ments of Section 6 of PKIX Part 1, OCSP servers shall respond with 
  221. VALID.
  222.  
  223. If the prior_to date lies within the subject certificateÆs validity in-
  224. terval and the certificate has been revoked by its issuing Certification 
  225. Authority, OCSP servers shall respond with REVOKED.
  226.  
  227. If the prior_to date specifies a date beyond the notAfter date in the 
  228. certificateÆs validity interval and the certificate has not been revoked 
  229.  
  230. Myers                                                           [Page 4]
  231.  
  232.  
  233.  
  234.  
  235. INTERNET DRAFT                                          October 21, 1997
  236.  
  237. by its issuing Certification Authority, OCSP responders shall respond 
  238. with EXPIRED.
  239.  
  240. If the prior_to date specifies a date beyond the notAfter date in the 
  241. certificateÆs validity interval and the certificate has been revoked by 
  242. its issuing Certification Authority, OCSP responders shall respond with 
  243. REVOKED.
  244.  
  245. 3.5 Signed Response Acceptance Requirements
  246.  
  247. Prior to accepting a signed response as valid, OCSP clients shall con-
  248. firm that:
  249.  
  250. 1.  The certificate identified in a received response corresponds to that 
  251. which was identified in a former request;
  252.  
  253. 2.  The signature on the response is valid;
  254.  
  255. 3.  The identity of the signer matches the intended recipient of the re-
  256. quest.
  257.  
  258. 4. Detailed Protocol
  259.  
  260. 4.1 Request Syntax
  261.  
  262. An OCSP request is an HTTP 1.0 GET method composed of a URL followed by 
  263. a sequence of keyword-value pairs. The following grammar specifies the 
  264. request portion of the protocol.  Quoted syntactic elements are terminal 
  265. elements of the grammar.
  266.  
  267. OCSP_request     :      url request version target
  268. url              :      protocol "://" domain_name "/"
  269. protocol         :      "http"
  270. request          :      service_class "/" action "/" prior_to
  271. version          :      "2"
  272. service_class    :      "status"
  273. action           :      "check"
  274. prior_to         :      "prior_to" time
  275. time             :      YYYYMMDDHHMMSSZ
  276. target           :      cert or cert_id
  277. cert             :      "cert" "/" certificate
  278. certificate      :      {base-64 encoding of single certificate}
  279. trans_id         :      {an opaque identifier}
  280. cert_id          :      "ID" "/" hash
  281. hash             :      md5_hash(Issuer DN | cert serial number)
  282.  
  283. The value of "2" for the version field accommodates preliminary imple-
  284. mentations of a different request and response syntax.
  285.  
  286. To produce a value for the cert_id field, the client first calculates an 
  287. MD5 hash across the concatenation of Issuer DN with the serial number in
  288.  
  289. Myers                                                           [Page 5]
  290.  
  291.  
  292.  
  293.  
  294.  
  295. INTERNET DRAFT                                          October 21, 1997
  296.  
  297. the target certificate, base-64 encodes the hash and appends the result 
  298. to the prior fields.
  299.  
  300. The "prior_to" constraint indicates a client request for the status of a 
  301. certificate prior to the specified time.
  302.  
  303. 4.2 Response Syntax
  304.  
  305. An HTTP-based OCSP response is composed of a sequence of data fields 
  306. separated by a "#" character.  Response codes are returned as the ASCII 
  307. encoding of a decimal number.  Values with a minus sign (ASCII encoding 
  308. of "-") indicate definitive error values.
  309.  
  310. OCSP_response      :    definitive_rsp | error_rsp
  311. definitive_rsp     :    base status_value signature_block
  312. error_rsp          :    minimal_error | definitive_error
  313.  
  314. minimal_error      :    0x20                             // " " //
  315. definitive_error   :    base error_value signature_block
  316.  
  317. base               :    time "#" prior_id "#"
  318. time               :    YYYYMMDDHHMMSSZ
  319. prior_id           :    // cert_id of prior request //
  320.  
  321. error_value        :    illformed_msg | no_service
  322. illformed_msg      :    0x2d 0x31                       // "-1" //
  323. no_service         :    0x2d 0x32                       // "-2" //
  324. status_value       :    status_code {reason_text or date_text} "#"
  325. status_code        :    valid|invalid|revoked|not_revoked|expired 
  326. valid              :    0x31                            // "1"  //
  327. invalid            :    0x32                            // "2"  //
  328. revoked            :    0x33                            // "3"  //
  329. expired            :    0x34                            // "4"  //
  330. on_hold            :    0x35                            // "5"  //
  331. not_active         :    0x36                            // "6"  //
  332. reason_text        :    {for additional context}
  333. date_text          :    YYYYMMDDHHMMSSZ
  334. signature_block    :    key_id "#" sig_alg_oid "#" signature
  335. key_id             :    // SHA-1 hash of public key needed to
  336.                            validate signature //
  337. sig_alg_oid        :    // algorithm combination used to produce sig //
  338. signature          :    // base-64 encoded value corresponding to 
  339.                            the result of using sig-alg-oid //
  340.  
  341. Standard values for reason_text shall include:
  342. "1   The root for this certificate is not trusted on this responder."
  343. "2   Could not find CAÆs public key."
  344. "3   CAÆs public key invalid."
  345.  
  346. Myers                                                           [Page 6]
  347.  
  348.  
  349.  
  350.  
  351.  
  352. INTERNET DRAFT                                          October 21, 1997
  353.  
  354. "4   CAÆs public key revoked."
  355. "5   CAÆs public key expired."
  356. "6   CA not authorized for SubjectÆs name."
  357. "7   CA not authorized for SubjectÆs privileges."
  358. "8   CAÆs public key did not validate signature."
  359. "9   Could not find CAÆs revocation information."
  360. "10  CAÆs CRL out of date."
  361.  
  362. When producing REVOKED responses, OCSP responders shall include the date 
  363. of the revocation in the status_value field.
  364.  
  365. To produce a value for the cert_id field, the client first calculates an 
  366. MD5 hash across the concatenation of Issuer DN with the serial number in 
  367. the target certificate, base-64 encodes the hash and appends the result 
  368. to the prior fields.
  369.  
  370. To produce a signed response, the responder first calculates a hash 
  371. across the sequence
  372.  
  373.         { time#prior_id#status_value#key_id#sig_alg_oid# },
  374.  
  375. signs the hash, base-64 encodes the result and then appends it to the 
  376. prior fields.  The associated hash and signing algorithms are identified 
  377. by the value of sig_alg_oid.
  378.  
  379. If a request contains a direct certificate instead of a cert_id--and the 
  380. request results in a definitive response--OCSP responders shall calcu-
  381. late a cert_id as defined in section 5.1 of this specification and in-
  382. clude the resultant value in the cert_id field of the response.
  383.  
  384. 4.3 Mandatory and Optional Cryptographic Algorithms
  385.  
  386. Clients that request OCSP services shall be capable of processing re-
  387. sponses signed used DSA keys identified by the DSA sig_alg_oid specified 
  388. in section 7.2.2 of PKIX Part 1.  Clients should also be capable of 
  389. processing RSA signatures as specified in section 7.2.1 of PKIX Part 1.
  390.  
  391. 4.4 Responder Key Identification
  392.  
  393. It is possible that an OCSP responder may have more than one valid pub-
  394. lic signature key of the same cryptographic algorithm.  To assist cli-
  395. ents in identifying which public key to use, OCSP responders shall in-
  396. clude in all signed responses a SHA-1 hash of the required public key.
  397.  
  398. It is also possible that an OCSP client may be in possession of more 
  399. than one valid certificate containing the OCSP responderÆs public key.  
  400.  
  401. This specification asserts no constraints on the means by which clients 
  402. determine which certificate to use.
  403.  
  404.  
  405. Myers                                                           [Page 7]
  406.  
  407.  
  408.  
  409.  
  410.  
  411. INTERNET DRAFT                                          October 21, 1997
  412.  
  413.  
  414. 4.5 HTTP Transport Mechanism
  415.  
  416. The request syntax is intended to mimic a file system GET via HTTP in 
  417. order for it to be cached by local proxy responders.
  418.  
  419. OCSP requests are composed as an HTTP 1.0 GET as follows:
  420.  
  421. GET <request> HTTP/1.0
  422.  
  423. Conversely, OCSP responders shall be capable of receiving such queries.
  424.  
  425. The response to such a query is the Entity-Body of an HTTP 1.0 Full-
  426. Response as defined in RFC 1945 with Content-Type: XX/XX.
  427.  
  428. 5. Security Considerations
  429.  
  430. For this service to be effective, certificate using systems must connect 
  431. to the certificate status service provider. In the event such a connec-
  432. tion cannot be obtained, certificate-using systems should implement CRL 
  433. processing logic as a fall-back position.
  434.  
  435. A denial of service vulnerability is evident with respect to a flood of 
  436. queries constructed to produce error responses.  The production of a 
  437. cryptographic signature significantly affects response generation cycle 
  438. time, thereby exacerbating the situation. Performance studies on a pre-
  439. liminary implementation of OCSP capable of handling two million hits per 
  440. day without degradation suggest this effect is of an orders of magnitude 
  441. per response. Unsigned error responses provide a reasonable tradeoff 
  442. against protection against this particular attack.
  443.  
  444. The use of unsigned error messages introduces a vulnerability to inter-
  445. mediation attacks. It is reasonable to ask for error messages to be 
  446. signed to address this vulnerability.  A request to do so however must 
  447. also consider the converse risk identified aboveùnamely that increasing 
  448. the response cycle time of error messages through use of cryptographic 
  449. signing increases the impact of flooding attacks.  Parties implementing 
  450. OCSP responders that wish to offer the benefit of signed error responses 
  451. should strongly consider the use of hardware-assisted cryptography.  Do-
  452. ing so will reduce the threat of flood attacks.
  453.  
  454. 6. References
  455. [HTTP] Hypertext Transfer Protocol -- HTTP/1.0. T. Berners-Lee,
  456.        R. Fielding & H. Frystyk, RFC 1945, May 1996. 
  457.  
  458. 7. AuthorÆs Address
  459.  
  460. Michael Myers
  461. VeriSign, Inc.
  462. 1390 Shorebird Way
  463. Mountain View, CA 94019
  464. mmyers@verisign.com
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493. Myers                                                           [Page 8]
  494.  
  495. INTERNET DRAFT                                          October 14, 1997
  496.  
  497.  
  498.