Re: [quicwg/base-drafts] use key update for confirming the handshake (#3141)

Jana Iyengar <notifications@github.com> Thu, 24 October 2019 04:02 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 6889A120D2C for <quic-issues@ietfa.amsl.com>; Wed, 23 Oct 2019 21:02:36 -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 jsEFYEI5uiFa for <quic-issues@ietfa.amsl.com>; Wed, 23 Oct 2019 21:02:34 -0700 (PDT)
Received: from out-21.smtp.github.com (out-21.smtp.github.com [192.30.252.204]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C410E1208B6 for <quic-issues@ietf.org>; Wed, 23 Oct 2019 21:02:33 -0700 (PDT)
Date: Wed, 23 Oct 2019 21:02:33 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1571889753; bh=9CoQdEce7oFU7nXyguMt2DkEpmqcsUNruK9yrDxEnZU=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=CGY2O6nbOzMNbM9SjrfmwshzTTniphosXDqj5jIsBAbcRhuy3HVpXNqBcV1J/vtJE ig5btBwOYk2HHrXGFPHuOQwBdEtSte6BZT2beDfL3WdsIv3loR9775fc4GLOd5+MID 1D2Io+eKRCYlKI3vQFrgZCGEH5RvkJgMR+4+9DDo=
From: Jana Iyengar <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJK3INSDRWPGLN6IFCF53XZKNTEVBNHHB47234A@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/3141/review/306304630@github.com>
In-Reply-To: <quicwg/base-drafts/pull/3141@github.com>
References: <quicwg/base-drafts/pull/3141@github.com>
Subject: Re: [quicwg/base-drafts] use key update for confirming the handshake (#3141)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5db1225915158_2fd63f82934cd95c123096"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: janaiyengar
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/KJf2h79KgienpORJ_c6G1ILRbiw>
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: Thu, 24 Oct 2019 04:02:42 -0000

janaiyengar commented on this pull request.

A few suggestions, but I like this approach.

> @@ -383,15 +383,26 @@ requirement that is based on the completion of the handshake depends on the
 perspective of the endpoint in question.
 
 
+### Handshake Acknowledged {#handshake-acknowledged}
+
+In this document, the TLS handshake is considered acknowledged at an endpoint
+when the handshake is complete and either of the following two conditions is
+met:
+
+- all the data sent using Handshake packets have been acknowledged
+- the peer initiates a key update ({{key-update}})

```suggestion
- a key update is received from the peer ({{key-update}})
```

>  ### Handshake Confirmed {#handshake-confirmed}
 
 In this document, the TLS handshake is considered confirmed at an endpoint when
-the following two conditions are met: the handshake is complete, and the
-endpoint has received an acknowledgment for a packet sent with 1-RTT keys.
-This second condition can be implemented by recording the lowest packet number
-sent with 1-RTT keys, and the highest value of the Largest Acknowledged field
-in any received 1-RTT ACK frame: once the latter is higher than or equal to the
-former, the handshake is confirmed.
+it receives a packet initiating a key update.  The transition from handshake
+acknowledged to handshake confirmed happens immediately when the endpoint
+receives a key update.

I think it may be worth noting that the endpoint reaches this state before it sends a key update response.

> @@ -383,15 +383,26 @@ requirement that is based on the completion of the handshake depends on the
 perspective of the endpoint in question.
 
 
+### Handshake Acknowledged {#handshake-acknowledged}
+
+In this document, the TLS handshake is considered acknowledged at an endpoint
+when the handshake is complete and either of the following two conditions is
+met:
+
+- all the data sent using Handshake packets have been acknowledged
+- the peer initiates a key update ({{key-update}})
+
+When the handshake is acknowledged, the next 1-RTT packet that the endpoint
+sends MUST respond to the key update had it received a key update from peer as
+defined in {{key-update}}, else initiate a key update.
+

Suggestion: "When the handshake is acknowledged, an endpoint MUST immediately do one of the following: initiate a key update if it has not received one from the peer, or respond to the key update that the peer has initiated."

> @@ -1214,13 +1225,15 @@ TLS KeyUpdate message.  Endpoints MUST treat the receipt of a TLS KeyUpdate
 message as a connection error of type 0x10a, equivalent to a fatal TLS alert of
 unexpected_message (see {{tls-errors}}).
 
-An endpoint MUST NOT initiate the first key update until the handshake is
-confirmed ({{handshake-confirmed}}). An endpoint MUST NOT initiate a subsequent
-key update until it has received an acknowledgment for a packet sent at the
-current KEY_PHASE.  This can be implemented by tracking the lowest packet
-number sent with each KEY_PHASE, and the highest acknowledged packet number
-in the 1-RTT space: once the latter is higher than or equal to the former,
-another key update can be initiated.
+An endpoint MUST NOT initiate a key update until the handshake is acknowledged
+({{handshake-acknowledged}}).  Once the handshake is acknowledged, an endpoint

```suggestion
({{handshake-acknowledged}}).

Once the handshake is acknowledged, an endpoint
```

-- 
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/3141#pullrequestreview-306304630