Network Working Group                                           N. Banks
Internet-Draft                                     Microsoft Corporation
Intended status: Experimental                            August 11, 2020
Expires: February 12, 2021


                        QUIC Disable Encryption
                 draft-banks-quic-disable-encryption-00

Abstract

   The disable_1rtt_encryption transport parameter can be used to
   negotiate the disablement of encryption on 1-RTT packets, allowing
   for reduced CPU load and improved performance.  This extension is
   only meant to be used in environments where both endpoints completely
   trust the path between themselves; not, for instance, on the open
   internet.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on February 12, 2021.

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
   (https://trustee.ietf.org/license-info) 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




Banks                   Expires February 12, 2021               [Page 1]


Internet-Draft              QUIC-DIS-ENCRYPT                 August 2020


   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Terms and Definitions . . . . . . . . . . . . . . . . . .   2
     1.2.  Applicable Scenarios for Use  . . . . . . . . . . . . . .   2
   2.  Specification . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Disable 1-RTT Encryption Transport Parameter  . . . . . .   3
     2.2.  Negotiating the Extension . . . . . . . . . . . . . . . .   3
     2.3.  Disabling 1-RTT Encryption  . . . . . . . . . . . . . . .   4
     2.4.  Interactions with Path Changes  . . . . . . . . . . . . .   4
   3.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   5
   5.  Normative References  . . . . . . . . . . . . . . . . . . . .   5
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   5

1.  Introduction

   By default QUIC Transport Protocol [I-D.ietf-quic-transport] provides
   secured (authenticated and encrypted) connections via a TLS
   handshake.  The handshake allows for the endpoints to be
   authenticated by a certificate and then securely generates shared
   secrets to encrypt the QUIC packet traffic.  Post-handshake, this
   packet encryption can occupy a considerable percentage of CPU usage,
   depending on the scenario.  Additionally, there are scenarios where
   the protections given by this encryption are either unnecessary or
   unwanted.  For these scenarios, this document defines an extension to
   the QUIC protocol to allow for mutually participating endpoints to
   negotiate the disablement of encryption for the 1-RTT packets sent
   after the handshake.

1.1.  Terms and Definitions

   The keywords "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 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

1.2.  Applicable Scenarios for Use

   QUIC connections are generally meant to always be encrypted, to
   prevent unauthenticated middleboxes from reading or modifying the
   QUIC packets.  This is the desired behavior for most environments;
   especially any that go over the open internet.  There are two
   possible scenarios where disabling packet encryption makes sense:



Banks                   Expires February 12, 2021               [Page 2]


Internet-Draft              QUIC-DIS-ENCRYPT                 August 2020


   o  Trusted Environment/Path - There are scenarios or environments
      where there is no need for the additional security measures of
      QUIC encryption; such as walled-gardens or tunneled connections.
      These scenarios are either already trusted or secured by other
      means.

   o  Performance Testing - When the actual contents of the QUIC packets
      are unimportant and the goal is purely to measure the performance
      characteristics of either the network, machine or QUIC
      implementation without encryption.

2.  Specification

   The disable_1rtt_encryption transport parameter used for negotiating
   the use of the extension is defined below.

2.1.  Disable 1-RTT Encryption Transport Parameter

   The disable_1rtt_encryption transport parameter can be sent by both a
   client and server.  The transport parameter is sent with an optional
   variable-length value by the client and an empty value by the server;
   a client that understands this transport parameter MUST treat the
   receipt of a non-empty value as a connection error of type
   TRANSPORT_PARAMETER_ERROR.

   Advertising the disable_1rtt_encryption transport parameter indicates
   that the endpoint wishes to disable encryption for 1-RTT packets.
   Both sides must advertise support for the feature for it to be
   considered successfully negotiated.

   If successfully negotiated, all packets that would normally be
   encrypted with the 1-RTT key are instead sent as cleartext; both
   header and packet protections are disabled.

2.2.  Negotiating the Extension

   The payload sent in the transport parameter by the client, along with
   any other information the server has about the client (such as IP
   address) may be used to negotiate the extension on the server side.
   The TP payload could be considered a key or identifier used by the
   server to verify the client should be allowed to disable encryption.
   These additional security measures are optional, but RECOMMENDED to
   ensure encryption is not accidentally enabled when it should not be.








Banks                   Expires February 12, 2021               [Page 3]


Internet-Draft              QUIC-DIS-ENCRYPT                 August 2020


2.3.  Disabling 1-RTT Encryption

   When the extension is negotiated, all aspects of encryption on 1-RTT
   packets are removed:

   o  Header protection

   o  Payload protection

   o  AEAD tag

   This effectively gives the transport an additional 16 bytes per
   packet to be used for payload, since it is no longer including an
   AEAD tag.

   Because the AEAD tag is removed along with the encryption, the UDP
   checksum must be relied upon to determine any packet corruption.

2.4.  Interactions with Path Changes

   When making the trust determination about the path, each endpoints
   must take into account possible path changes; NAT rebinding for
   instance.  An endpoint MUST NOT enable enable this extension if it is
   possible for the path to change during the connection to some
   untrusted state.

   Additionally, a client MUST NOT try to migrate to any path that is
   untrusted if this extension is negotiated.  If a server receives a
   packet for a connection with this extension negotiated on an
   untrusted path, it MUST silently drop the packet.

3.  Security Considerations

   Disabling encryption for 1-RTT packets has some fairly obvious
   security drawbacks:

   o  Packets can be read, modified and injected by any middleboxes

   This extension is not meant to be used for any practical application
   protocol on the open internet.  Internet facing servers MUST NOT
   enable this extension.  Clients that do not trust their network and
   path to the server MUST NOT enable this extension.

   This extension does not modify the packet protections used during the
   handshake, so the handshake can still be securely authenticated.
   This prevents scenarios where one endpoint might trust (or think it
   trusts) the path, but the other endpoint does not, and a man-in-the-
   middle tries to force this extension to be used.



Banks                   Expires February 12, 2021               [Page 4]


Internet-Draft              QUIC-DIS-ENCRYPT                 August 2020


   To prevent accidental use of the feature on production systems it is
   RECOMMENDED for servers to have additional measures such as IP
   filtering or a security key.

4.  IANA Considerations

   This document registers a new value in the QUIC Transport Parameter
   Registry:

   Value: TBD (using value 0xBAAD in early deployments)

   Parameter Name: disable_1rtt_encryption

   Specification: Indicates disabled 1-RTT encryption is being
   negotiated

5.  Normative References

   [I-D.ietf-quic-transport]
              Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed
              and Secure Transport", draft-ietf-quic-transport-29 (work
              in progress), June 2020.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

Author's Address

   Nick Banks
   Microsoft Corporation

   Email: nibanks@microsoft.com













Banks                   Expires February 12, 2021               [Page 5]