idnits 2.17.1 draft-ietf-lamps-ocsp-nonce-04.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 : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC6960, but the abstract doesn't seem to directly say this. It does mention RFC6960 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC6960, updated by this document, for RFC5378 checks: 2002-02-04) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (September 2, 2020) is 1332 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 3 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 Updates: 6960 (if approved) September 2, 2020 5 Intended status: Standards Track 6 Expires: March 6, 2021 8 OCSP Nonce Extension 9 draft-ietf-lamps-ocsp-nonce-04 11 Abstract 13 This document specifies the updated format of the Nonce extension in 14 Online Certificate Status Protocol (OCSP) request and response 15 messages. OCSP is used to check the status of a certificate and the 16 Nonce extension is used in the OCSP request and response messages to 17 avoid replay attacks. This document updates the RFC 6960. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on March 6, 2021. 36 Copyright Notice 38 Copyright (c) 2020 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (https://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 55 2. OCSP Extensions . . . . . . . . . . . . . . . . . . . . . . . 3 56 2.1. Nonce Extension . . . . . . . . . . . . . . . . . . . . . 3 57 3. Security Considerations . . . . . . . . . . . . . . . . . . . 4 58 3.1. Replay Attack . . . . . . . . . . . . . . . . . . . . . . 4 59 3.2. Nonce Collision . . . . . . . . . . . . . . . . . . . . . 4 60 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 61 5. Changes to Appendix B. of RFC 6960 . . . . . . . . . . . . . 5 62 5.1. Changes to Appendix B.1. OCSP in ASN.1 - 1998 Syntax . . 5 63 5.2. Changes to Appendix B.2 OCSP in ASN.1 - 2008 Syntax . . . 5 64 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 65 6.1. Normative References . . . . . . . . . . . . . . . . . . 5 66 6.2. Informative References . . . . . . . . . . . . . . . . . 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 section 4.4.1 of [RFC6960]. The [RFC6960] does 74 not mention any minimum and maximum length of the nonce extension. 75 Due to not having an upper or lower limit of the length of the Nonce 76 extension, the OCSP responders that follow [RFC6960] may be 77 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 an 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]. [RFC6960] also defines the standard extensions for 96 OCSP messages based on the extension model employed in X.509 version 97 3 certificates (see [RFC5280]). The following is a 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 the specification of any of the other standard 112 extensions. 114 2.1. Nonce Extension 116 This section replaces the entirety of the Section 4.4.1 of [RFC6960] 117 which 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 at 126 least 1 octet and can be up to 32 octets. 128 A server MUST reject any OCSP request having a Nonce extension with 129 length of 0 octets or more than 32 octets with the malformedRequest 130 OCSPResponseStatus as described in section 4.2.1 of [RFC6960]. 132 The value of the nonce MUST be generated using a cryptographically 133 strong pseudorandom number generator (see [RFC4086]). The OCSP 134 clients SHOULD use a length of 32 octets for the Nonce extension. 135 The minimum nonce length of 1 octet is defined to provide the 136 backward compatibility with older clients following [RFC6960] 137 however, the newer OCSP clients MUST use a length of at least 16 138 octets for Nonce extension. The OCSP responder MAY choose to ignore 139 Nonce extension for the requests where length of the Nonce extension 140 is less than 16 octets. 142 id-pkix-ocsp OBJECT IDENTIFIER ::= { id-ad-ocsp } 143 id-pkix-ocsp-nonce OBJECT IDENTIFIER ::= { id-pkix-ocsp 2 } 145 Nonce ::= OCTET STRING(SIZE(1..32)) 147 3. Security Considerations 149 The security considerations of OCSP, in general, are described in the 150 [RFC6960]. The Nonce extension is used to avoid replay attacks 151 during the interval in which the previous OCSP response for a 152 certificate is not expired but the responder has a changed status for 153 that certificate. Including client's Nonce value in the OCSP 154 response makes sure that the response is the latest response from the 155 server and not an old copy. 157 3.1. Replay Attack 159 The Nonce extension is used to avoid replay attacks. Since the OCSP 160 responder may choose to not send the Nonce extension in the OCSP 161 response even if the client has sent the Nonce extension in the 162 request [RFC5019], an on-path attacker can intercept the OCSP request 163 and respond with an earlier response from the server without the 164 Nonce extension. This can be mitigated by configuring the server to 165 use a short time interval between thisUpdate and nextUpdate fields in 166 the OCSP response. 168 3.2. Nonce Collision 170 If the value of the nonce used by a client in OCSP request is not 171 random enough, then an attacker may prefetch responses with the 172 predicted nonce and can replay them, thus defeating the purpose of 173 using nonce. Therefore the value of Nonce extension in the OCSP 174 request MUST contain cryptographically strong randomness and MUST be 175 freshly generated at the time of creating the OCSP request. Also if 176 the length of the nonce extension is too small e.g. 1 octet then an 177 on-path attacker can prefetch responses with all the possible values 178 of the nonce and replay a matching nonce. 180 4. IANA Considerations 182 This document does not call for any IANA actions. 184 5. Changes to Appendix B. of RFC 6960 186 This section updates the ASN.1 definitions of the OCSP Nonce 187 extension in the Appendix B.1 and Appendix B.2 of the [RFC6960] The 188 Appendix B.1 defines OCSP using ASN.1 - 1998 Syntax and Appendix B.2 189 defines OCSP using ASN.1 - 2008 Syntax 191 5.1. Changes to Appendix B.1. OCSP in ASN.1 - 1998 Syntax 193 OLD Syntax: 195 The definition of OCSP Nonce Extension is not provided in the 196 Appendix B.1 of [RFC6960] for the ASN.1 - 1998 Syntax. 198 NEW Syntax: 200 Nonce ::= OCTET STRING(SIZE(1..32)) 202 5.2. Changes to Appendix B.2 OCSP in ASN.1 - 2008 Syntax 204 OLD Syntax: 206 re-ocsp-nonce EXTENSION ::= { SYNTAX OCTET STRING IDENTIFIED 207 BY id-pkix-ocsp-nonce } 209 NEW Syntax: 211 re-ocsp-nonce EXTENSION ::= { SYNTAX OCTET STRING(SIZE(1..32)) 212 IDENTIFIED BY id-pkix-ocsp-nonce } 214 6. References 216 6.1. Normative References 218 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 219 Requirement Levels", BCP 14, RFC 2119, 220 DOI 10.17487/RFC2119, March 1997, 221 . 223 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 224 2119 Key Words", DOI 10.17487/RFC8174, RFC 8174, BCP 14, 225 May 2017, . 227 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 228 Housley, R., and W. Polk, "Internet X.509 Public Key 229 Infrastructure Certificate and Certificate Revocation List 230 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 231 . 233 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 234 Galperin, S., and C. Adams, "X.509 Internet Public Key 235 Infrastructure Online Certificate Status Protocol - OCSP", 236 RFC 6960, DOI 10.17487/RFC6960, June 2013, 237 . 239 6.2. Informative References 241 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 242 "Randomness Requirements for Security", BCP 106, RFC 4086, 243 DOI 10.17487/RFC4086, June 2005, 244 . 246 [RFC4732] Handley, M., Ed., Rescorla, E., Ed., and IAB, "Internet 247 Denial-of-Service Considerations", RFC 4732, 248 DOI 10.17487/RFC4732, December 2006, 249 . 251 [RFC5019] Deacon, A. and R. Hurst, "The Lightweight Online 252 Certificate Status Protocol (OCSP) Profile for High-Volume 253 Environments", RFC 5019, DOI 10.17487/RFC5019, September 254 2007, . 256 Author's Address 258 Mohit Sahni (editor) 259 Palo Alto Networks 260 3000 Tannery Way 261 Santa Clara, CA 95054 262 US 264 Email: msahni@paloaltonetworks.com