Re: [quicwg/base-drafts] Rework Key Update (#2237)
Mike Bishop <notifications@github.com> Wed, 13 February 2019 18: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 5EDE3131065 for <quic-issues@ietfa.amsl.com>; Wed, 13 Feb 2019 10:02:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.001
X-Spam-Level:
X-Spam-Status: No, score=-8.001 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_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 Tymf9kZosru1 for <quic-issues@ietfa.amsl.com>; Wed, 13 Feb 2019 10:02:54 -0800 (PST)
Received: from out-5.smtp.github.com (out-5.smtp.github.com [192.30.252.196]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 57DDD13105D for <quic-issues@ietf.org>; Wed, 13 Feb 2019 10:02:54 -0800 (PST)
Date: Wed, 13 Feb 2019 10:02:53 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1550080973; bh=g6Dvs9GYUaFDnkOSfFDHmsAsOfNpyCOJfNzfVgEIinA=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=taWka8LbQf6vP23I4U2bBUWZshipxCs6o1/K2HGTo3Pf72fEbBzmFCWsfr26lcsde OMSAN1Hekje+RbPYNHIGZuq/qzd9VDNmVbhWp6B/MrUIcDUB2g/G8jOy0aChNYHwyF 1yXkr17iURiJMSQp88X0wrlWu763ejT1Rt0kRYAw=
From: Mike Bishop <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab529831c62cf348b4bcbe96a9ebed34b52855ec4c92cf00000001187c1dcd92a169ce1770e975@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/2237/review/203355408@github.com>
In-Reply-To: <quicwg/base-drafts/pull/2237@github.com>
References: <quicwg/base-drafts/pull/2237@github.com>
Subject: Re: [quicwg/base-drafts] Rework Key Update (#2237)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5c645bcd218d0_61753fa9a54d45c084372"; 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
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/njDQsl-lcM2NDnEWp9ro_k_MBb4>
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: Wed, 13 Feb 2019 18:03:02 -0000
MikeBishop commented on this pull request.
>From a less-TLS-steeped reader; take the comments for what they're worth. :-)
> +from the existing write secret as performed in Section 7.2 of {{!TLS13}}. This
+uses the KDF function provided by TLS with a label of "quic ku". The
+corresponding key and IV are created from that secret as defined in
+{{protection-keys}}. The header protection key is not updated.
+
+The endpoint toggles the value of the Key Phase bit, and uses the updated key
+and IV to protect all subsequent packets.
+
+An endpoint MUST NOT initiate a key update prior to having received a
+KEYS_ACTIVE frame in a packet from the current key phase. A subsequent key
+update can only be performed after the endpoint has successfully processed a
+KEYS_ACTIVE frame from a packet with a matching key phase. This ensures that
+keys are available to both peers before another can be initiated.
+
+Once an endpoint has successfully processed a packet with the same key phase, it
+can send a KEYS_ACTIVE frame. Endpoints MAY defer sending a KEYS_ACTIVE frame
"can" feels very weak. Even if they MAY delay sending, aren't they required to eventually send it?
> +{{key-update-initiate}}. An endpoint that responds to a key update MUST send a
+KEYS_ACTIVE frame to indicate that it is both sending and receiving with updated
+keys, though it MAY defer sending the frame (see {{key-update-old-keys}}).
+
+An endpoint does not always need to send packets when it detects that its peer
+has updated keys. The next packet that it sends use the new keys and include
+the KEYS_ACTIVE frame. If an endpoint detects a second update before it has
+sent any packets with updated keys or a KEYS_ACTIVE frame, it indicates that its
+peer has updated keys twice without awaiting a reciprocal update. An endpoint
+MUST treat consecutive key updates as a connection error of type
+KEY_UPDATE_ERROR.
+
+Endpoints responding to an apparent key update MUST NOT generate a timing
+side-channel signal that might indicate that the Key Phase bit was invalid (see
+{{header-protect-analysis}}). Endpoints can use dummy packet protection keys in
+place of discarded keys when key updates are not permitted.
If you're going to mention this last, it's probably worth expanding on this a bit. What behavior might generate such a side-channel? How are dummy keys used to emulate normal behavior in those cases?
> +place of discarded keys when key updates are not permitted.
+
+
+## Using Old Keys {#key-update-old-keys}
+
+During a key update, packets protected with older keys might arrive if they were
+delayed by the network. If those old keys are available, then they can be used
+to remove packet protection.
+
+After a key update, an endpoint MAY delay sending the KEYS_ACTIVE frame by up to
+three times the Probe Timeout (PTO, see {{QUIC-RECOVERY}}) to minimize the
+number of active keys it maintains. During this time, an endpoint can use old
+keys to process delayed packets rather than enabling a new key update. This
+only applies to key updates that use the Key Phase bit; endpoints MUST NOT defer
+sending of KEYS_ACTIVE during and immediately after the handshake.
+
Maybe "after the handshake is complete," assuming that's now a defined term?
> +## Using Old Keys {#key-update-old-keys}
+
+During a key update, packets protected with older keys might arrive if they were
+delayed by the network. If those old keys are available, then they can be used
+to remove packet protection.
+
+After a key update, an endpoint MAY delay sending the KEYS_ACTIVE frame by up to
+three times the Probe Timeout (PTO, see {{QUIC-RECOVERY}}) to minimize the
+number of active keys it maintains. During this time, an endpoint can use old
+keys to process delayed packets rather than enabling a new key update. This
+only applies to key updates that use the Key Phase bit; endpoints MUST NOT defer
+sending of KEYS_ACTIVE during and immediately after the handshake.
+
+Even if old keys are available, those keys MUST NOT be used to protect packets
+with packets that have higher packet numbers than packets that were protected
+with newer keys. An endpoint that successfully removes protection with old keys
Would it make sense to mandate dropping write keys immediately, but permit retaining read keys?
--
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/2237#pullrequestreview-203355408
- [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) ekr
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Marten Seemann
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Marten Seemann
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Marten Seemann
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Marten Seemann
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Marten Seemann
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Marten Seemann
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Marten Seemann
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Marten Seemann
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) hardie
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Nick Banks
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Jana Iyengar
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Kazuho Oku
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Christian Huitema
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Nick Banks
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Nick Banks
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Nick Banks
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Mike Bishop
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Mike Bishop
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Christian Huitema
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Jana Iyengar
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Mike Bishop
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) martinduke
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) martinduke
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson
- Re: [quicwg/base-drafts] Rework Key Update (#2237) Martin Thomson