<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2104 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2104.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC7296 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7296.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="info" docName="draft-fluhrer-qr-ikev2-01" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="Postquantum Security for IKEv2">Postquantum Preshared Keys for IKEv2</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Scott Fluhrer" initials="S.F."
            surname="Fluhrer">
      <organization>Cisco Systems</organization>

      <address>
        <email>sfluhrer@cisco.com</email>
      </address>
    </author>
    <author fullname="David McGrew" initials="D.M."
            surname="McGrew">
      <organization>Cisco Systems</organization>

      <address>
        <email>mcgrew@cisco.com</email>
      </address>
    </author>
    <author fullname="Panos Kampanakis" initials="P.K."
            surname="Kampanakis">
      <organization>Cisco Systems</organization>

      <address>
        <email>pkampana@cisco.com</email>
      </address>
    </author>
    <date month="January" year="2016" />

    <!-- Meta-data Declarations -->

    <area>Security</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF 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 IETF. -->

    <keyword>template</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>   This document describes an extension of IKEv2 to allow it to
   be resistant to a Quantum Computer, by using preshared keys
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>   It is an open question whether or not it is feasible to build a quantum computer, but if it is, many of the cryptographic algorithms and protocols currently in use would be insecure.  A quantum computer would be able to solve DH and ECDH problems, and this
   would imply that the security of existing IKEv2 systems would be
   compromised.  IKEv1 when used with preshared keys does not share this
   vulnerability, because those keys are one of the inputs to the key derivation function.
   If the preshared key have sufficient entropy and the PRF and encryption and authentication transforms are postquantum secure, then the
   resulting system is believed to be quantum resistant, that is, believed to
   be invulnerable to an attacker with a Quantum Computer.</t>

   <t>This document describes a way to extend IKEv2 to have a similar
   property; assuming that the two end systems share a long secret key,
   then the resulting exchange is quantum resistant.
   By bringing postquantum security to IKEv2, this note removes the need
   to use an obsolete version of the Internet Key Exchange in order to achieve
   that security goal.</t>

   <t>The general idea is that we add an additional secret that is shared
   between the initiator and the responder; this secret is in addition
   to the authentication method that is already provided within IKEv2.
   We stir in this secret when generating the IKE keys (along with the
   parameters that IKEv2 normally uses); this secret adds quantum
   resistance to the exchange.</t>

   <t>It was considered important to minimize the changes to IKEv2.
   The existing mechanisms to do authentication and key exchange remain
   in place (that is, we continue to do (EC)DH, and potentially a PKI
   authentication if configured).  This does not replace the authentication
   checks that the protocol does; instead, it is done as a parallel check.
    </t>

      <section title="Changes">
        <t>Changes in this draft from the previous versions</t>

        <t>draft-00</t>
        <t>- We switched from using vendor ID's to transmit the additional data to notifications</t>
        <t>- We added a mandatory cookie exchange to allow the server to communicate to the client before the initial exchange</t>
        <t>- We added algorithm agility by having the server tell the client what algorithm to use in the cookie exchange</t>
        <t>- We have the server specify the PPK Indicator Input, which allows
             the server to make a trade-off between the efficiency for
             the search of the clients PPK, and the anonymity of the client.</t>
        <t>- We now use the negotiated PRF (rather than a fixed HMAC-SHA256) to transform the nonces during the KDF</t>
      </section>

      <section title="Requirements Language">
        <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>
      </section>
    </section>

    <section title="Assumptions"><t>
   We assume that each IKE peer (both the initiator and the responder)
   has an optional Postquantum Preshared Key (PPK) (potentially on a per-peer
   basis), and also has a configurable flag that determines whether this
   postquantum preshared key is mandatory.  This preshared key is
   independent of the preshared key (if any) that the IKEv2 protocol
   uses to perform authentication.</t>

   <t>In addition, we assume that the initiator knows which PPK to use with the peer it is
   initiating to (for instance, if it knows the peer, then it can determine which
   PPK will be used).</t>
    </section>

    <section title="Exchanges"><t>
      If the initiator has a configured postquantum preshared key (whether
   or not it is optional), then it will include a notify payload in
   its initial exchange as follows:</t>
      <figure align="center">
        <artwork align="left"><![CDATA[
Initiator                       Responder
------------------------------------------------------------------
HDR, SAi1, KEi, Ni, N(PPK_REQUEST)  --->
            ]]></artwork>
      </figure>

   <t>N(PPK_REQUEST) is a status notification payload with the type [TBA];
   it has a protocol ID of 0, and no SPI and no notification data associated with it.</t>

   <t>When the responder recieves the initial exchange with the notify payload,
   then (if it is configured to support PPK), it responds with:</t>
      <figure align="center">
        <artwork align="left"><![CDATA[
Initiator                       Responder
------------------------------------------------------------------
                          <--- HDR, N(COOKIE), N(PPK_ENCODE)
            ]]></artwork>
      </figure>

    <t>If it is not configured to support PPK, the responder continues with the standard IKEv2 protocol.</t>

    <t>In other words, it asks for the responder to generate and send a cookie in its responses
    (as listed in section 2.6 of RFC7296), and in addition, include a notify
    that gives details of how the initiator should indicate what the PPK is.  This
    notification payload has the type [TBA}; it has a protocol ID of 0, and no SPI; the
    notification data is of the format:</t>
      <figure align="center">
        <artwork align="left"><![CDATA[
                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      PPK Indicator Algorithm                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   PPK Indicator Input (variable)              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]></artwork>
      </figure>

   <t>The PPK Indicator Algorithm is a 4 byte word that states which PPK indicator to use.
   That is, it gives the encoding format for the PPK that should be used is given
   to the responder.  At present, the only assigned encoding is 0x00000001,
   which indicates that AES256_SHA256 will be used (as explained below).</t>

   <t>PPK Indicator Input is a data input to the PPK indicator Algorithm; its length will depend
   on the PPK indicator; for the indicator AES256_SHA256, this PPK Indicator Input is 16 bytes.</t>

   <t>The contents of this PPK Indicator Input is selected by responder policy; below we give
   trade-offs of the various possibilities</t>

   <t>When the initiator receives this notification, it responds as follows:</t>
      <figure align="center">
        <artwork align="left"><![CDATA[
Initiator                       Responder
------------------------------------------------------------------
HDR, N(COOKIE), SAi1, KEi, Ni, N(PPK_REQUEST)  --->
            ]]></artwork>
      </figure>

   <t>This is the standard IKEv2 cookie response, with a PPK_REQUEST notification added</t>

   <t>N(PPK_REQUEST) is a status notification payload with the type [TBA];
   it has a protocol ID of 0, and no SPI; however this time, the notification data as as follows:</t>

      <figure align="center">
        <artwork align="left"><![CDATA[
                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      PPK Indicator Algorithm                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   PPK Indicator Input (variable)              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      PPK Indicator (variable)                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]></artwork>
      </figure>

   <t>The PPK Indicator Algorithm and PPK Indicator Input are precisely the same as was given in the
   PPK_ENCODE format (as is repeated in case the responder ran this cookie protocol in a
   stateless manner).  The PPK Indicator is the encoded version of the PPK that the initiator has.
   The idea behind this is to allow the responder to select which PPK it should use when it derives the IKEv2 keys.</t>

   <t>For the AES256_SHA256 PPK indicator, the PPK Indicator is 16 bytes.  To compute it, we use
   HMAC_SHA256(PPK, &quot;A&quot;) as the 256 bit AES key to
   encrypt the 16 bytes on PPK Indicator Input (in ECB mode), where &quot;A&quot; is a string
   consisting of a single 0x41 octet.</t>

   <t>When the responder receives this notification payload, it verifies that the
   PPK Indicator Algorithm is as it has specified, and it MAY verify that the PPK Indicator Input
   is as it has specified.  If everything is on the level, it scans through its list
   of configured postquantum preshared keys, and determines which one it
   is (possibly (assuming AES256_SHA256_PPK) by computing AES256(HMAC_SHA256(PPK, &quot;A&quot;), PPK_Indicator_Input)
   and comparing that value to the 16 bytes within the payload.
   Alternatively, it may have preselected a PPK Indicator Input, and has precomputed (again assuming AES256_SHA256_PPK)
   AES256(HMAC_SHA256(PPK, &quot;A&quot;), PPK_Indicator_Input) for each PPK it knows
   about (in which case, this is a simple search).
   </t>

   <t>
   If the responder finds a value that matches the payload for a particular PPK,
   that indicates that the intiator and responder share a PPK and can make use of this extension.
   Upon finding such a preshared key, the responder includes a notification
   payload with the response:</t>
      <figure align="center">
        <artwork align="left"><![CDATA[
Initiator                       Responder
------------------------------------------------------------------
                    <--- HDR, SAr1, Ker, Nr, [CERTREQ], N(PPK_ACK)
            ]]></artwork>
      </figure>

   <t>N(PPK_ACK) is a status notification payload with the type [TBA];
   it has a protocol ID of 0, and no SPI and no notification data associated with it.
   This notification serves as a postquantum preshared key confirmation.</t>

   <t>If the responder does not find such a PPK, then it MAY
   continue with the protocol without including a notification ID (if it
   is configured to not have mandatory preshared keys), or it MAY
   abort the exchange (if it configured to make preshared keys
   mandatory).</t>

   <t>When the initiator receives the response, it MUST check for the presence
   of the notification. If it receives one, it marks the SA as using the
   configured preshared key; if it does not receive one, it MAY either abort
   the exchange (if the preshared key was configured as mandatory), or
   it MAY continue without using the preshared key (if the preshared key
   was configured as optional). </t>

     <section title="Computing SKEYSEED"><t>
   When it comes time to generate the keying material during the initial 
   Exchange, the implementation (both the initiator and the responder)
   checks to see if there was an agreed-upon preshared key.  If there
   was, then both sides use this alternative formula:</t>

     <figure align="center">
        <artwork align="left"><![CDATA[
 SKEYSEED = prf(prf(PPK, Ni) | prf(PPK, Nr), g^ir)
 (SK_d | SK_ai | SK_ar | SK_ei | SK_er | SK_pi | SK_pr) =
       prf+(SKEYSEED, prf(PPK, Ni) | prf(PPK, Nr) |
                         SPIi | SPIr)
            ]]></artwork>
      </figure>

   <t>where PPK is the postquantum preshared key, Ni, Nr are the nonces
   exchanged in the IKEv2 exchange, and prf is the pseudorandom function that was negotiated for this SA.</t>

   <t>We reuse the negotiated PRF to transform the received nonces.  We use this PRF,
   rather than negotiating a separate one, because this PRF is agreed by both sides to
   have sufficient security properties (otherwise, they would have negotiated something else), and
   so that we don't need to specify a separate negotiation procedure.</t>
     </section>
     <section title="Verifying preshared key"><t>
   Once both the initiator and the responder have exchanged identities,
   they both double-check with their policy database to verify that they were configured to use those preshared keys when negotiating with the peer.
   If they are not, they MUST abort the exchange.</t>
     </section>

     <section title="Child SAs"><t>
   When you create a child SA, the initiator and the responder will transform
   the nonces using the same PPK as they used during the original IKE SA
   negotiation.  That is, they will use one of the alternative derivations
   (depending on whether an optional Diffie-Hellman was included):</t>
     <figure align="center">
       <artwork align="left"><![CDATA[
 KEYMAT = prf+(SK_d, prf(PPK, Ni) | prf(PPK, Nr))
            ]]></artwork>
     </figure>
   <t>or</t>
     <figure align="center">
       <artwork align="left"><![CDATA[
 KEYMAT = prf+(SK_d, g^ir (new) |
                       prf(PPK, Ni) | prf(PPK, Nr))
            ]]></artwork>
     </figure>

   <t>When you rekey an IKE SA (generating a fresh SKEYSEED), the
   initiator and the responder will transform the nonces using the same
   PPK as they used during the original IKE SA negotiation.  That is,
   they will use the alternate derivation:</t>
    <figure align="center">
       <artwork align="left"><![CDATA[
 SKEYSEED = prf( SK_d (old), g^ir (new) |
                       prf(PPK, Ni) | prf(PPK, Nr))
 (SK_d | SK_ai | SK_ar | SK_ei | SK_er | SK_pi | SK_pr) =
       prf+(SKEYSEED, prf(PPK, Ni) | prf(PPK, Nr) |
                         SPIi | SPIr)
            ]]></artwork>
     </figure>
     </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>   Quantum computers are able to perform Grover&apos;s algorithm; that
   effectively halves the size of a symmetric key.  Because of this,
   the user SHOULD ensure that the postquantum preshared key used has
   at least 256 bits of entropy, in order to provide a 128 bit security level.</t>

   <t>In addition, the policy SHOULD be set to negotiate only quantum-resistant
   symmetric algorithms (AES-256, SHA-256 or better).</t>

   <t>The PPK Indicator Input within the PPK_ENCODE notification are there to prevent anyone from
   deducing whether two different exchanges use the same PPK values.  To
   prevent such a leakage, servers are encouraged to vary them as much as possible
   (however, they may want to repeat values to speed up the search for the PPK).
   Repeating these values places the anonymity at risk; however it has no other security implication.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      &RFC2104;
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      &RFC2119;
      <reference anchor="AES"
                 target="FIPS 197">
        <front>
          <title>Specification for the Advanced Encryption Standard (AES)</title>

          <author>
            <organization>National Institute of Technology</organization>
          </author>

          <date year="2001" />
        </front>
      </reference>
      &RFC7296;
    </references>

    <references title="Informational References">
      <reference anchor="SPDP"
                 target="http://www.mindspring.com/~dmcgrew/spdp.txt">
          <front>
          <title>A Secure Peer Discovery Protocol (SPDP)</title>
          <author fullname="David McGrew" initials="D.M."
            surname="McGrew">
             <organization>Cisco Systems</organization>

          <address>
             <email>mcgrew@cisco.com</email>
          </address>
          </author>
          <date year="2001" />
          </front>
      </reference>
    </references>

    <section anchor="app-additional" title="Discussion and Rationale">
      <t>
  The idea behind this is that while a Quantum Computer can easily
  reconstruct the shared secret of an (EC)DH exchange, they cannot as
  easily recover a secret from a symmetric exchange this makes the
  SKEYSEED depend on both the symmetric PPK, and also the Diffie-Hellman
  exchange. If we assume that the attacker knows everything except the
  PPK during the key exchange, and there are 2**n plausible PPK&apos;s, then
  a Quantum Computer (using Grover&apos;s algorithm) would take O(2**(n/2))
  time to recover the PPK. So, even if the (EC)DH can be trivially
  solved, the attacker still can&apos;t recover any key material unless they
  can find the PPK, and that&apos;s too difficult if the PPK has enough
  entropy (say, 256 bits).</t>

  <t>Another goal of this protocol is to minimize the number of changes
  within the IKEv2 protocol, and in particular, within the cryptography
  of IKEv2.  By limiting our changes to notifications, and translating the
  nonces, it is hoped that this would be implementable, even on systems
  that perform much of the IKEv2 processing is in hardware.</t>

  <t>A third goal was to be friendly to incremental deployment in operational networks, for which
  we might not want to have a global shared key, and also if we&apos;re rolling
  this out incrementally.  This is why we specifically try to allow the
  PPK to be dependent on the peer, and why we allow the PPK to be
  configured as optional.</t>

  <t>A fourth goal was to avoid violating any of the security goals of IKEv2.
  One such goal is anonymity; that someone listening into the exchanges
  cannot easily determine who is negotiating with whom.</t>

  <t>The third and fourth goals are in partial conflict.
  In order to achieve postquantum security,
  we need to stir in the PPK when the keys are computed, however the keys
  are computed before we know who we&apos;re talking to (and so which PPK we should use).
  And, we can&apos;t just tell the other side which PPK to use, as we might use
  different PPK&apos;s for different peers, and so that would violate the anonymity goal.
  If we just (for example) included a hash of the PPK, someone listening in could easily tell
  when we&apos;re using the same PPK for different exchanges, and thus deduce
  that the systems are related.  The compromise we selected was to allow the responder to make the
  trade-off between anonymity and efficiency (by including the PPK Indicator Input, which varies
  how the PPK is encoded, and allowing the responder to specify it).</t>

  <t>A responder who values anonymitity may select a random PPK Indicator Input each time; in this
  case, the responder needs to do a linear scan over all PPK&apos;s it has
  been configured with</t>

  <t>A responder who can't afford a linear scan could precompute a small (possibly rolling)
  set of the PPK Indicator Inputs; in this case, it would precompute how each PPK would be indicated.
  If it reissues the same PPK Indicator Input to two different exchanges, someone would be able
  to verify whether the same PPK was used; this is some loss of anonymity; but is considerably
  more efficient.</t>

  <t>An alternative approach to solve this problem would be
  to do a normal (non-QR) IKEv2 exchange,
  and when the two sides obtain identities, see if they need to be QR, and
  if so, create an immediate IKEv2 child SA (using the PPK).  One issue
  with this is that someone with a quantum computer could deduce the
  identities used.</t>

  <t>A slightly different approach to try to make this even more friendly
  to IKEv2-based cryptographic hardware might be to use invertible cryptography when
  we present the nonces to the kdf.  The idea here is in case we have IKEv2
  hardware that insists on selecting its own nonces (and so we won&apos;t be
  able to give a difference nonce to the KDF); instead, we encrypt the
  nonce that we send (and decrypt the nonce that we get).  Of course, this
  means that the responder will need to figure out which PPK we&apos;re using
  up front (based on the notifications); we&apos;re not sure if this idea would be a
  net improvement (especially since the transform we&apos;re proposing now is
  cryptographically secure and simple).</t>

  <t>The reasoning behind the cryptography used: the values we use in the
  AES256_SHA256 PPK Indicator Algorithm are cryptographically independent of the values used during
  the SKEYSEED generation (because, even if we use HMAC_256 as our PRF, HMAC_SHA256(PPK, A) is independent of
  HMAC_SHA256(PPK, B) if A and B are different strings (and as any real
  nonce must be longer than a single byte, there is never a collision
  between that and &quot;A&quot;.  This independent stems from the assumption that HMAC_SHA256 is a secure MAC.</t>
 
  <t>The method of encoding the PPK within the notification (using AES-256) was chosen as it met two goals:</t>
      <t><list style="symbols">
          <t>Anonymity; given A, AES256_K1(A), B, AES256_K2(B), it&apos;s fairly obvious that gives someone
             (even if they have a quantum computer) no clue about whether K1==K2 (unless either A==B or
             AES256_K1(A)== AES256_K2(B); both highly unlikely events if A and B are chosen randomly).</t>
          <t>Performance during the linear search; a responder could preexpand the AES keys, and so comparing
             a potential PPK against a notification from the initiator would amount to performing a single
             AES block encryption and then doing a 16 byte comparison.</t>
         </list></t>

  <t>The first goal is considered important; one of the goals of IKEv2 is to provide anonymity.
  The second is considered important because the linear scan directly affects scalability.
  While this draft allows the server to gain performance at the cost of anonymity, it was considered
  useful if we make the fully-anonymous method as attractive as possible.
  This use of AES makes this linear scan as cheap as possible (while preserving security).</t>

  <t>We allow the responder to specify the PPK Indicator Algorithm; this was in response to requests for algorithm agility.
  At present, it appears unlikely that there would be a need for an additional encoding (as the current one is
  extremely conservative cryptographically); however the option is there.
      </t>

  <t>The current draft forces a cookie exchange, and hence adds a round trip over the normal IKEv2 operation.
  This was done to allow the server to specify the PPK Indicator algorithm.
  While as additional round trip may seem costly, it does not invalidate this proposal,
  The reason for this proposal is to give an alternative to IKEv1 with preshared keys.
  While this additional round trip may seem costly, it is important to note that, even with the additional round trip,
  this proposal is still cheaper than IKEv1.  Thus the mechanisms specified in this note meet the goal of
  providing a better alternative than relying on an obsolete version of the protocol for post quantum security.</t>

  <t>One issue that is currently open: what should happen if the initiator guesses at the PPK Indicator Algorithm, selects a
  random PPK Indicator Input, and includes that in the initial message?  After all, if the server follows the recommendation
  that the cookie exchange is stateless, and if the server chooses the PPK Indicator Input In randomly,
  it has no way to know that the client isn't running this protocol as specified. If the responder supports that PPK Indicator Algorithm,
  it could very well respond without forcing a cookie exchange (which would eliminate a
  message exchange round).  It's not clear is whether we should endorse this mode of operation, and explicitly state
  that if the server recieves such an initial request, and it doesn't recognize the PPK Indicator Input, it should act
  like it recieved an iniital PPK_REQUEST.</t>
    </section>
  </back>
</rfc>

