Subject: [quicwg/base-drafts] a7b49b: Initial cut at packet number encryption

From: Martin Thomson <[email-masked]>
Date: Wed, 14 Mar 2018 06:31:31 -0700

Branch: refs/heads/pn-encrypt
  Home:   https://github.com/quicwg/base-drafts
  Commit: a7b49b55e486aac6d4d814bed00e1e4d3a874727
      https://github.com/quicwg/base-drafts/commit/a7b49b55e486aac6d4d814bed00e1e4d3a874727
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

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

  Log Message:
  -----------
  Initial cut at packet number encryption

This is a little rough, but I think that the bones are here.

I know that we discussed removing short packet types in favor of putting the
lengths under encryption.  I will do that separately, just to keep the size of
this changeset to something more manageable.

  Commit: 79c958e49dd02e28d11e7147e5158d83a92e06d9
      https://github.com/quicwg/base-drafts/commit/79c958e49dd02e28d11e7147e5158d83a92e06d9
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  Constant time

This is pretty onerous, so I'd like to see if people think that this is
acceptable.  The cost is that all packets need to have their AEAD run the whole
way through.  The gain is that there will be no side-channels for attackers to exploit.

  Commit: d6e65f93276b1aaa9bb79cae87fdc228b319900a
      https://github.com/quicwg/base-drafts/commit/d6e65f93276b1aaa9bb79cae87fdc228b319900a
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  That was a little unclear on a re-read

  Commit: b1b1276e9eab2c4f772fbe27f6d0317a18d2f9d0
      https://github.com/quicwg/base-drafts/commit/b1b1276e9eab2c4f772fbe27f6d0317a18d2f9d0
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  That was a little unclear on a re-read, again

  Commit: 76f0a9cfc9d7e0623c9bfa9def14d657564e32d2
      https://github.com/quicwg/base-drafts/commit/76f0a9cfc9d7e0623c9bfa9def14d657564e32d2
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  More tweaking (I have to stop this)

  Commit: 0432a6153ff3f57079bf28fe0bcd35e1ea8177e2
      https://github.com/quicwg/base-drafts/commit/0432a6153ff3f57079bf28fe0bcd35e1ea8177e2
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

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

  Log Message:
  -----------
  Some fairly obvious errors

  Commit: ac42d070ecbc020414c4e6661a2e45a1f14aedd9
      https://github.com/quicwg/base-drafts/commit/ac42d070ecbc020414c4e6661a2e45a1f14aedd9
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  Don't mess with ChaCha20, use it directly

  Commit: 52bb64d0675b423c6acc5d69fee3435b8f9a1e0e
      https://github.com/quicwg/base-drafts/commit/52bb64d0675b423c6acc5d69fee3435b8f9a1e0e
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  Fix off-by-one error

  Commit: 56135054e0150581ba1aefc7b98910f4da1dc373
      https://github.com/quicwg/base-drafts/commit/56135054e0150581ba1aefc7b98910f4da1dc373
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  Two *different* packet numbers

  Commit: b306aa9c9eb2b256e5ef2046399544556cbaac4d
      https://github.com/quicwg/base-drafts/commit/b306aa9c9eb2b256e5ef2046399544556cbaac4d
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  Remove repetition

  Commit: 4f57341cb6264d987ccec7969d4f0dff5c859d33
      https://github.com/quicwg/base-drafts/commit/4f57341cb6264d987ccec7969d4f0dff5c859d33
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  Take and rework suggestions by @cwood

  Commit: 4072ec35012058562cbf1e6df2fae496e01a6b26
      https://github.com/quicwg/base-drafts/commit/4072ec35012058562cbf1e6df2fae496e01a6b26
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-tls.md

  Log Message:
  -----------
  Just use AES-CTR

  Commit: 3386bf7cf304ec5e5e447c71a8ace929091016e2
      https://github.com/quicwg/base-drafts/commit/3386bf7cf304ec5e5e447c71a8ace929091016e2
  Author: Martin Thomson <[email-masked]>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M draft-ietf-quic-transport.md

  Log Message:
  -----------
  Make the order of operations clearer.

Compare: https://github.com/quicwg/base-drafts/compare/894e0fe70064...3386bf7cf304