idnits 2.17.1 draft-msahni-lamps-ocsp-nonce-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 3, 2020) is 1455 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 249 Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 LAMPS M. Sahni, Ed. 3 Internet-Draft Palo Alto Networks 4 Intended status: Standards Track April 3, 2020 5 Expires: October 5, 2020 7 OCSP Nonce Extension 8 draft-msahni-lamps-ocsp-nonce-03 10 Abstract 12 This document specifies the updated format of the Nonce extension in 13 Online Certificate Status Protocol (OCSP) request and response 14 messages. OCSP is used to check the status of a certificate and the 15 Nonce extension is used in the OCSP request and response messages to 16 avoid replay attacks. This document updates the RFC 6960 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at https://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on October 5, 2020. 35 Copyright Notice 37 Copyright (c) 2020 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (https://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 54 2. OCSP Extensions . . . . . . . . . . . . . . . . . . . . . . . 2 55 2.1. Nonce Extension . . . . . . . . . . . . . . . . . . . . . 3 56 3. Security Considerations . . . . . . . . . . . . . . . . . . . 4 57 3.1. Replay Attack . . . . . . . . . . . . . . . . . . . . . . 4 58 3.2. Nonce Collision . . . . . . . . . . . . . . . . . . . . . 4 59 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 60 5. Changes to Appendix B. of RFC 6960 . . . . . . . . . . . . . 4 61 5.1. Changes to Appendix B.1. OCSP in ASN.1 - 1998 Syntax . . 4 62 5.2. Changes to Appendix B.2 OCSP in ASN.1 - 2008 Syntax . . . 5 63 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 64 6.1. Normative References . . . . . . . . . . . . . . . . . . 5 65 6.2. Informative References . . . . . . . . . . . . . . . . . 6 66 6.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 6 67 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 69 1. Introduction 71 This document updates the usage and format of the Nonce extension 72 used in OCSP request and response messages. This extension was 73 previously defined in the section 4.1.1 of [RFC6960]. The [RFC6960] 74 does not mention any minimum and maximum length of the nonce 75 extension. Due to not having an upper or lower limit of the length 76 of the Nonce extension, the OCSP responders that follow [RFC6960] may 77 be vulnerable to various attacks like Denial of Service attacks 78 [RFC4732], chosen prefix attacks to get a desired signature from the 79 OCSP responder and possible evasions that can use the Nonce extension 80 data for evasion. This document specifies a lower limit of 1 and 81 upper limit of 32 to the length of the Nonce extension. This 82 document updates the [RFC6960]. 84 1.1. Terminology 86 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 87 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 88 "OPTIONAL" in this document are to be interpreted as described in BCP 89 14 [RFC2119] [RFC8174] when, and only when, they appear in all 90 capitals, as shown here. 92 2. OCSP Extensions 94 The message format for the OCSP request and response is defined in 95 the [RFC6960]. It also defines the standard extensions for OCSP 96 messages based on the extension model employed in X.509 version 3 97 certificates (see [RFC5280]). Following is the list of standard 98 extensions that can be used in the OCSP messages by the OCSP 99 responder and OCSP client. 101 * Nonce 102 * CRL References 103 * Acceptable Response Types 104 * Archive Cutoff 105 * CRL Entry Extensions 106 * Service Locator 107 * Preferred Signature Algorithms 108 * Extended Response Definition 110 This document only specifies the new format for Nonce extension and 111 does not change specification of any of the other standard 112 extensions. 114 2.1. Nonce Extension 116 This section updates the Section 4.4.1 [1] of [RFC6960] which 117 describes the OCSP Nonce extension. 119 The nonce cryptographically binds a request and a response to prevent 120 replay attacks. The nonce is included as one of the 121 requestExtensions in requests, while in responses it would be 122 included as one of the responseExtensions. In both the request and 123 the response, the nonce will be identified by the object identifier 124 id-pkix-ocsp-nonce, while the extnValue is the value of the nonce. 125 If Nonce extension is present then the length of nonce MUST be 126 atleast 1 octet and can be upto 32 octets. 128 A server MUST reject any OCSP request having a Nonce extension with 129 length of more than 32 octets with the malformedRequest 130 OCSPResponseStatus as described in section 4.2.1 of [RFC6960] 132 The minimum nonce length of 1 octet is defined to provide the 133 backward compatibility with clients following [RFC6960]. However the 134 newer OCSP clients MUST use length of atleast 16 octets for Nonce 135 extension and the value of the nonce MUST be generated using a 136 cryptographically strong pseudorandom number generator. 138 id-pkix-ocsp OBJECT IDENTIFIER ::= { id-ad-ocsp } 140 id-pkix-ocsp-nonce OBJECT IDENTIFIER ::= { id-pkix-ocsp 2 } 142 Nonce ::= OCTET STRING(SIZE(1..32)) 144 3. Security Considerations 146 The security considerations of OCSP in general are described in the 147 [RFC6960]. The Nonce extension is used to avoid replay attacks 148 during the interval in which the previous OCSP response for a 149 certificate is not expired but responder has a changed status for 150 that certificate. Including client's Nonce value in the OCSP 151 response makes sure that the response is a latest response from the 152 server and not an old copy. 154 3.1. Replay Attack 156 The Nonce extension is used to avoid replay attacks. Since the OCSP 157 responder may choose to not send the Nonce extension in the OCSP 158 response even if the client has sent the Nonce extension in the 159 request [RFC5019], a man in the middle (MITM) entity can intercept 160 the OCSP request and respond with a earlier response from the server 161 without the Nonce extension. This can be mitigated by server using a 162 closer nextUpdate value in the OCSP response. 164 3.2. Nonce Collision 166 If the value of the nonce used by a client is not random enough, then 167 the attacker may pre fetch responses with the predicted nonce and can 168 replay them, thus defeating the purpose of using nonce. Therefore 169 the client MUST use a nonce value that contains cryptographically 170 strong randomness and is freshly generated. Also if the length of 171 the nonce is very small e.g. 1 octet then attacker can pre fetch 172 responses with all the possible vaule of nonce and replay a matching 173 nonce. A client SHOULD use 32 octets for the nonce length. 175 4. IANA Considerations 177 This document does not include any new media type registrations 178 for OCSP. 180 5. Changes to Appendix B. of RFC 6960 182 This section updates the ASN.1 definitions of the OCSP Nonce 183 extension in the Appendix B.1 and Appendix B.2 of the [RFC6960] The 184 appendix B.1 defines OCSP using ASN.1 - 1998 Syntax and appendix B.2 185 defines OCSP using ASN.1 - 2008 Syntax 187 5.1. Changes to Appendix B.1. OCSP in ASN.1 - 1998 Syntax 189 OLD Syntax: 191 The definition of OCSP Nonce Extension is not provided in the 192 Appendix B.1 of [RFC6960] for the ASN.1 - 1998 Syntax. 194 NEW Syntax: 196 Nonce ::= OCTET STRING(SIZE(1..32)) 198 5.2. Changes to Appendix B.2 OCSP in ASN.1 - 2008 Syntax 200 OLD Syntax: 202 re-ocsp-nonce EXTENSION ::= { SYNTAX OCTET STRING IDENTIFIED 203 BY id-pkix-ocsp-nonce } 205 NEW Syntax: 207 re-ocsp-nonce EXTENSION ::= { SYNTAX OCTET STRING(SIZE(1..32)) 208 IDENTIFIED BY id-pkix-ocsp-nonce } 210 6. References 212 6.1. Normative References 214 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 215 Requirement Levels", BCP 14, RFC 2119, 216 DOI 10.17487/RFC2119, March 1997, 217 . 219 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 220 2119 Key Words", DOI 10.17487/RFC8174, RFC 8174, BCP 14, 221 May 2017, . 223 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 224 Housley, R., and W. Polk, "Internet X.509 Public Key 225 Infrastructure Certificate and Certificate Revocation List 226 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 227 . 229 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 230 Galperin, S., and C. Adams, "X.509 Internet Public Key 231 Infrastructure Online Certificate Status Protocol - OCSP", 232 RFC 6960, DOI 10.17487/RFC6960, June 2013, 233 . 235 6.2. Informative References 237 [RFC4732] Handley, M., Ed., Rescorla, E., Ed., and IAB, "Internet 238 Denial-of-Service Considerations", RFC 4732, 239 DOI 10.17487/RFC4732, December 2006, 240 . 242 [RFC5019] Deacon, A. and R. Hurst, "The Lightweight Online 243 Certificate Status Protocol (OCSP) Profile for High-Volume 244 Environments", RFC 5019, DOI 10.17487/RFC5019, September 245 2007, . 247 6.3. URIs 249 [1] https://tools.ietf.org/html/rfc6960#section-4.4.1 251 Author's Address 253 Mohit Sahni (editor) 254 Palo Alto Networks 256 Email: msahni@paloaltonetworks.com