Online Certificate Status Protocol (OCSP) Nonce ExtensionPalo Alto Networks3000 Tannery WaySanta ClaraCA95054United States of Americamsahni@paloaltonetworks.comLAMPSOCSP Nonce LengthOCSP Nonce Randomness
This document specifies the updated format of the Nonce extension in the
Online Certificate Status Protocol (OCSP) request and response
messages. OCSP is used to check the status of a certificate, and
the Nonce extension is used to cryptographically bind an OCSP
response message to a particular OCSP request message. This document updates RFC 6960.Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by
the Internet Engineering Steering Group (IESG). Further
information on Internet Standards is available in Section 2 of
RFC 7841.
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
.
Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
() in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Simplified BSD License text as described in
Section 4.e of the Trust Legal Provisions and are provided without
warranty as described in the Simplified BSD License.
Table of Contents
. Introduction
. Terminology
. OCSP Extensions
. Nonce Extension
. Security Considerations
. Replay Attack
. Nonce Collision
. IANA Considerations
. Changes to Appendix B of RFC 6960
. Changes to Appendix B.1 OCSP in ASN.1 - 1998 Syntax
. Changes to Appendix B.2 OCSP in ASN.1 - 2008 Syntax
. References
. Normative References
. Informative References
Author's Address
Introduction
This document updates the usage and format of the Nonce extension
in OCSP request and response messages. This extension was
previously defined in .
does not mention any minimum or maximum length of the nonce in the Nonce
extension.
Lacking limits on the length of the nonce in the Nonce extension, OCSP
responders that follow may be
vulnerable to various attacks, like Denial-of-Service attacks or chosen-prefix attacks (to get a desired signature), and
possible evasions using the Nonce extension data. This
document specifies a lower limit of 1 and an upper limit of 32 for the
length of the nonce in the Nonce extension. This document updates .Terminology
The key words "MUST", "MUST NOT",
"REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
"RECOMMENDED", "NOT RECOMMENDED",
"MAY", and "OPTIONAL" in this document are to be interpreted as
described in BCP 14
when, and only when, they appear in all capitals, as shown here.
OCSP Extensions
The message formats for OCSP requests and responses are defined in
. also defines the standard extensions for OCSP
messages based on the extension model employed in X.509 version 3
certificates (see ). This document
only specifies the new format for the Nonce extension and
does not change the specifications of any of the other standard extensions
defined in .Nonce ExtensionThis section replaces the entirety of , which describes the OCSP Nonce
extension.
The nonce cryptographically binds a request and a response to
prevent replay attacks. The nonce is included as one of the
requestExtensions in requests; in responses, it would be
included as one of the responseExtensions. In both the request and
the response, the nonce will be identified by the object identifier
id-pkix-ocsp-nonce, while the extnValue is the value of the nonce.
If the Nonce extension is present, then the length of the nonce MUST be at
least 1 octet and can be up to 32 octets.
A server MUST reject any OCSP request that has a nonce
in the Nonce extension with a length of either 0 octets or more than 32 octets
with the malformedRequest OCSPResponseStatus, as described in .
The value of the nonce MUST be generated using a cryptographically
strong pseudorandom number generator (see ).
The minimum nonce length of 1 octet is defined to provide
backward compatibility with older clients that follow .
Newer OCSP clients that support this document MUST use a
length of 32 octets for the nonce in the Nonce extension. OCSP responders
MUST accept lengths of at least 16 octets and MAY choose to
ignore the Nonce extension for requests where the length of the nonce is less than 16 octets.
id-pkix-ocsp OBJECT IDENTIFIER ::= { id-ad-ocsp }
id-pkix-ocsp-nonce OBJECT IDENTIFIER ::= { id-pkix-ocsp 2 }
Nonce ::= OCTET STRING(SIZE(1..32))
Security Considerations
The security considerations of OCSP, in general, are described in
. During the interval in which
the previous OCSP response 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 to indicate
that the status of the certificate is still valid.
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 copy.
Replay Attack
The Nonce extension is used to avoid replay attacks. Since 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
request , an on-path attacker can intercept the OCSP request
and respond with an earlier response from the server without the
Nonce extension. This can be mitigated by configuring the server to
use a short time interval between the thisUpdate and nextUpdate fields in
the OCSP response.
Nonce Collision
If the value of the nonce used by a client in the OCSP request is
predictable, then an attacker may prefetch responses with the
predicted nonce and can replay them, thus defeating the purpose of
using the nonce. Therefore, the value of the Nonce extension in the OCSP
request MUST contain cryptographically strong randomness and MUST be
freshly generated at the time of the creation of the OCSP request. Also,
if the length of the nonce is too small (e.g., 1 octet), then
an on-path attacker can prefetch responses with all the possible
values of the nonce and replay a matching nonce.
IANA ConsiderationsThis document has no IANA actions.Changes to Appendix B of RFC 6960
This section updates the ASN.1 definitions of the OCSP Nonce extension
in Appendices and of .
Appendix
defines OCSP using ASN.1 - 1998 Syntax; Appendix defines OCSP
using ASN.1 - 2008 Syntax.Changes to Appendix B.1 OCSP in ASN.1 - 1998 SyntaxOLD Syntax: The definition of OCSP Nonce extension is not provided in for the ASN.1 -
1998 Syntax.NEW Syntax:
Nonce ::= OCTET STRING(SIZE(1..32))
Changes to Appendix B.2 OCSP in ASN.1 - 2008 SyntaxOLD Syntax:
re-ocsp-nonce EXTENSION ::= { SYNTAX OCTET STRING IDENTIFIED
BY id-pkix-ocsp-nonce }
NEW Syntax:
re-ocsp-nonce EXTENSION ::= { SYNTAX OCTET STRING(SIZE(1..32))
IDENTIFIED BY id-pkix-ocsp-nonce }
ReferencesNormative ReferencesKey words for use in RFCs to Indicate Requirement LevelsIn many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) ProfileThis memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet. An overview of this approach and model is provided as an introduction. The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms. Standard certificate extensions are described and two Internet-specific extensions are defined. A set of required certificate extensions is specified. The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions. An algorithm for X.509 certification path validation is described. An ASN.1 module and examples are provided in the appendices. [STANDARDS-TRACK]X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSPThis document specifies a protocol useful in determining the current status of a digital certificate without requiring Certificate Revocation Lists (CRLs). Additional mechanisms addressing PKIX operational requirements are specified in separate documents. This document obsoletes RFCs 2560 and 6277. It also updates RFC 5912.Ambiguity of Uppercase vs Lowercase in RFC 2119 Key WordsRFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.Informative ReferencesRandomness Requirements for SecuritySecurity systems are built on strong cryptographic algorithms that foil pattern analysis attempts. However, the security of these systems is dependent on generating secret quantities for passwords, cryptographic keys, and similar quantities. The use of pseudo-random processes to generate secret quantities can result in pseudo-security. A sophisticated attacker may find it easier to reproduce the environment that produced the secret quantities and to search the resulting small set of possibilities than to locate the quantities in the whole of the potential number space.Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult. This document points out many pitfalls in using poor entropy sources or traditional pseudo-random number generation techniques for generating such quantities. It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. It provides suggestions to ameliorate the problem when a hardware solution is not available, and it gives examples of how large such quantities need to be for some applications. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Internet Denial-of-Service ConsiderationsIABThis document provides an overview of possible avenues for denial-of-service (DoS) attack on Internet systems. The aim is to encourage protocol designers and network engineers towards designs that are more robust. We discuss partial solutions that reduce the effectiveness of attacks, and how some solutions might inadvertently open up alternative vulnerabilities. This memo provides information for the Internet community.The Lightweight Online Certificate Status Protocol (OCSP) Profile for High-Volume EnvironmentsThis specification defines a profile of the Online Certificate Status Protocol (OCSP) that addresses the scalability issues inherent when using OCSP in large scale (high volume) Public Key Infrastructure (PKI) environments and/or in PKI environments that require a lightweight solution to minimize communication bandwidth and client-side processing. [STANDARDS-TRACK]Author's AddressPalo Alto Networks3000 Tannery WaySanta ClaraCA95054United States of Americamsahni@paloaltonetworks.com