Re: [quicwg/base-drafts] Rewrite key update section (#3050)

Kazuho Oku <notifications@github.com> Fri, 01 November 2019 07:57 UTC

Return-Path: <noreply@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 C10AB1200F6 for <quic-issues@ietfa.amsl.com>; Fri, 1 Nov 2019 00:57:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8
X-Spam-Level:
X-Spam-Status: No, score=-8 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-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 SmpS_ZKgUna2 for <quic-issues@ietfa.amsl.com>; Fri, 1 Nov 2019 00:57:21 -0700 (PDT)
Received: from out-20.smtp.github.com (out-20.smtp.github.com [192.30.252.203]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C4BBC1200F5 for <quic-issues@ietf.org>; Fri, 1 Nov 2019 00:57:21 -0700 (PDT)
Received: from github-lowworker-d31a065.va3-iad.github.net (github-lowworker-d31a065.va3-iad.github.net [10.48.17.70]) by smtp.github.com (Postfix) with ESMTP id 7D6BA8C01E4 for <quic-issues@ietf.org>; Fri, 1 Nov 2019 00:57:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1572595040; bh=bAWnM+N/YPs1LKSy1FYKkxGu0qUPccBkhsXd1L+mc6A=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=wk+zesJ78T4tYH5RNw+xgv6WPnifjLEC1NS4jwVz9nwlYYcI0sCAGYOBchhH/m7Ma N4SWfsfVoBy6I9AIo7a1JCydkwFVX/iB9n5KCwW2P0w4mqRktbY4gItqarWwgheDOs 55RVqRvvmI5VZ7xqqBCpoynGcjMShkqRqmBG1icg=
Date: Fri, 01 Nov 2019 00:57:20 -0700
From: Kazuho Oku <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJK7AD4JQHZW3YXDL6753ZEL6BEVBNHHB3CL6HQ@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/3050/review/310324691@github.com>
In-Reply-To: <quicwg/base-drafts/pull/3050@github.com>
References: <quicwg/base-drafts/pull/3050@github.com>
Subject: Re: [quicwg/base-drafts] Rewrite key update section (#3050)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5dbbe5606e833_167e3fd5312cd968903576"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: kazuho
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/ksZ-WLy686j_Uaa57-Th7W2lbiQ>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 01 Nov 2019 07:57:24 -0000

kazuho commented on this pull request.

Aside from my previous review comment, I only have nitpicks.

Sorry for submitting comments at this moment.

> @@ -1168,89 +1168,226 @@ anticipation of receiving a ClientHello.
 
 # Key Update
 
-Once the handshake is confirmed, it is possible to update the keys. The
-KEY_PHASE bit in the short header is used to indicate whether key updates
-have occurred. The KEY_PHASE bit is initially set to 0 and then inverted
-with each key update.
+Once the handshake is confirmed (see {{handshake-confirmed}}), it is possible to
+update the keys used to protect packets.

We might want to change "possible to update the keys" to "possible to initiate a key update"? This is because an endpoint might receive a key update(s) before it confirms the handshake.

Or, we can punt such a change to the PR that will fix the handshake key discard problem.

>  
 For the sending of packets, construction and protection of packet payloads and
 packet numbers MUST be free from side-channels that would reveal the packet
 number or its encoded size.
 
+During a key update, the time taken to generate new keys could reveal through
+timing side-channels that a key update has occurred.  Alternatively, where an
+attacker injects packets this side-channel could reveal the value of the Key
+Phase on injected packets.  After receiving a key update, an endpoint SHOULD
+generate and save the next set of receive packet protection keys.  By generating

Maybe add ", following the advices in {{receive-key-generation}}"?

I suggest this is because without such a note, "After receiving a key update" could be confusing.

>  
 For the sending of packets, construction and protection of packet payloads and
 packet numbers MUST be free from side-channels that would reveal the packet
 number or its encoded size.
 
+During a key update, the time taken to generate new keys could reveal through
+timing side-channels that a key update has occurred.  Alternatively, where an
+attacker injects packets this side-channel could reveal the value of the Key
+Phase on injected packets.  After receiving a key update, an endpoint SHOULD
+generate and save the next set of receive packet protection keys.  By generating
+new keys before a key update is received, receipt of packets will not create
+timing signals that leak the value of the Key Phase.
+
+This depends on not doing this key generation during packet processing and it
+can require that endpoints maintain three sets of packet protection keys for
+receiving: for the previous key phase, for the current key phase, and for the
+next key phase.  Endpoints MAY instead choose to defer generation of the next

Maybe s/MAY/can/ as we have concrete advice using normative language in {{receive-key-generation}}.

-- 
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/3050#pullrequestreview-310324691