<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="info"
  docName="draft-hsharma-lamps-ocsp-nonce-04"
  ipr="trust200902"
  obsoletes=""
  updates="8954"
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="draft-hsharma-lamps-ocsp-nonce-04">Online Certificate Status Protocol (OCSP) Nonce Extension</title>
    <!--  [REPLACE/DELETE] abbrev. The abbreviated title is required if the full title is longer than 39 characters -->
    <seriesInfo name="Internet-Draft" value="draft-hsharma-lamps-ocsp-nonce-04"/>
    <author fullname="Himanshu Sharma" initials="H" role="editor" surname="Sharma">
      <!-- [CHECK]
             * initials should not include an initial for the surname
             * role="editor" is optional -->
    <!-- Can have more than one author -->
      
    <!-- all of the following elements are optional -->
      <organization>Netskope Inc</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <street>2445 Augustine Dr 3rd floor</street>
          <city>Santa Clara</city>
          <region>California</region>
          <code>95054</code>
          <country>USA</country>
          <!-- Uses two letter country code -->
        </postal>        
        <email>himanshu@netskope.com</email>  
        <uri>www.netskope.com</uri>
      </address>
    </author>
   
    <date year="2023"/>
    <!-- On draft subbmission:
         * If only the current year is specified, the current day and month will be used.
         * If the month and year are both specified and are the current ones, the current day will
           be used
         * If the year is not the current one, it is necessary to specify at least a month and day="1" will be used.
    -->

    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <!-- "Internet Engineering Task Force" is fine for individual submissions.  If this element is 
          not present, the default is "Network Working Group", which is used by the RFC Editor as 
          a nod to the history of the RFC Series. -->

    <keyword>Online Certificate Status Protocol (OCSP) Nonce Extension</keyword>
    <!-- [REPLACE/DELETE]. Multiple allowed.  Keywords are incorporated into HTML output files for 
         use by search engines. -->

    <abstract>
      <t>This document updates the Nonce extension section of RFC-8954. Nonce extension is a optional extension for
   Online Certificate Status Protocol (OCSP) request and response
   messages. OCSP is used for checking 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 8954.</t>
    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
      <t>This document updates the usage of the Nonce extension in OCSP request and response messages.
          This extension was previously defined in Section 4.4.1 of <xref target="RFC6960"/> and updated in <xref target="RFC8954"/>.
          <xref target="RFC6960"/> defines OCSP extensions as optional extension, and defines condition for different extension options. <xref target="RFC6960"/> Nonce extension is defined as an optional extension and that provides the freedom to OCSP responders to ignore the nonce extension regardless of its existence or value in OCSP request, whereas <xref target="RFC8954"/> language directs the OCSP responders to MUST take action based on Nonce value in OCSP requests. For example it directs OCSP responder to MUST respond with the malformedRequest OCSPResponseStatus in case of zero or longer nonce values.</t>
      <t>OCSP responder SHOULD be able to ignore the nonce values (valid or invalid) as it is an optional extension. Ignoring the longer nonce value helps OCSP responder to achieve the better backward compatibility as it wont impact the existing OCSP client that has already been sending longer nonce values.
          This document updates the Nonce extension section of <xref target="RFC8954"/> by removing the instruction to OCSP responder to reject the OCSP response that violates the nonce length requirment, provides an example of Nonce value and reinstate the backward compatibility while clearly differentiating the OCSP client and responder expectations.</t>
      
      <section>
        <name>Requirements Language</name>
        <t>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 <xref target="RFC2119"/>
          <xref target="RFC8174"/> when, and only when, they appear in
          all capitals, as shown here.</t>
      </section>
    </section>
    
    <section>
      <name>OCSP Extensions</name>
      <t>The message formats for OCSP requests and responses are defined in
      <xref target="RFC6960"/> and Nonce extension was updated in <xref target="RFC8954"/>.  <xref target="RFC6960"/> also defines the standard extensions for OCSP
   messages based on the extension model employed in X.509 version 3
          certificates (see <xref target="RFC5280"/>).  <xref target="RFC8954"/> replaces this section to 
   enforce minimum and maximum length for Nonce value. This document 
              updates the Nonce extension section of <xref target="RFC8954"/> with clearly define the behavior of OCSP 
   responder and client under precondition of support of Nonce extension while ignoring the OCSP request with longer Nonce length of 32 octets. 
   This document doesn't change the length requirement for 
   Nonce value and does not change the specifications of any of the 
                  other standard extensions defined in <xref target="RFC6960"/> or <xref target="RFC8954"/>.</t>
   <section>
   <name>Nonce Extension</name>
   <t>
       This section updates the Section 2.1 of <xref target="RFC8954"/>, which describes the OCSP Nonce extension.
    </t>
    <t>    
        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.
    </t>
    <ul>
        <li>Newer OCSP client that supports Nonce extension MUST use the length of 32 octets.</li>
    </ul>
    <ul>
        <li>Newer OCSP responder that supports the Nonce extension MUST support the nonce value with minimum length of 16 octets to maximum length of 32 octets.</li>
        <li>OCSP responder MAY choose to ignore nonces that are less than 16 octets or violates nonce length defined in <xref target="RFC8954"/>, and MUST leave out the nonce extension in the response.</li>    
    </ul>
        <t>
            The value of the nonce MUST be generated using a cryptographically
            strong pseudorandom number generator (see <xref target="RFC4086"/>). The minimum
            nonce length of 1 octet is defined to provide backward compatibility
                with older clients that follow <xref target="RFC6960"/>.
        </t> 
   
        <sourcecode type="asn.1" markers="false">
    id-pkix-ocsp           OBJECT IDENTIFIER ::= { id-ad-ocsp }
    id-pkix-ocsp-nonce     OBJECT IDENTIFIER ::= { id-pkix-ocsp 2 }
        </sourcecode>
        <sourcecode type="asn.1" markers="false">
Nonce ::= OCTET STRING(SIZE(1..32))
            
Raw Nonce Example:
1FA16041C0E2D739898EC69972A4B967DFD3488148E6DA61CF3AF2DC32383383
            
OCSP Nonce Octet String: 
04201FA16041C0E2D739898EC69972A4B967DFD3488148E6DA61CF3AF2DC32383383
        </sourcecode>
</section>
    </section>   
    
    <section anchor="IANA">
      <name>IANA Considerations</name>
      <t>This memo includes no request to IANA.</t>
    </section>
    
    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>This document should not affect the security of the Internet.</t>
    </section>
    
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6960.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8954.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4086.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <!-- The recommended and simplest way to include a well known reference -->
        
      </references>
    </references>
 </back>
</rfc>

