Re: [quicwg/base-drafts] Mask packet numbers with a per-connection-ID key (#1043)
Mike Bishop <notifications@github.com> Tue, 09 January 2018 18:14 UTC
Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C2534129966 for <quic-issues@ietfa.amsl.com>; Tue, 9 Jan 2018 10:14:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.029
X-Spam-Level:
X-Spam-Status: No, score=-2.029 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bqZyNC-_QtDM for <quic-issues@ietfa.amsl.com>; Tue, 9 Jan 2018 10:14:28 -0800 (PST)
Received: from o4.sgmail.github.com (o4.sgmail.github.com [192.254.112.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AF6E212778E for <quic-issues@ietf.org>; Tue, 9 Jan 2018 10:14:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=IG3x7FKlLU9IDQRNihjWomUU29M=; b=C8GAhHoYmHGZ/TOP C1o9VdvMu/CDNqCsK3dMXdmlaEmpMjcuW8abSQ7x7h8+icb6J1RgbKPupGM8BmMy WfO8HY+hNrjT5pPd0y+LZTUtBsnedbMoNCsFcFxEL1aEhxxyqI4kD12/iCoe0aJ5 Hnnvdk7tqFqHmvObLrEOI0DUTDo=
Received: by filter0275p1las1.sendgrid.net with SMTP id filter0275p1las1-29053-5A550683-E 2018-01-09 18:14:27.298211224 +0000 UTC
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2a-ext-cp1-prd.iad.github.net [192.30.253.16]) by ismtpd0010p1iad1.sendgrid.net (SG) with ESMTP id DCMfePUpRJSULSXVTK8trA for <quic-issues@ietf.org>; Tue, 09 Jan 2018 18:14:27.188 +0000 (UTC)
Date: Tue, 09 Jan 2018 18:14:27 +0000
From: Mike Bishop <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab998d2c0196db21c699618a016a9b500d6a188dd792cf00000001166cc88292a169ce111afff8@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/1043/review/87606002@github.com>
In-Reply-To: <quicwg/base-drafts/pull/1043@github.com>
References: <quicwg/base-drafts/pull/1043@github.com>
Subject: Re: [quicwg/base-drafts] Mask packet numbers with a per-connection-ID key (#1043)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5a55068379b0_37a83ffd6e58cf2c3013dc"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: MikeBishop
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak3wB3LLMZz4X6RRkGLqH6F29yP5PVuXmL9cA2 +2vVzZAHDVMkeaZsdVp8vD+lh0GJ1JWJ/BRitU8INlV+cYs70IuTDYFF16xBR1dGCxckoGgrUw93OY jM9gsOUZ3Ku31Inj7qH5OSefG9sT8nIVb0ICnCd7m08dY6ewDGu62Z3VAjvKawprBBOgvGC0X+6TZE k=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/17ddYrWKlEyq7TWS4CYqRaOJX9U>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.22
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Jan 2018 18:14:31 -0000
MikeBishop commented on this pull request. Looks reasonable; minor nits. > ~~~ - struct { - uint16 length = Length; - opaque label<6..255> = "QUIC " + Label; - uint8 hashLength = 0; - } QuicHkdfLabel; +struct { + uint16 length = Length; + opaque label<6..255> = "QUIC " + Label; + uint8 connectionId<0>; Is this included just to emphasize that it's zero-length, or does it actually include a byte representing the zero-length array? > -TLS state machine reports that the ClientHello has been sent, the 0-RTT keys can -be generated and installed for writing. When the TLS state machine reports -completion of the handshake, the 1-RTT keys can be generated and installed for -writing. +Note: + +: A connection ID might be omitted from the encoding of a packet, as is + permitted when the omit_connection_id transport parameter is used, but the + connection ID is still used by QHKDF-Expand to derive these values. + +The QUIC record protection initially starts with keying material derived from +handshake keys. When the TLS state machine reports that the ClientHello has +been sent, 0-RTT keys can be generated and installed for writing, if 0-RTT is +available. Finally, the TLS state machine reports completion of the handshake, +the 1-RTT keys can be generated and installed for writing. Additionally, new +keys are installed each time that the connection ID changes. Does this need to mention TLS key updates? > @@ -606,9 +606,12 @@ A Retry packet uses long headers with a type value of 0x7E. It carries cryptographic handshake messages and acknowledgments. It is used by a server that wishes to perform a stateless retry (see {{stateless-retry}}). -The packet number and connection ID fields echo the corresponding fields from -the triggering client packet. This allows a client to verify that the server -received its packet. +The connection ID field echoes the corresponding fields from the triggering One field > @@ -606,9 +606,12 @@ A Retry packet uses long headers with a type value of 0x7E. It carries cryptographic handshake messages and acknowledgments. It is used by a server that wishes to perform a stateless retry (see {{stateless-retry}}). -The packet number and connection ID fields echo the corresponding fields from -the triggering client packet. This allows a client to verify that the server -received its packet. +The connection ID field echoes the corresponding fields from the triggering +client packet. This allows a client to correlate a Retry with the Initial +packet that it sends that the server received its packet. This sentence doesn't parse. > @@ -642,11 +645,11 @@ server and client. The connection ID field in a Handshake packet contains a connection ID that is chosen by the server (see {{connection-id}}). -The first Handshake packet sent by a server contains a randomized packet number. -This value is increased for each subsequent packet sent by the server as -described in {{packet-numbers}}. The client increments the packet number from -its previous packet by one for each Handshake packet that it sends (which might -be an Initial, 0-RTT Protected, or Handshake packet). +The first Handshake packet sent by a server contains a packet number of 0. This +value is increased for each subsequent packet sent by the server as described in +{{packet-numbers}}. The client increments the packet number from its previous +packet by one for each packet that it sends (which might be an +Initial, 0-RTT Protected, or Handshake packet). I know this isn't new text, but this statement about the client is redundant -- the client's behavior is already described at line 586. (In fact, it might be worth consolidating them and simply describing that the first packet sent by each party has a packet number of zero and is incremented with each packet.) > +packet_number = (masked_packet_number - pn_mask) MOD num_values +~~~ + +Packet numbers are not obscured when encoded in frames, such as ACK +({{frame-ack}}). + +These changes are applied before packet protection, so the additional +authenticated data (AAD) input includes masked values. + +These are not true cryptographic confidentiality protections, so entities other +than endpoints are likely to be able to recover the underlying values by +observing multiple packets. For instance, in this version of QUIC, packet +numbers still increase monotonically as long as the connection ID remains +constant. However, these values are different for client and server, and they +change when a connection ID changes, together ensuring that flows with different +connection IDs are not linkable based on the value of these fields. Strong statement; maybe we stick to making it more difficult to link? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/quicwg/base-drafts/pull/1043#pullrequestreview-87606002
- [quicwg/base-drafts] Mask packet numbers with a p… Martin Thomson
- Re: [quicwg/base-drafts] Mask packet numbers with… MikkelFJ
- Re: [quicwg/base-drafts] Mask packet numbers with… Martin Thomson
- Re: [quicwg/base-drafts] Mask packet numbers with… Martin Thomson
- Re: [quicwg/base-drafts] Mask packet numbers with… MikkelFJ
- Re: [quicwg/base-drafts] Mask packet numbers with… Marten Seemann
- Re: [quicwg/base-drafts] Mask packet numbers with… Mike Bishop
- Re: [quicwg/base-drafts] Mask packet numbers with… ianswett
- Re: [quicwg/base-drafts] Mask packet numbers with… Martin Thomson
- Re: [quicwg/base-drafts] Mask packet numbers with… Martin Thomson
- Re: [quicwg/base-drafts] Mask packet numbers with… Martin Thomson
- Re: [quicwg/base-drafts] Mask packet numbers with… Martin Thomson