<?xml version="1.0" encoding="US-ASCII" ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc rfcedstyle="yes" ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc linkmailto="yes" ?>

<rfc number="4806" category="std">
  <front>
    <title abbrev="OCSP Extensions to IKEv2">Online Certificate Status
Protocol (OCSP) Extensions to IKEv2</title>
    <author initials="M." surname="Myers" fullname="Michael Myers">
      <organization>TraceRoute Security LLC</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country/>
        </postal>
        <email> mmyers@fastq.com</email>
      </address>
    </author>
    <author initials="H." surname="Tschofenig" fullname="Hannes Tschofenig">
      <organization abbrev="Siemens">Siemens</organization>
      <address>
        <postal>
          <street>Otto-Hahn-Ring 6</street>
          <city>Munich</city>
          <region>Bavaria</region>
          <code>81739</code>
          <country>Germany</country>
        </postal>
        <email>Hannes.Tschofenig@siemens.com</email>
        <uri>http://www.tschofenig.com</uri>
      </address>
    </author>
    <date month="December" year="2006"/>
    <workgroup>Network Working Group</workgroup>
    <keyword>I-D</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>IKEv2</keyword>
    <keyword>OCSP</keyword>
    <abstract>
      <t>While the Internet Key Exchange Protocol version 2 (IKEv2)
        supports public key based authentication (PKI)<!-- RFC Editor
Comment: We would usually expand PKI as Public Key Infrastructure, but
here it reads as though PKI is short for public key based
authentication; is this correct? -->, the corresponding use of
        in-band Certificate Revocation Lists (CRL) is problematic due to unbounded CRL size. The
        size of an Online Certificate Status Protocol (OCSP) response is however well-bounded and
        small. This document defines the "OCSP Content" extension to IKEv2. A CERTREQ payload with
        "OCSP Content" identifies zero or more trusted OCSP responders and is a request for
        inclusion of an OCSP response in the IKEv2 handshake. A cooperative recipient of such a
        request responds with a CERT payload containing the appropriate OCSP response. This content
        is recognizable via the same "OCSP Content" identifier.</t>
      <t> When certificates are used with IKEv2, the communicating peers need a mechanism to
        determine the revocation status of the peer's certificate. OCSP is one such mechanism. This
        document applies when OCSP is desired and security policy prevents one of the IKEv2 peers
        from accessing the relevant OCSP responder directly. Firewalls are often deployed in a
        manner that prevents such access by IKEv2 peers outside of an enterprise network.</t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction">
      <t>Version 2 of the Internet Key Exchange (IKE) protocol <xref target="IKEv2"/> supports a
        range of authentication mechanisms, including the use of public key based authentication.
        Confirmation of certificate reliability is essential in order to achieve the security assurances
        public key cryptography provides. One fundamental element of such confirmation is reference
        to certificate revocation status (see <xref target="RFC3280"/> for additional detail). </t>
      <t> The traditional means of determining certificate revocation status is through the use of
        Certificate Revocation Lists (CRLs). IKEv2 allows CRLs to be
	exchanged in-band via the CERT payload.</t>
      <t> However, CRLs can grow unbounded in size. Many real-world examples exist to demonstrate the
        impracticality of including a multi-megabyte file in an IKE exchange. This constraint is
        particularly acute in bandwidth-limited environments (e.g., mobile communications). The net
        effect is exclusion of in-band CRLs in favor of out-of-band (OOB) acquisition of these data,
        should they even be used at all. </t>
      <t> Reliance on OOB methods can be further complicated if access to revocation data requires
        use of IPsec (and therefore IKE) to establish secure and authorized access to the CRLs of an
        IKE participant. Such network access deadlock further contributes to a reduced reliance on
        the status of certificate revocations in favor of blind trust.</t>
      <t> OCSP <xref target="RFC2560"/> offers a useful alternative. The size of an OCSP response is
        bounded and small and therefore suitable for in-band IKEv2 signaling of a certificate's
        revocation status.</t>
      <t>This document defines an extension to IKEv2 that enables the use of OCSP for in-band
        signaling of certificate revocation status. A new content encoding is defined for use in the
        CERTREQ and CERT payloads. A CERTREQ payload with "OCSP Content" identifies zero or more
        trusted OCSP responders and is a request for inclusion of an OCSP response in the IKEv2
        handshake. A cooperative recipient of such a request responds with a CERT payload containing
        the appropriate OCSP response. This content is recognizable via the same "OCSP Content" identifier.</t>
    </section>
    <section title="Terminology ">
      <t> The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD
        NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
        described in <xref target="RFC2119">RFC 2119</xref>.</t>
      <t>This document defines the following terms:</t>
      <t>
        <list style="hanging">
          <t hangText="OCSP request:">
            <vspace blankLines="1"/>An OCSP request refers to the CERTREQ payload that contains a new
            content encoding, referred to as OCSP Content, that conforms to the definition and behavior
            specified in <xref target="OCSP-Request"/>.</t>
          <t hangText="OCSP response:">
            <vspace blankLines="1"/>An OCSP response refers to the CERT payload that contains a new
            content encoding, referred to as OCSP Content, that conforms to the definition and behavior
            specified in <xref target="OCSP-Response"/>.</t>
          <t hangText="OCSP responder:">
            <vspace blankLines="1"/>The term OCSP responder refers to the entity that accepts
            requests from an OCSP client and returns responses as defined in <xref
            target="RFC2560"/>. Note that the OCSP responder does not refer to the party that sends
            the CERT message.</t>
        </list>
      </t>
    </section>
    <section title="Extension Definition">
      <t>With reference to Section 3.6 of <xref target="IKEv2"/>, the values for the Cert Encoding
        field of the CERT payload are extended as follows (see also the IANA Considerations section
        of this document): <figure>
          <artwork><![CDATA[
            Certificate Encoding               Value
            --------------------               -----
            OCSP Content                        14
]]></artwork>
        </figure>
      </t>
      <section anchor="OCSP-Request" title="OCSP Request">
        <t>A value of OCSP Content (14) in the Cert Encoding field of a CERTREQ Payload indicates
          the presence of zero or more OCSP responder certificate hashes in the Certificate
          Authority field of the CERTREQ payload. Section 2.2 of <xref target="RFC2560"/> defines
          responses, which belong to one of the following three groups:</t>
        <t>
<?rfc compact="no" ?>
          <list style="hanging">
            <t hangText="(a)">the CA who issued the certificate</t>
            <t hangText="(b)"> a Trusted Responder whose public key is trusted by the requester</t>
            <t hangText="(c)"> a CA Designated Responder (Authorized Responder) who holds a
              specially marked certificate issued directly by the CA, indicating that the responder
              may issue OCSP responses for that CA </t>
          </list>
<?rfc compact="yes" ?> 
      </t>
        <t>In case of (a), the use of hashes in the CERTREQ message is not needed since the OCSP
          response is signed by the CA who issued the certificate. In case of (c), the OCSP response
          is signed by the CA Designated Responder whereby the sender of the CERTREQ message does
          not know the public key in advance. The presence of OCSP Content in a CERTREQ message will
          identify one or more OCSP responders trusted by the sender in case of (b). </t>
        <t>The presence of OCSP Content (14) in a CERTREQ message:
<t>
</t>
<?rfc compact="no" ?>
          <list style="numbers">
            <t>identifies zero or more OCSP responders trusted by the sender;</t>
            <t>notifies the recipient of sender's support for the OCSP extension to IKEv2; and</t>
            <t>notifies the recipient of sender's desire to receive OCSP confirmation in a
              subsequent CERT payload.</t>
          </list>
<?rfc compact="yes" ?>
        </t>
      </section>
      <section anchor="OCSP-Response" title="OCSP Response">
        <t> A value of OCSP Content (14) in the Cert Encoding field of a CERT Payload indicates the
          presence of an OCSP response in the Certificate Data field of the CERT payload. </t>
        <t> Correlation between an OCSP response CERT payload and a corresponding CERT payload
          carrying a certificate can be achieved by matching the OCSP response CertID field to the
          certificate. See <xref target="RFC2560"/> for the definition of OCSP response content.</t>
      </section>
    </section>
    <section title="Extension Requirements">
      <section anchor="ocsp-request" title="Request for OCSP Support">
        <t>Section 3.7 of <xref target="IKEv2"/> allows for the concatenation of trust anchor hashes
          as the Certification Authority value of a single CERTREQ message. There is no means
          however to indicate which among those hashes, if present, relates to the certificate of a
          trusted OCSP responder.</t>
        <t>Therefore, an OCSP request, as defined in <xref target="OCSP-Request"/> above, is
          transmitted separate from any other CERTREQ payloads in an IKEv2 exchange.</t>
        <t>Where it is useful to identify more than one trusted OCSP responder, each such
          identification SHALL be concatenated in a manner identical to the method documented in
          Section 3.7 of <xref target="IKEv2"/> regarding the assembly of multiple trust anchor hashes.</t>
        <t> The Certification Authority value in an OCSP request CERTREQ SHALL be computed and
          produced in a manner identical to that of trust anchor hashes as documented in Section 3.7
          of <xref target="IKEv2"/>.</t>
        <t>Upon receipt of an OCSP response CERT payload corresponding to a prior OCSP request
          CERTREQ, the CERTREQ sender SHALL incorporate the OCSP response into path validation logic
          defined by <xref target="RFC3280"/>.</t>
        <!--
          
        <t>If the OCSP Response CERT payload is not included, it most likely indicates that the peer
          does not support this extension. In this case, the peer SHOULD attempt to determine
          certificate revocation status by some other means.</t>
        <t>The sender of an OCSP Request CERTREQ MAY abort an IKEv2 exchange if either: <list style="numbers">
            <t>the corresponding OCSP Response CERT payload indicates that the subject certificate
              is revoked; OR</t>
            <t>the corresponding OCSP Response CERT payload indicates an OCSP error (e.g.,
              malformedRequest, internalError, tryLater, sigRequired, unauthorized, etc.).</t>
          </list>
        </t>
        
      
        <t>The sender of an OCSP request CERTREQ SHOULD accept an IKEv2 exchange if a corresponding
          OCSP response CERT payload is not received. This might be an indication that this OCSP
          extension is not supported. In this case, the peer SHOULD attempt to determine certificate
          revocation status by some other means.</t>
          -->
        <t> Note that the lack of an OCSP response CERT payload after sending an OCSP request CERT
          payload might be an indication that this OCSP extension is not supported. As a result, it
          is recommended that nodes be configured to require a response only if it is known that all
          peers do in fact support this extension. Otherwise, it is recommended that the nodes be
          configured to try OCSP and, if there is no response, attempt to determine certificate
          revocation status by some other means. </t>
      </section>
      <section title="Response to OCSP Support">
        <t> Upon receipt of an OCSP request CERTREQ payload, the recipient SHOULD acquire the
          related OCSP-based assertion and produce and transmit an OCSP response CERT payload
          corresponding to the certificate needed to verify its signature on IKEv2 payloads.</t>
        <t> An OCSP response CERT payload is transmitted separate from any other CERT payload in an
          IKEv2 exchange.</t>
        <t> The means by which an OCSP response may be acquired for production of an OCSP response
          CERT payload is out of scope of this document.</t>
        <t>The Certificate Data field of an OCSP response CERT payload SHALL contain a DER-encoded
          OCSPResponse structure as defined in <xref target="RFC2560"/>.</t>
      </section>
    </section>
    <section title="Examples and Discussion">
      <t> This section shows the standard IKEv2 message examples with both peers, the initiator and
        the responder, using public key based authentication, CERTREQ and CERT payloads. The first
        instance corresponds to Section 1.2 of <xref target="IKEv2"/>, the illustrations of which
        are reproduced below for reference.</t>
      <section title="Peer to Peer">
        <t> Application of the IKEv2 extensions defined in this document to the peer-to-peer
          exchange defined in Section 1.2 of <xref target="IKEv2"/> is as follows. Messages are
          numbered for ease of reference. </t>
        <t>
          <figure title="OCSP Extensions to Baseline IKEv2">
            <artwork><![CDATA[
     Initiator                             Responder
     -----------                           -----------
(1)  HDR, SAi1, KEi, Ni              -->                                

(2)                                  <-- HDR, SAr1, KEr, Nr,
                                         CERTREQ(OCSP Request)
(3)  HDR, SK {IDi, CERT(certificate),-->
     CERT(OCSP Response),
     CERTREQ(OCSP Request),
     [IDr,] AUTH, SAi2, TSi, TSr} 

(4)                                  <-- HDR, SK {IDr,
                                         CERT(certificate),
                                         CERT(OCSP Response),
                                         AUTH, SAr2, TSi, TSr}
]]></artwork>
          </figure>
        </t>
        <t>In (2), Responder sends an OCSP request CERTREQ payload identifying zero or more OCSP
          responders trusted by the Responder. In response, Initiator sends in (3) both a CERT
          payload carrying its certificate and an OCSP response CERT payload covering that
          certificate. In (3), Initiator also requests an OCSP response via the OCSP request CERTREQ
          payload. In (4), the Responder returns its certificate and a separate OCSP response CERT
          payload covering that certificate.</t>
        <t> It is important to note that in this scenario, the Responder in (2) does not yet possess
          the Initiator's certificate and therefore cannot form an OCSP request as defined in <xref
          target="RFC2560"/>. To bypass this problem, hashes are used as defined in <xref
          target="ocsp-request"/>. In such instances, OCSP Requests are simply index values into
          these data. Thus, it is easily inferred that OCSP responses can be produced in the absence
          of a corresponding request (provided that OCSP nonces are not used, see <xref
          target="security"/>). </t>
        <t> It is also important in extending IKEv2 toward OCSP in this scenario that the Initiator
          has certain knowledge that the Responder is capable of and willing to participate in the
          extension. Yet the Responder will only trust one or more OCSP responder signatures. These
          factors motivate the definition of OCSP responder hash extension.</t>
      </section>
      <section title="Extended Authentication Protocol (EAP)">
        <t> Another scenario of pressing interest is the use of EAP to accommodate multiple end
          users seeking enterprise access to an IPsec gateway. Note that OCSP is used for the
          certificate status check of the server side IKEv2 certificate and not for certificates
          that may be used within EAP methods (either by the EAP peer or the EAP server). As with
          the preceding section, the following illustration is extracted from <xref
          target="IKEv2"/>. In the event of a conflict between this
	  document and <xref target="IKEv2"/> regarding these
          illustrations, <xref target="IKEv2"/> SHALL dominate.</t>
        <t>
          <figure title="OCSP Extensions to EAP in IKEv2">
            <artwork><![CDATA[
     Initiator                            Responder
     -----------                          -----------
(1)  HDR, SAi1, KEi, Ni              -->                                
(2)                                  <-- HDR, SAr1, KEr, Nr
(3)  HDR, SK {IDi,                   -->
     CERTREQ(OCSP Request),
     [IDr,] AUTH, SAi2, TSi, TSr} 
(4)                                  <-- HDR, SK {IDr,
                                         CERT(certificate),
                                         CERT(OCSP Response),
                                         AUTH, EAP}
(5)       HDR, SK {EAP}              -->

(6)                                  <-- HDR, SK {EAP (success)}

(7)       HDR, SK {AUTH}             -->

(8)                                  <-- HDR, SK {AUTH, SAr2, TSi, 
                                         TSr }
]]></artwork>
          </figure>
        </t>
        <t> In the EAP scenario, messages (5) through (8) are not relevant to this document.
          <!--Note
          that while <xref target="IKEv2"/> allows for the optional inclusion of a CERTREQ in (2),
          this document asserts no need of its use. It is assumed that environments including this
          optional payload and yet wishing to implement the OCSP extension to IKEv2 are sufficiently
          robust as to accommodate this redundant payload.
        -->
        </t>
      </section>
    </section>
    <section anchor="security" title="Security Considerations">
      <t>For the reasons noted above, an OCSP request, as defined in
      Section 3.1, is used in place of an
        OCSP request syntax to trigger production and transmission of an OCSP response. OCSP, as
        defined in <xref target="RFC2560"/>, may contain a nonce request extension to improve
        security against replay attacks (see Section 4.4.1 of <xref target="RFC2560"/> for further
        details). The OCSP request defined by this document cannot accommodate nonces. <xref
        target="RFC2560"/> deals with this aspect by allowing pre-produced responses. </t>
      <t>
        <xref target="RFC2560"/> points to this replay vulnerability and indicates: "The use of
        precomputed responses allows replay attacks in which an old (good) response is replayed
        prior to its expiration date but after the certificate has been revoked. Deployments of OCSP
        should carefully
<?rfc needLines="5" ?>
        evaluate the benefit of precomputed responses against the probability of a
        replay attack and the costs associated with its successful execution." Nodes SHOULD make the
        required freshness of an OCSP response configurable.</t>
    </section>
    <section title="IANA Considerations">
      <t>This document defines one new field type for use in the IKEv2 Cert Encoding field of the
        Certificate Payload format. Official assignment of the "OCSP Content" extension to the Cert
        Encoding table of Section 3.6 of <xref target="IKEv2"/> has been acquired from IANA. <figure>
          <artwork><![CDATA[
            Certificate Encoding               Value
            --------------------               -----
            OCSP Content                        14
]]></artwork>
        </figure>
      </t>
    </section>
    <section title="Acknowledgements">
      <t>The authors would like to thank Russ Housley for his support. Additionally, we would like
        to thank Pasi Eronen, Nicolas Williams, Liqiang (Larry) Zhu, Lakshminath Dondeti, and Paul
        Hoffman for their review. Pasi gave us invaluable last-call comments. We would also like to
        thank Tom Taylor for his Gen-ART review. Jari Arkko gave us IESG review comments.</t>
    </section>
  </middle>
  
<?rfc needLines="30" ?>
  <back>
    <references title="Normative References">
      <reference anchor="RFC2119">
        <front>
          <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner" fullname="Scott Bradner">
            <organization>Harvard University</organization>
            <address>
              <postal>
                <street>1350 Mass. Ave.</street>
                <street>Cambridge</street>
                <street>MA 02138</street>
              </postal>
              <phone>- +1 617 495 3864</phone>
              <email>sob@harvard.edu</email>
            </address>
          </author>
          <date month="March" year="1997"/>
          <area>General</area>
          <keyword>keyword</keyword>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <format type="HTML" octets="14486" target="http://xml.resource.org/public/rfc/html/rfc2119.html"/>
        <format type="XML" octets="5661" target="http://xml.resource.org/public/rfc/xml/rfc2119.xml"/>
      </reference>
      <reference anchor="RFC3280">
        <front>
          <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation
            List (CRL) Profile</title>
          <author fullname="R. Housley" initials="R." surname="Housley">
            <organization/>
          </author>
          <author fullname="W. Polk" initials="W." surname="Polk">
            <organization/>
          </author>
          <author fullname="W. Ford" initials="W." surname="Ford">
            <organization/>
          </author>
          <author fullname="D. Solo" initials="D." surname="Solo">
            <organization/>
          </author>
          <date year="2002" month="April"/>
        </front>
        <seriesInfo value="3280" name="RFC"/>
        <format octets="295556" type="TXT" target="ftp://ftp.isi.edu/in-notes/rfc3280.txt"/>
      </reference>
      <reference anchor="IKEv2">
        <front>
          <title>Internet Key Exchange (IKEv2) Protocol</title>
          <author initials="C." surname="Kaufman" fullname="C. Kaufman">
            <organization/>
          </author>
          <date year="2005" month="December"/>
        </front>
        <seriesInfo name="RFC" value="4306"/>
        <format type="TXT" octets="250941" target="ftp://ftp.isi.edu/in-notes/rfc4306.txt"/>
      </reference>
      <reference anchor="RFC2560">
        <front>
          <title abbrev="PKIX OCSP">X.509 Internet Public Key Infrastructure Online Certificate
            Status Protocol - OCSP</title>
          <author fullname="Michael Myers" initials="M." surname="Myers">
            <organization>VeriSign, Inc.</organization>
            <address>
              <postal>
                <street>1350 Charleston Road</street>
                <city>Mountain View</city>
                <region>CA</region>
                <code>94043</code>
                <country>US</country>
              </postal>
              <email>mmyers@verisign.com</email>
            </address>
          </author>
          <author fullname="Rich Ankney" initials="R." surname="Ankney">
            <organization>CertCo, LLC</organization>
            <address>
              <postal>
                <street>13506 King Charles Dr.</street>
                <city>Chantilly</city>
                <region>VA</region>
                <code>20151</code>
                <country>US</country>
              </postal>
              <email>rankney@erols.com</email>
            </address>
          </author>
          <author fullname="Ambarish Malpani" initials="A." surname="Malpani">
            <organization>ValiCert, Inc.</organization>
            <address>
              <postal>
                <street>1215 Terra Bella Avenue</street>
                <city>Mountain View</city>
                <region>CA</region>
                <code>94043</code>
                <country>US</country>
              </postal>
              <phone>+1 650 567 5457</phone>
              <email>ambarish@valicert.com</email>
            </address>
          </author>
          <author fullname="Slava Galperin" initials="S." surname="Galperin">
            <organization>My CFO, Inc.</organization>
            <address>
              <postal>
                <street>1945 Charleston Road</street>
                <city>Mountain View</city>
                <region>CA</region>
                <code>94043</code>
                <country>US</country>
              </postal>
              <email>galperin@mycfo.com</email>
            </address>
          </author>
          <author fullname="Carlisle Adams" initials="C." surname="Adams">
            <organization>Entrust Technologies</organization>
            <address>
              <postal>
                <street>750 Heron Road</street>
                <street>Suite E08</street>
                <city>Ottawa</city>
                <region>Ontario</region>
                <code>K1V 1A7</code>
                <country>CA</country>
              </postal>
              <email>cadams@entrust.com</email>
            </address>
          </author>
          <date year="1999" month="June"/>
        </front>
        <seriesInfo value="2560" name="RFC"/>
      </reference>
    </references>
    <!--
        <references title="Informational References">
        </references>
        -->
  </back>
</rfc>
