Draft: draft-ietf-quic-qpack

Commentary: Minor editorial nits .
Paragraph (version A):
The QUIC transport protocol QUIC-TRANSPORT is designed to support
HTTP semantics, and its design subsumes many of the features of
HTTP/2 RFC7540.  HTTP/2 uses HPACK RFC7541 for compression of the
header and trailer sections.  If HPACK were used for HTTP/3 HTTP3, it
would induce head-of-line blocking for field sections due to built-in
assumptions of a total ordering across frames on all streams.
Paragraph (version B):
The QUIC transport protocol (QUIC-TRANSPORT) is designed to support
HTTP semantics, and its design subsumes many of the features of
HTTP/2 (RFC7540).  HTTP/2 uses HPACK (RFC7541) for compression of the
header and trailer sections.  If HPACK were used for HTTP/3 (HTTP3),
it would induce head-of-line blocking for field sections due to
built-in assumptions of a total ordering across frames on all
streams.
Paragraph (version A):
The static table consists of a predefined static list of field lines,
each of which has a fixed index over time.  Its entries are defined
in static-table.
Paragraph (version B):
The static table consists of a predefined list of field lines, each
of which has a fixed index over time.  Its entries are defined in
static-table.
Paragraph (version A):
This document expands the definition of string literals and permits
them to begin other than on a byte boundary.  An "N-bit prefix string
literal" begins with the same Huffman flag, followed by the length
encoded as an (N-1)-bit prefix integer.  The prefix size, N, can have
a value between 2 and 8 inclusive.  The remainder of the string
literal is unmodified.
Paragraph (version B):
This document expands the definition of string literals by permitting
them to begin other than on a byte boundary.  An "N-bit prefix string
literal" begins with the same Huffman flag, followed by the length
encoded as an (N-1)-bit prefix integer.  The prefix size, N, can have
a value between 2 and 8 inclusive.  The remainder of the string
literal is unmodified.
Paragraph (version A):
An endpoint MAY avoid creating an encoder stream if it's not going to
be used (for example if its encoder does not wish to use the dynamic
table, or if the maximum size of the dynamic table permitted by the
peer is zero).
Paragraph (version B):
An endpoint MAY avoid creating an encoder stream if it will not be
used (for example if its encoder does not wish to use the dynamic
table, or if the maximum size of the dynamic table permitted by the
peer is zero).
Paragraph (version A):
This section specifies the following encoder instructions.
Paragraph (version A):
This section specifies the following decoder instructions.
Paragraph (version A):
If an encoder receives a Section Acknowledgement instruction
referring to a stream on which every encoded field section with a
non-zero Required Insert Count has already been acknowledged, that
MUST be treated as a connection error of type
QPACK_DECODER_STREAM_ERROR.
Paragraph (version B):
If an encoder receives a Section Acknowledgement instruction
referring to a stream on which every encoded field section with a
non-zero Required Insert Count has already been acknowledged, this
MUST be treated as a connection error of type
QPACK_DECODER_STREAM_ERROR.
Paragraph (version A):
Each encoded field section is prefixed with two integers.  The
Required Insert Count is encoded as an integer with an 8-bit prefix
after the encoding described in ric).  The Base is encoded as a sign
bit ('S') and a Delta Base value with a 7-bit prefix; see base.
Paragraph (version B):
Each encoded field section is prefixed with two integers.  The
Required Insert Count is encoded as an integer with an 8-bit prefix
using the encoding described in ric).  The Base is encoded as a sign
bit ('S') and a Delta Base value with a 7-bit prefix; see base.
Paragraph (version A):
A single-pass encoder determines the Base before encoding a field
section.  If the encoder inserted entries in the dynamic table while
encoding the field section, Required Insert Count will be greater
than the Base, so the encoded difference is negative and the sign bit
is set to 1.  If the field section was not encoded using
representations that reference the most recent entry in the table and
did not insert any new entries, the Base will be greater than the
Required Insert Count, so the delta will be positive and the sign bit
is set to 0.
Paragraph (version B):
A single-pass encoder determines the Base before encoding a field
section.  If the encoder inserted entries in the dynamic table while
encoding the field section and is referencing them, Required Insert
Count will be greater than the Base, so the encoded difference is
negative and the sign bit is set to 1.  If the field section was not
encoded using representations that reference the most recent entry in
the table and did not insert any new entries, the Base will be
greater than the Required Insert Count, so the delta will be positive
and the sign bit is set to 0.
Paragraph (version A):
Attacks like CRIME CRIME demonstrated the existence of these general
attacker capabilities.  The specific attack exploited the fact that
DEFLATE RFC1951 removes redundancy based on prefix matching.  This
permitted the attacker to confirm guesses a character at a time,
reducing an exponential-time attack into a linear-time attack.
Paragraph (version A):
QPACK mitigates but does not completely prevent attacks modeled on
CRIME CRIME by forcing a guess to match an entire header field value,
rather than individual characters.  An attacker can only learn
whether a guess is correct or not, so is reduced to a brute force
guess for the header field values.
Paragraph (version B):
Attacks like CRIME (CRIME) demonstrated the existence of these
general attacker capabilities.  The specific attack exploited the
fact that DEFLATE (RFC1951) removes redundancy based on prefix
matching.  This permitted the attacker to confirm guesses a character
at a time, reducing an exponential-time attack into a linear-time
attack.
Paragraph (version B):
QPACK mitigates but does not completely prevent attacks modeled on
CRIME (CRIME) by forcing a guess to match an entire header field
value, rather than individual characters.  An attacker can only learn
whether a guess is correct or not, so is reduced to a brute force
guess for the header field values.
Paragraph (version A):
Web browsers also need to assume that requests made on the same
connection by different web origins RFC6454 are made by mutually
distrustful entities.
Paragraph (version B):
Web browsers also need to assume that requests made on the same
connection by different web origins (RFC6454) are made by mutually
distrustful entities.
Paragraph (version A):
Refusing to insert a header field into the dynamic table is only
effective if doing so is avoided on all hops.  The never indexed
literal bit (see literal-name-reference) can be used to signal to
intermediaries that a particular value was intentionally sent as a
literal.
Paragraph (version B):
Refusing to insert a header field into the dynamic table is only
effective if doing so is avoided on all hops.  The never-indexed
literal bit (see literal-name-reference) can be used to signal to
intermediaries that a particular value was intentionally sent as a
literal.
Paragraph (version A):
An intermediary MUST NOT re-encode a value that uses a literal
representation with the 'N' bit set with another representation that
would index it.  If QPACK is used for re-encoding, a literal
representation with the 'N' bit set MUST be used.  If HPACK is used
for re-encoding, the never indexed literal representation (see
Section 6.2.3 of RFC7541) MUST be used.
Paragraph (version B):
An intermediary MUST NOT re-encode a value that uses a literal
representation with the 'N' bit set with another representation that
would index it.  If QPACK is used for re-encoding, a literal
representation with the 'N' bit set MUST be used.  If HPACK is used
for re-encoding, the never-indexed literal representation (see
Section 6.2.3 of RFC7541) MUST be used.
Paragraph (version A):
Note that these criteria for deciding to use a never indexed literal
representation will evolve over time as new attacks are discovered.
Paragraph (version B):
Note that these criteria for deciding to use a never-indexed literal
representation will evolve over time as new attacks are discovered.
Paragraph (version A):
An implementation has to set a limit for the values it accepts for
integers, as well as for the encoded length (see prefixed-integers).
In the same way, it has to set a limit to the length it accepts for
string literals (see string-literals).
Paragraph (version B):
An implementation has to set a limit for the values it accepts for
integers, as well as for the encoded length; see prefixed-integers.
In the same way, it has to set a limit to the length it accepts for
string literals; see string-literals.