<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" 
category="info" 
number="8774"
docName="draft-welzl-quantumbug-00" 
ipr="trust200902"
obsoletes="" 
updates="" 
submissionType="independent" 
xml:lang="en" 
tocInclude="true" 
tocDepth="3" 
symRefs="true" 
sortRefs="true" 
version="3">

  <!-- xml2rfc v2v3 conversion 2.41.0 -->

    <front>
       <title abbrev="The Quantum Bug">The Quantum Bug</title>
       <seriesInfo name="RFC" value="8774"/>
        
        <author fullname="Michael Welzl" initials="M." surname="Welzl">
      <organization>University of Oslo</organization>
      <address>
        <postal>
          <street>PO Box 1080 Blindern</street>
                    <code>N-0316</code>
          <city>Oslo</city>
          <region/>
          <country>Norway</country>
        </postal>
        <phone>+47 22 85 24 20</phone>
        <email>michawe@ifi.uio.no</email>

            </address>
    </author>
        <date day="01" month="April" year="2020"/>

        <workgroup>Independent Submission</workgroup>
<keyword>Teleportation</keyword>
<keyword>Entanglement</keyword>
<keyword>0-RTT</keyword>


        <abstract>
      <t>The age of quantum networking is upon us, and with it comes
"entanglement": a procedure in which a state (i.e., a bit) can be
transferred instantly, with no measurable delay between peers. This will
lead to a perceived round-trip time of zero seconds
on some Internet paths, a capability which was not predicted and so not
included as a possibility in many protocol specifications.
Worse than the millennium bug, this unexpected value is bound to cause
serious Internet failures unless the specifications are fixed in time.</t>
    </abstract>
  </front>

  <middle>
        <section anchor="sec-intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t><xref target="RFC6921" format="default"/> discusses faster-than-light
      communication, where packets arrive before they are sent. 
      While it is amusing to entertain the possibility of time travel, we have
      to accept the cold facts: time travel will never work (or it would
      already have been used). Quantum networking,
      however, is an entirely different matter -- commercial products are
      already available, and quantum networks will without a doubt become the
      prevalent Internet link-layer technology across the globe within the
      next five to ten years. 
      </t>
      <t>With the help of entanglement, implemented in quantum repeaters,
      quantum networks can transfer information faster than ever before: a
      state can be transmitted over a long distance instantly, with no delay.
      This is so cool that it is also called (and, by some, mistaken
      for) teleportation. If a path between a sender and a receiver is fully
      quantum-ized, the measured one-way delay (OWD) will be zero. What's
      more, assuming that there are blazing fast quantum computers involved on
      both ends, the processing time will be well below anything measurable;
      hence, even the round-trip time (RTT) will be zero in these
      scenarios. 
      </t>
      <t>In today's Internet, only very few protocols are prepared for such
      "0-RTT" situations (e.g., TCP with "TCP Fast Open" (TFO) <xref
      target="RFC7413" format="default"/>, TLS 1.3 <xref target="RFC8446"
      format="default"/>, and QUIC <xref target="I-D.ietf-quic-transport"
      format="default"/>). Many others will fail in interesting ways; we coin
      the term "Quantum Bug" for such failures. In the following section, we
      will discuss some examples of Quantum Bugs. 
      </t>
    </section>
    <section anchor="Problems" numbered="true" toc="default">
      <name>Protocols and Protocol Mechanisms That Will Fail</name>
      <t>The number of protocols and protocol mechanisms that
                will fail in the face of a zero RTT is too large to
                report here; we are truly
                heading towards something close to an Internet meltdown. We
		can only provide some guidance to those who hunt for the
		Quantum Bug, by discussing examples of specification mistakes
		that will need to be fixed. 
      </t>

      <section anchor="LEDBAT" numbered="true" toc="default">
        <name>LEDBAT</name>
        <t>The Low Extra Delay Background Transfer (LEDBAT) congestion control
	mechanism <xref target="RFC6817" format="default"/> is a very
	interesting failure case: designed to "get out of the way" of other
	traffic; it will end up sending as fast as possible. Specifically,
	when the algorithm described in <xref
	target="RFC6817" sectionFormat="of" section="2.4.2"/> obtains a delay
	sample, it updates a list of base delays that will all become 0
	and current delays that will also all become 0. It calculates
	a queuing delay as the difference between the current delay and the
	base delay (resulting in 0) and keeps increasing the Congestion Window
	(cwnd) until the queuing delay reaches a predefined parameter value
	TARGET (100 milliseconds or less). 
        </t>
        <t>A TARGET value of 100 milliseconds will never be reached, because
	the queuing delay does not grow when the sender increases its cwnd;
	this means that LEDBAT would endlessly increase its cwnd, limited only
	by the number of bits that are used to represent cwnd. However, given
	that TARGET=0 is also allowed, this parameter choice may seem to be a
	way out. Always staying at the target means that the sender would
	maintain its initial cwnd, which should be set to 2. This may seem
	like a small number, but remember that cwnd is the number of bytes
	that can be transmitted per RTT (which is 0). Thus, irrespective of
	the TARGET value, the sender will send data as fast as it can. 
        </t>
      </section>

      <section anchor="TCP-MPTCP" numbered="true" toc="default">
        <name>Multipath TCP (MPTCP)</name>
        <t>The coupled congestion control mechanism proposed for MPTCP in
	<xref target="RFC6356" format="default"/> requires calculating a value
	called "alpha". Equation 2 in <xref target="RFC6356" format="default"/>
        contains a term where a value called "cwnd_i" is divided by the square
        of the RTT, and another term where this value is divided by the
        RTT. Enough said.</t>  
      </section>

      <section anchor="CircuitBreakers" numbered="true" toc="default">
        <name>RTP Circuit Breakers</name>
        <t>The RTP Circuit Breakers <xref target="RFC8083" format="default"/>
	require calculation of a well-known equation which yields the
	throughput of a TCP connection: 
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                          s
X = -------------------------------------------------------------
  Tr*sqrt(2*b*p/3)+(t_RTO * (3*sqrt(3*b*p/8) * p * (1+32*p*p)))]]></artwork>
        <t>
            where Tr is the RTT and t_RTO is the retransmission timeout of TCP
	    (we don't need to care about the other variables). As we will
	    discuss in <xref target="Solution" format="default"/>, t_RTO is
	    lower-bounded with 1 second; therefore, it saves us from a
	    division by zero. However, there is also a simplified version
	    of this equation: 
        </t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
          s
X = ----------------
    Tr*sqrt(2*b*p/3)]]></artwork>

        <t>Unfortunately, <xref target="RFC8083" format="default"/> states:
	"It is RECOMMENDED that this simplified throughput equation be used 
        since the reduction in accuracy is small, and it is much simpler to
        calculate than the full equation." Due to this simplification, many 
        multimedia applications will crash.</t>
      </section>
    </section>

    <section anchor="Solution" numbered="true" toc="default">
      <name>What can be done?</name>
      <t>Fear not: when everything else fails, TCP will still work.
      Its retransmission timeout is lower-bounded by 1 second <xref
      target="RFC6298" format="default"/>. Moreover, while its cwnd may grow up to the maximum storable number, data
      transmission is limited by the Receiver Window (rwnd). This means that
      flow control will save TCP from failing.</t> 

      <t>From this, we can learn two simple rules: lower-bound any values
      calculated from the RTT (and, obviously, do not divide by the RTT), and
      use flow control. Specifications will need to be updated by fixing all
      RTT-based calculations and introducing flow control everywhere. For example,
      UDP will have to be extended with a receiver window, e.g., as a UDP
      option <xref target="I-D.ietf-tsvwg-udp-options" format="default"/>.</t> 
    </section>

    <section anchor="conclusion" numbered="true" toc="default">
      <name>Conclusion</name>
      <t>We are in trouble, and there is only one way out: develop a
      comprehensive list of all RFCs containing "0-RTT" mistakes (taking <xref
      target="RFC2626" format="default"/> as a guideline), and update all
      code. This needs to happen fast, the clock is ticking. Luckily, if we
      are too slow, we will still be able to use TCP to access the
      specifications. With DNS over TCP <xref target="RFC7766"
      format="default"/>, name resolution to find the server containing the
      specifications should also work.</t> 
    </section>
        
        <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>Flow control must be used on 0-RTT paths, or else an
            attacker can completely overwhelm a sender with data
            in a denial-of-service (DoS) attack within an instant.
            Flow control will need to be added to protocols that do
            not currently have it, such as UDP or ICMP.
                IPv6 will not save us.</t>
    </section>
  </middle>
    
    <back>
<displayreference target="I-D.ietf-quic-transport" to="QUIC-TRANS"/>
<displayreference target="I-D.ietf-tsvwg-udp-options" to="UDP-OPT"/>

         <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2626.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6921.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6298.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6356.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6817.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7413.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7766.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8083.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-quic-transport.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-tsvwg-udp-options.xml"/>
        </references>
    </references>
    </back>
</rfc>
