Compression Dictionaries for HTTP/2
draft-vkrasnov-h2-compression-dictionaries-03

Document Type Active Internet-Draft (individual)
Last updated 2018-03-05
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                         V. Krasnov
Internet-Draft                                          Cloudflare, Inc.
Intended status: Informational                                  Y. Weiss
Expires: September 6, 2018                     Akamai Technologies, Inc.
                                                           March 5, 2018

                  Compression Dictionaries for HTTP/2
             draft-vkrasnov-h2-compression-dictionaries-03

Abstract

   This document specifies new HTTP/2 frame types and new HTTP/2
   settings values that enable the use of previously transferred data as
   compression dictionaries, significantly improving overall compression
   ratio for a given connection.

   In addition, this document proposes to define a set of industry
   standard, static, dictionaries to be used with any Lempel-Ziv based
   compression for the common textual MIME types prevalent on the web.

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 September 6, 2018.

Copyright Notice

   Copyright (c) 2018 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

Krasnov & Weiss         Expires September 6, 2018               [Page 1]
Internet-Draft     Compression Dictionaries for HTTP/2        March 2018

   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Conventions and Terminology . . . . . . . . . . . . . . .   3
   2.  Preliminaries . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Security Considerations . . . . . . . . . . . . . . . . .   3
     2.2.  Content Coding  . . . . . . . . . . . . . . . . . . . . .   3
     2.3.  Compression Contexts  . . . . . . . . . . . . . . . . . .   4
     2.4.  Server Push Interaction . . . . . . . . . . . . . . . . .   4
     2.5.  HTTP/QUIC . . . . . . . . . . . . . . . . . . . . . . . .   4
   3.  HTTP/2 Extension  . . . . . . . . . . . . . . . . . . . . . .   4
     3.1.  Extension Settings  . . . . . . . . . . . . . . . . . . .   4
     3.2.  Extension Frames  . . . . . . . . . . . . . . . . . . . .   5
       3.2.1.  The SET_COMPRESSION_CONTEXT frame . . . . . . . . . .   5
       3.2.2.  The SET_DICTIONARY Frame  . . . . . . . . . . . . . .   5
       3.2.3.  The USE_DICTIONARY Frame  . . . . . . . . . . . . . .   7
     3.3.  Static Dictionaries . . . . . . . . . . . . . . . . . . .   7
   4.  Dictionary State  . . . . . . . . . . . . . . . . . . . . . .   8
     4.1.  Attack scenarios and mitigations  . . . . . . . . . . . .  10
       4.1.1.  Cross-origin secret leak  . . . . . . . . . . . . . .  10
       4.1.2.  Same-origin secret leak . . . . . . . . . . . . . . .  11
   5.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  11
     5.1.  Normative References  . . . . . . . . . . . . . . . . . .  12
     5.2.  Informative References  . . . . . . . . . . . . . . . . .  12
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  12

1.  Introduction

   The HTTP/2 [RFC7540] protocol encourages the use of many small assets
   for CSS/JS/HTML, due to its multiplexed nature.  Prior to HTTP/2,
   asset inlining was encouraged, resulting in fewer, larger assets per
   website.

   The HTTP/2 protocol also allows for transmitted data to be compressed
   with a lossless compression format.  The format used is specified in
   the "Content-Encoding" (see [RFC2616], section 14.11) header field.
   For example, "Content-Encoding: br" means the data was compressed
   using the Brotli format.

   The nature of the compression algorithms, such as DEFLATE [RFC1951]
   and Brotli [RFC7932], used with HTTP in practice, require a certain
   "window" of data to perform backward matching.  Therefore, larger
   files have much better compression ratio.  To improve compression for
Show full document text