draft-ietf-lamps-ocsp-nonce-05.txt | rfc8954.txt | |||
---|---|---|---|---|
LAMPS M. Sahni, Ed. | Internet Engineering Task Force (IETF) M. Sahni, Ed. | |||
Internet-Draft Palo Alto Networks | Request for Comments: 8954 Palo Alto Networks | |||
Updates: 6960 (if approved) September 10, 2020 | Updates: 6960 November 2020 | |||
Intended status: Standards Track | Category: Standards Track | |||
Expires: March 14, 2021 | ISSN: 2070-1721 | |||
OCSP Nonce Extension | Online Certificate Status Protocol (OCSP) Nonce Extension | |||
draft-ietf-lamps-ocsp-nonce-05 | ||||
Abstract | Abstract | |||
This document specifies the updated format of the Nonce extension in | This document specifies the updated format of the Nonce extension in | |||
the Online Certificate Status Protocol (OCSP) request and response | the Online Certificate Status Protocol (OCSP) request and response | |||
messages. OCSP is used to check the status of a certificate and the | messages. OCSP is used to check the status of a certificate, and the | |||
Nonce extension is used to cryptographically bind an OCSP response | Nonce extension is used to cryptographically bind an OCSP response | |||
message to a particular OCSP request message. This document updates | message to a particular OCSP request message. This document updates | |||
RFC 6960. | RFC 6960. | |||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This is an Internet Standards Track document. | |||
provisions of BCP 78 and BCP 79. | ||||
Internet-Drafts are working documents of the Internet Engineering | ||||
Task Force (IETF). Note that other groups may also distribute | ||||
working documents as Internet-Drafts. The list of current Internet- | ||||
Drafts is at https://datatracker.ietf.org/drafts/current/. | ||||
Internet-Drafts are draft documents valid for a maximum of six months | This document is a product of the Internet Engineering Task Force | |||
and may be updated, replaced, or obsoleted by other documents at any | (IETF). It represents the consensus of the IETF community. It has | |||
time. It is inappropriate to use Internet-Drafts as reference | received public review and has been approved for publication by the | |||
material or to cite them other than as "work in progress." | Internet Engineering Steering Group (IESG). Further information on | |||
Internet Standards is available in Section 2 of RFC 7841. | ||||
This Internet-Draft will expire on March 14, 2021. | Information about the current status of this document, any errata, | |||
and how to provide feedback on it may be obtained at | ||||
https://www.rfc-editor.org/info/rfc8954. | ||||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2020 IETF Trust and the persons identified as the | Copyright (c) 2020 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
publication of this document. Please review these documents | publication of this document. Please review these documents | |||
carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
described in the Simplified BSD License. | described in the Simplified BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction | |||
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 | 1.1. Terminology | |||
2. OCSP Extensions . . . . . . . . . . . . . . . . . . . . . . . 2 | 2. OCSP Extensions | |||
2.1. Nonce Extension . . . . . . . . . . . . . . . . . . . . . 3 | 2.1. Nonce Extension | |||
3. Security Considerations . . . . . . . . . . . . . . . . . . . 3 | 3. Security Considerations | |||
3.1. Replay Attack . . . . . . . . . . . . . . . . . . . . . . 4 | 3.1. Replay Attack | |||
3.2. Nonce Collision . . . . . . . . . . . . . . . . . . . . . 4 | 3.2. Nonce Collision | |||
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 | 4. IANA Considerations | |||
5. Changes to Appendix B. of RFC 6960 . . . . . . . . . . . . . 4 | 5. Changes to Appendix B of RFC 6960 | |||
5.1. Changes to Appendix B.1. OCSP in ASN.1 - 1998 Syntax . . 4 | 5.1. Changes to Appendix B.1 OCSP in ASN.1 - 1998 Syntax | |||
5.2. Changes to Appendix B.2 OCSP in ASN.1 - 2008 Syntax . . . 5 | 5.2. Changes to Appendix B.2 OCSP in ASN.1 - 2008 Syntax | |||
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 6. References | |||
6.1. Normative References . . . . . . . . . . . . . . . . . . 5 | 6.1. Normative References | |||
6.2. Informative References . . . . . . . . . . . . . . . . . 5 | 6.2. Informative References | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 | Author's Address | |||
1. Introduction | 1. Introduction | |||
This document updates the usage and format of the Nonce extension | This document updates the usage and format of the Nonce extension in | |||
used in OCSP request and response messages. This extension was | OCSP request and response messages. This extension was previously | |||
previously defined in section 4.4.1 of [RFC6960]. [RFC6960] does not | defined in Section 4.4.1 of [RFC6960]. [RFC6960] does not mention | |||
mention any minimum and maximum length of nonce in the Nonce | any minimum or maximum length of the nonce in the Nonce extension. | |||
extension. Lacking limits on the length of nonce in the Nonce | Lacking limits on the length of the nonce in the Nonce extension, | |||
extension, an OCSP responders that follow [RFC6960] may be vulnerable | OCSP responders that follow [RFC6960] may be vulnerable to various | |||
to various attacks like Denial of Service attacks [RFC4732], chosen | attacks, like Denial-of-Service attacks [RFC4732] or chosen-prefix | |||
prefix attacks to get a desired signature, and possible evasions | attacks (to get a desired signature), and possible evasions using the | |||
using the Nonce extension data. This document specifies a lower | Nonce extension data. This document specifies a lower limit of 1 and | |||
limit of 1 and an upper limit of 32 to the length of nonce in the | an upper limit of 32 for the length of the nonce in the Nonce | |||
Nonce extension. This document updates [RFC6960]. | extension. This document updates [RFC6960]. | |||
1.1. Terminology | 1.1. Terminology | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
"OPTIONAL" in this document are to be interpreted as described in BCP | "OPTIONAL" in this document are to be interpreted as described in | |||
14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
capitals, as shown here. | capitals, as shown here. | |||
2. OCSP Extensions | 2. OCSP Extensions | |||
The message format for OCSP request and response is defined in | The message formats for OCSP requests and responses are defined in | |||
[RFC6960]. [RFC6960] also defines the standard extensions for OCSP | [RFC6960]. [RFC6960] also defines the standard extensions for OCSP | |||
messages based on the extension model employed in X.509 version 3 | messages based on the extension model employed in X.509 version 3 | |||
certificates (see [RFC5280]). This document only specifies the new | certificates (see [RFC5280]). This document only specifies the new | |||
format for Nonce extension and does not change specification of any | format for the Nonce extension and does not change the specifications | |||
of the other standard extensions defined in [RFC6960]. | of any of the other standard extensions defined in [RFC6960]. | |||
2.1. Nonce Extension | 2.1. Nonce Extension | |||
This section replaces the entirety of the Section 4.4.1 of [RFC6960] | This section replaces the entirety of Section 4.4.1 of [RFC6960], | |||
which describes the OCSP Nonce extension. | which describes the OCSP Nonce extension. | |||
The nonce cryptographically binds a request and a response to prevent | The nonce cryptographically binds a request and a response to prevent | |||
replay attacks. The nonce is included as one of the | replay attacks. The nonce is included as one of the | |||
requestExtensions in requests, while in responses it would be | requestExtensions in requests; in responses, it would be included as | |||
included as one of the responseExtensions. In both the request and | one of the responseExtensions. In both the request and the response, | |||
the response, the nonce will be identified by the object identifier | the nonce will be identified by the object identifier id-pkix-ocsp- | |||
id-pkix-ocsp-nonce, while the extnValue is the value of the nonce. | nonce, while the extnValue is the value of the nonce. If the Nonce | |||
If Nonce extension is present then the length of nonce MUST be at | extension is present, then the length of the nonce MUST be at least 1 | |||
least 1 octet and can be up to 32 octets. | octet and can be up to 32 octets. | |||
A server MUST reject any OCSP request having a nonce in the Nonce | A server MUST reject any OCSP request that has a nonce in the Nonce | |||
extension with length of 0 octets or more than 32 octets with the | extension with a length of either 0 octets or more than 32 octets | |||
malformedRequest OCSPResponseStatus as described in section 4.2.1 of | with the malformedRequest OCSPResponseStatus, as described in | |||
[RFC6960]. | Section 4.2.1 of [RFC6960]. | |||
The value of the nonce MUST be generated using a cryptographically | The value of the nonce MUST be generated using a cryptographically | |||
strong pseudorandom number generator (see [RFC4086]). The minimum | strong pseudorandom number generator (see [RFC4086]). The minimum | |||
nonce length of 1 octet is defined to provide backward compatibility | nonce length of 1 octet is defined to provide backward compatibility | |||
with older clients that follow [RFC6960]. Newer OCSP clients that | with older clients that follow [RFC6960]. Newer OCSP clients that | |||
support this document MUST use a length of 32 octets for the nonce in | support this document MUST use a length of 32 octets for the nonce in | |||
Nonce extension. OCSP responders MUST accept lengths of at least 16 | the Nonce extension. OCSP responders MUST accept lengths of at least | |||
octets, and MAY choose to ignore the Nonce extension for requests | 16 octets and MAY choose to ignore the Nonce extension for requests | |||
where the length of the nonce is less than 16 octets | where the length of the nonce is less than 16 octets. | |||
id-pkix-ocsp OBJECT IDENTIFIER ::= { id-ad-ocsp } | id-pkix-ocsp OBJECT IDENTIFIER ::= { id-ad-ocsp } | |||
id-pkix-ocsp-nonce OBJECT IDENTIFIER ::= { id-pkix-ocsp 2 } | id-pkix-ocsp-nonce OBJECT IDENTIFIER ::= { id-pkix-ocsp 2 } | |||
Nonce ::= OCTET STRING(SIZE(1..32)) | Nonce ::= OCTET STRING(SIZE(1..32)) | |||
3. Security Considerations | 3. Security Considerations | |||
The security considerations of OCSP, in general, are described in | The security considerations of OCSP, in general, are described in | |||
[RFC6960]. During the interval in which the previous OCSP response | [RFC6960]. During the interval in which the previous OCSP response | |||
for a certificate is not expired but the responder has a changed | for a certificate is not expired but the responder has a changed | |||
status for that certificate, a copy of that OCSP response can be used | status for that certificate, a copy of that OCSP response can be used | |||
to indicate that the status of the certificate is still valid. | to indicate that the status of the certificate is still valid. | |||
Including client's Nonce value in the OCSP response makes sure that | Including a client's nonce value in the OCSP response makes sure that | |||
the response is the latest response from the server and not an old | the response is the latest response from the server and not an old | |||
copy. | copy. | |||
3.1. Replay Attack | 3.1. Replay Attack | |||
The Nonce extension is used to avoid replay attacks. Since the OCSP | The Nonce extension is used to avoid replay attacks. Since the OCSP | |||
responder may choose to not send the Nonce extension in the OCSP | responder may choose not to send the Nonce extension in the OCSP | |||
response even if the client has sent the Nonce extension in the | response even if the client has sent the Nonce extension in the | |||
request [RFC5019], an on-path attacker can intercept the OCSP request | request [RFC5019], an on-path attacker can intercept the OCSP request | |||
and respond with an earlier response from the server without the | and respond with an earlier response from the server without the | |||
Nonce extension. This can be mitigated by configuring the server to | Nonce extension. This can be mitigated by configuring the server to | |||
use a short time interval between the thisUpdate and nextUpdate | use a short time interval between the thisUpdate and nextUpdate | |||
fields in the OCSP response. | fields in the OCSP response. | |||
3.2. Nonce Collision | 3.2. Nonce Collision | |||
If the value of nonce used by a client in OCSP request is | If the value of the nonce used by a client in the OCSP request is | |||
predictable, then an attacker may prefetch responses with the | predictable, then an attacker may prefetch responses with the | |||
predicted nonce and can replay them, thus defeating the purpose of | predicted nonce and can replay them, thus defeating the purpose of | |||
using nonce. Therefore the value of Nonce extension in the OCSP | using the nonce. Therefore, the value of the Nonce extension in the | |||
request MUST contain cryptographically strong randomness and MUST be | OCSP request MUST contain cryptographically strong randomness and | |||
freshly generated at the time of creating the OCSP request. Also if | MUST be freshly generated at the time of the creation of the OCSP | |||
the length of nonce is too small e.g. 1 octet then an on-path | request. Also, if the length of the nonce is too small (e.g., 1 | |||
attacker can prefetch responses with all the possible values of nonce | octet), then an on-path attacker can prefetch responses with all the | |||
and replay a matching nonce. | possible values of the nonce and replay a matching nonce. | |||
4. IANA Considerations | 4. IANA Considerations | |||
This document does not call for any IANA actions. | This document has no IANA actions. | |||
5. Changes to Appendix B. of RFC 6960 | 5. Changes to Appendix B of RFC 6960 | |||
This section updates the ASN.1 definitions of the OCSP Nonce | This section updates the ASN.1 definitions of the OCSP Nonce | |||
extension in Appendix B.1 and Appendix B.2 of [RFC6960] The | extension in Appendices B.1 and B.2 of [RFC6960]. Appendix B.1 | |||
Appendix B.1 defines OCSP using ASN.1 - 1998 Syntax and Appendix B.2 | defines OCSP using ASN.1 - 1998 Syntax; Appendix B.2 defines OCSP | |||
defines OCSP using ASN.1 - 2008 Syntax | using ASN.1 - 2008 Syntax. | |||
5.1. Changes to Appendix B.1. OCSP in ASN.1 - 1998 Syntax | 5.1. Changes to Appendix B.1 OCSP in ASN.1 - 1998 Syntax | |||
OLD Syntax: | OLD Syntax: | |||
The definition of OCSP Nonce Extension is not provided in | The definition of OCSP Nonce extension is not provided in | |||
Appendix B.1 of [RFC6960] for the ASN.1 - 1998 Syntax. | Appendix B.1 of [RFC6960] for the ASN.1 - 1998 Syntax. | |||
NEW Syntax: | NEW Syntax: | |||
Nonce ::= OCTET STRING(SIZE(1..32)) | Nonce ::= OCTET STRING(SIZE(1..32)) | |||
5.2. Changes to Appendix B.2 OCSP in ASN.1 - 2008 Syntax | 5.2. Changes to Appendix B.2 OCSP in ASN.1 - 2008 Syntax | |||
OLD Syntax: | OLD Syntax: | |||
skipping to change at page 5, line 24 ¶ | skipping to change at line 205 ¶ | |||
re-ocsp-nonce EXTENSION ::= { SYNTAX OCTET STRING(SIZE(1..32)) | re-ocsp-nonce EXTENSION ::= { SYNTAX OCTET STRING(SIZE(1..32)) | |||
IDENTIFIED BY id-pkix-ocsp-nonce } | IDENTIFIED BY id-pkix-ocsp-nonce } | |||
6. References | 6. References | |||
6.1. Normative References | 6.1. Normative References | |||
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
<http://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | ||||
2119 Key Words", DOI 10.17487/RFC8174, RFC 8174, BCP 14, | ||||
May 2017, <https://www.rfc-editor.org/info/rfc8174>. | ||||
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., | [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., | |||
Housley, R., and W. Polk, "Internet X.509 Public Key | Housley, R., and W. Polk, "Internet X.509 Public Key | |||
Infrastructure Certificate and Certificate Revocation List | Infrastructure Certificate and Certificate Revocation List | |||
(CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, | (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, | |||
<https://www.rfc-editor.org/info/rfc5280>. | <https://www.rfc-editor.org/info/rfc5280>. | |||
[RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., | [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., | |||
Galperin, S., and C. Adams, "X.509 Internet Public Key | Galperin, S., and C. Adams, "X.509 Internet Public Key | |||
Infrastructure Online Certificate Status Protocol - OCSP", | Infrastructure Online Certificate Status Protocol - OCSP", | |||
RFC 6960, DOI 10.17487/RFC6960, June 2013, | RFC 6960, DOI 10.17487/RFC6960, June 2013, | |||
<https://www.rfc-editor.org/info/rfc6960>. | <https://www.rfc-editor.org/info/rfc6960>. | |||
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | ||||
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | ||||
May 2017, <https://www.rfc-editor.org/info/rfc8174>. | ||||
6.2. Informative References | 6.2. Informative References | |||
[RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, | [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, | |||
"Randomness Requirements for Security", BCP 106, RFC 4086, | "Randomness Requirements for Security", BCP 106, RFC 4086, | |||
DOI 10.17487/RFC4086, June 2005, | DOI 10.17487/RFC4086, June 2005, | |||
<https://www.rfc-editor.org/info/rfc4086>. | <https://www.rfc-editor.org/info/rfc4086>. | |||
[RFC4732] Handley, M., Ed., Rescorla, E., Ed., and IAB, "Internet | [RFC4732] Handley, M., Ed., Rescorla, E., Ed., and IAB, "Internet | |||
Denial-of-Service Considerations", RFC 4732, | Denial-of-Service Considerations", RFC 4732, | |||
DOI 10.17487/RFC4732, December 2006, | DOI 10.17487/RFC4732, December 2006, | |||
skipping to change at page 6, line 20 ¶ | skipping to change at line 245 ¶ | |||
[RFC5019] Deacon, A. and R. Hurst, "The Lightweight Online | [RFC5019] Deacon, A. and R. Hurst, "The Lightweight Online | |||
Certificate Status Protocol (OCSP) Profile for High-Volume | Certificate Status Protocol (OCSP) Profile for High-Volume | |||
Environments", RFC 5019, DOI 10.17487/RFC5019, September | Environments", RFC 5019, DOI 10.17487/RFC5019, September | |||
2007, <https://www.rfc-editor.org/info/rfc5019>. | 2007, <https://www.rfc-editor.org/info/rfc5019>. | |||
Author's Address | Author's Address | |||
Mohit Sahni (editor) | Mohit Sahni (editor) | |||
Palo Alto Networks | Palo Alto Networks | |||
3000 Tannery Way | 3000 Tannery Way | |||
Santa Clara, CA 95054 | Santa Clara, CA 95054 | |||
US | United States of America | |||
Email: msahni@paloaltonetworks.com | Email: msahni@paloaltonetworks.com | |||
End of changes. 27 change blocks. | ||||
88 lines changed or deleted | 84 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |