Subject: [quicwg/base-drafts] 185ab4: Make connection ID 136 bits long

From: Martin Thomson <[email-masked]>
Date: Tue, 30 Jan 2018 22:57:46 -0800

Branch: refs/heads/connid17
  Home:   https://github.com/quicwg/base-drafts
  Commit: 185ab48d7e64e17243bfc227adbacbaacc5b96d4
      https://github.com/quicwg/base-drafts/commit/185ab48d7e64e17243bfc227adbacbaacc5b96d4
  Author: Martin Thomson <[email-masked]>
  Date:   2018-01-31 (Wed, 31 Jan 2018)

  Changed paths:
    M draft-ietf-quic-tls.md
    M draft-ietf-quic-transport.md
    M draft-thomson-quic-invariants.md

  Log Message:
  -----------
  Make connection ID 136 bits long

This comes out of the discussion about what it takes to construct a sensible
connection ID for NEW_CONNECTION_ID.  Trying to cram sufficient routing state
into a 64-bit identifier is tricky, especially since that information needs to
be encrypted and probably also authenticated (at least a little).  Using a
block cipher would be ideal, but all the 64-bit ciphers are pretty bad, whereas
all the 128-bit ones are both faster and more available.

The extra 8 bits is for accounting.  If you want to manage key rotation, a key
identifier is helpful.  Having extra space allows for that to be added without
forcing the block cipher to protect less than 128 octets, which can be hard.

The way that packet overheads are managed are different for long and short
headers.  In long headers, the overheads are much higher, but we don't send
many of those, so it's not a big deal.  For short headers, each endpoint sends
a truncate_connection_id transport parameter which sets the length of the
connection ID that will be used in short headers.  Each endpoint sets their own
limit and their peer has to follow this limit.  Anywhere from 0 (no connection
ID) to 17 (all of the connection ID) can be set.

This also closes the discussion about whether connection ID is a number or not.
With truncation, treating it as a number no longer makes sense.

Note that this change shows the corresponding changes to the invariants draft
on the assumption that it will need to be changed at the same time.

Closes #1052, #821, #834, #833, #881.