Return-Path: <dschinazi.ietf@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
 by ietfa.amsl.com (Postfix) with ESMTP id 3F8BC128CE4
 for <quic@ietfa.amsl.com>; Thu, 14 Feb 2019 09:57:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level: 
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001]
 autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key)
 header.d=gmail.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 JBqSb4_h8tje for <quic@ietfa.amsl.com>;
 Thu, 14 Feb 2019 09:57:15 -0800 (PST)
Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com
 [IPv6:2607:f8b0:4864:20::435])
 (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 2CB5312867A
 for <quic@ietf.org>; Thu, 14 Feb 2019 09:57:15 -0800 (PST)
Received: by mail-pf1-x435.google.com with SMTP id n22so3469307pfa.3
 for <quic@ietf.org>; Thu, 14 Feb 2019 09:57:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; 
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=WnwusM2M4J0YHNmFijlsdXfmdWexIMXVo1Zl7xvSsqA=;
 b=cACxjy0rqeKdxtERHTyux2/54ZyUk7+HpwXgU0ME8rvwWJSjAkBZXXc4EIKFXoJtLt
 h1RTYRZCkkRrJHXiYTbAl19nixyg9ombcoRFRVDTFOmR5Xy42c/yzOfmhsoKjZYGH6RI
 ubY7UcZDLa/uwJw0YwtpE+sDJiNiVrFXypxltYpmREGwOay6e+lTqJ9KaqENt83joiXU
 xIyEunh9WKCkDzEjE88SsxOBa31t5EDsGDnS4fNTHbX0cUDYGY5krs6J34i6K1kvWbfW
 tl6v02hoMXuluag7UyIg+Q//GT3Yq6FaNMgBC3nuEfj1fWcV7To6WOHUwrrKgHh0d3NO
 NRVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=WnwusM2M4J0YHNmFijlsdXfmdWexIMXVo1Zl7xvSsqA=;
 b=ZG84gusQG09KOGXrvUMqn3PwdayeX5tIVrwQHEHrFGNHKe/rXG7gvhIId+1qhieBoU
 A0AJCkPCKjkNgrmoFKT7Z188o1pCsjFQkmhSNmdVqx9H93oLS1l7pA7Esj33cPJtYcq8
 LmqnK7dFJUYBrYTLl3cOt5CbH47SlZQ2RhLn/sqTBUQRLOsLg6nZY5lPAbQSrvOlvcvY
 bYa8e8e3rW2p0Xc+oe0F95Mkd15gQRdLIsyH67vxeK4pZaqVNRfChuUeCj05rwOrx5j/
 04H1WTKXi/dJQJWvrTWcQIKR6XeCIX0cM6g8H+OqzPG1dEUfIJReJHh+iVzoSo/Vpudq
 AM0w==
X-Gm-Message-State: AHQUAuZJTVNxNq6ubaoPomGdd6wsTJbSCKik9bJtOEkgNqBxTtMxDSs4
 aY5FbCgssUOhPkp7zWIpuG9rr5oXhC2C0TtwZSI=
X-Google-Smtp-Source: AHgI3IYT6lT7TFFmtJdxC4xlWS5vf7tbch0X1qxKErhOiN77esHji4aTFieQrkgGZgiY1BoU3gk5cGG3xHLDaIC+9PI=
X-Received: by 2002:a63:1753:: with SMTP id 19mr1045892pgx.439.1550167034426; 
 Thu, 14 Feb 2019 09:57:14 -0800 (PST)
MIME-Version: 1.0
References: <1550022355.557617.1656828112.4DD1CEE6@webmail.messagingengine.com>
 <CANatvzy_juza_meGR_-KuBV9FA=F754mv54aawxMb8hYWxb1gA@mail.gmail.com>
 <CAN1APdcVYKWuapZ3XHxXa_nVACwkRD-xeF3ub-5ROttE7QVrmQ@mail.gmail.com>
 <CAOYVs2ooxAuwu_zr2XZ-y9UqUP5kTbjoFrckAOi40bF9vODGOg@mail.gmail.com>
 <CAKcm_gNk=jKrnXM4Ht4yF0RX25wtVifjxz0c1gay0uie7PMw6A@mail.gmail.com>
 <CANatvzxBYzEaDZ1Ftt=o1zT5zVcVTd1EwtGiJOC-mkrNUWzVAQ@mail.gmail.com>
 <CAN1APdfzepc9DE98UsWw=hB4dM38qKLxdAjpsYuddDBatcscDA@mail.gmail.com>
 <739AFC55-DD02-47AA-A29E-B9C34ED7D6F9@gmail.com>
 <CAN1APddWLdmRo+ZZDnmvrBEFQk4TTcS3UK_9AU4KqAeSkiBvJQ@mail.gmail.com>
 <375A63C5-7120-4688-8873-EEA90693332E@huitema.net>
 <CANatvzxoOFzpkcH_4VpQscpZq8ak0QL0D6REvyJVjE+ga97SVQ@mail.gmail.com>
 <1550111606.3717440.1657643080.033E200B@webmail.messagingengine.com>
 <ae018a6d-4c9a-acc7-4213-21d1670f9dad@huitema.net>
 <1550117510.928793.1657684264.41D049FA@webmail.messagingengine.com>
 <CACpbDcfbEcg70RwpFrCQ2X6WA0Dd7ygd=Q0w7iwKc-ZgZQbZ0w@mail.gmail.com>
 <1550120733.954579.1657700168.72A8F92A@webmail.messagingengine.com>
 <CAOYVs2qQJgGNhXJNjhE8L=wxBgq+3qs144WYXs0JoWNBrK_a6A@mail.gmail.com>
 <DB6PR10MB1766128EAD7248F02C1EAFA5AC670@DB6PR10MB1766.EURPRD10.PROD.OUTLOOK.COM>
 <DB6PR10MB176684E61A66BF01C66008F6AC670@DB6PR10MB1766.EURPRD10.PROD.OUTLOOK.COM>
In-Reply-To: <DB6PR10MB176684E61A66BF01C66008F6AC670@DB6PR10MB1766.EURPRD10.PROD.OUTLOOK.COM>
From: David Schinazi <dschinazi.ietf@gmail.com>
Date: Thu, 14 Feb 2019 09:57:02 -0800
Message-ID: <CAPDSy+5MSST-Nkoi+oaRzSLDJCYqhUmKw1nP_p4fOyq7cfK17w@mail.gmail.com>
Subject: Re: KEYS_READY
To: =?UTF-8?Q?Mikkel_Fahn=C3=B8e_J=C3=B8rgensen?= <mikkelfj@gmail.com>
Cc: Marten Seemann <martenseemann@gmail.com>,
 Martin Thomson <mt@lowentropy.net>, 
 Jana Iyengar <jri.ietf@gmail.com>, QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000006dfc000581de63b6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/eCe9TLWOfK7zEa84Rvh-R6LbrlQ>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>,
 <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>,
 <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Feb 2019 17:57:17 -0000

--0000000000006dfc000581de63b6
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I don't think the proposed PR matches what we discussed in Tokyo, and it
seems less robust than what we discussed.

In Tokyo we had discussed a RETIRE_KEYS frame with the following properties=
:
1) You send RETIRE_KEYS when both (a) you have sent everything you wanted
with those keys AND (b) that has been ACKed
    In particular, the client sends a 1RTT packet with
RETIRE_KEYS(Handshake) when the server ACKs the packet containing the
crypto frame with the ClientFinished
2) You can discard keys (and congestion control state if applicable) when
you've both sent and received RETIRE_KEYS

The proposal in PR#2237 does not have these properties, because it focuses
on the new keys being ready instead of focusing on when an endpoint is done
sending with previous keys.
In order to avoid the client infinitely retransmitting ClientFinished
issue, PR#2237 has the server delay its 1-RTT KEYS_READY until it believes
the handshake is complete.
It would be more robust to have the endpoint who is sending decide when it
is done sending, instead of having the peer assume it knows.

David



On Wed, Feb 13, 2019 at 9:44 PM Mikkel Fahn=C3=B8e J=C3=B8rgensen <mikkelfj=
@gmail.com>
wrote:

> I guess because ACK?
>
>
> ------------------------------
> *Fra:* Mikkel Fahn=C3=B8e J=C3=B8rgensen <mikkelfj@gmail.com>
> *Sendt:* torsdag, februar 14, 2019 6:42 AM
> *Til:* Marten Seemann; Martin Thomson
> *Cc:* Jana Iyengar; QUIC WG
> *Emne:* Re: KEYS_READY
>
> Why do keys need to be in sync?
> Disregarding handshake, if each peer has a separate key index counter, at
> change in phase bit ought to be sufficient.
>
> The endpoints can have vastly different consumption rates.
>
> With sync keys the peer can prevent you from updating while uou can updat=
e
> after ca 3 PTO in the async design. Neither design can force the peer to
> update.
>
>
> ------------------------------
> *Fra:* QUIC <quic-bounces@ietf.org> p=C3=A5 vegne af Marten Seemann <
> martenseemann@gmail.com>
> *Sendt:* torsdag, februar 14, 2019 6:27 AM
> *Til:* Martin Thomson
> *Cc:* Jana Iyengar; QUIC WG
> *Emne:* Re: KEYS_READY
>
> > I was OK with that PR, and while we might go back and forth on the
> merits of using a bit vs. a frame, the consensus in Tokyo was that the
> frame was superior.  Also, this solves more problems.
>
> In my understanding, the consensus in Tokyo was based on the assumption
> that the bit and the frame were basically signaling the same thing - at
> least I wasn=E2=80=99t aware of the additional retransmission logic neces=
sary, and
> I would=E2=80=99ve opposed this solution if I had known.
>
> > The PR changes how Initial keys are retired. Instead of relying on the =
delivery
> of Handshake packets, it relies on the delivery of KEYS_ACTIVE frames.
> However, we do not require KEY_ACTIVE frames to be included in every
> Handshake packet being sent.
>
> This is again the problem of a discrete vs. a continuous signal. Using
> another bit in the first byte solves this problem.
> After the handshake completes, we want the peer to advance from handshake
> mode to normal mode in the loss recovery logic, since in handshake mode w=
e
> don=E2=80=99t have PTOs. The only way to achieve this using the KEYS_ACTI=
VE frame
> is to include it in multiple (all packets for one RTT?) after the handsha=
ke
> completes.
>
> That being said, adding a generation number as Kazuho suggested seems to
> be the second best solution, since it at least removes the necessity to
> implement separate retransmission rules.
>
> On Thu, Feb 14, 2019 at 13:05 Martin Thomson <mt@lowentropy.net> wrote:
>
>> On Thu, Feb 14, 2019, at 15:24, Jana Iyengar wrote:
>> > (I've left this comment on the PR as well, but seeing that this
>> discussion
>> > is happening here as well, echoing it here)
>> > If the peer hasn't acked the previous KEYS_ACTIVE, it may not have see=
n
>> it
>> > yet. It is possible that it simultaneously did a key update and sent a
>> > KEYS_ACTIVE however. Under this condition, the endpoint wouldn't be
>> able to
>> > update its keys again, since the peer may close the connection, right?
>>
>> This is not a problem, but it requires thinking the process through.
>>
>> An endpoint can only initiate a key update if it has received
>> KEYS_ACTIVE.  It can only send KEYS_ACTIVE if it has received a key upda=
te
>> (and is either responding, or initiated that).
>>
>> Take the example where an ACK is lost, so a key update occurs when one
>> peer is retransmitting KEYS_ACTIVE:
>>
>> C: Update to Key Phase 1.
>> S: Update to Key Phase 1.  Send KEYS_ACTIVE.
>> C: Send packet containing ACK for the server packet containing
>> KEYS_ACTIVE, plus KEYS_ACTIVE.  That packet is lost.
>> C: Update to Key Phase 0.
>> S: Update to Key Phase 0. Send KEYS_ACTIVE.
>>
>> The server might believe that its KEYS_ACTIVE hasn't been acknowledged,
>> but it has to be prepared for a key update as soon as it sends the frame=
.
>>
>> If there is a simultanous update it looks like this:
>>
>> C: Update to Key Phase 1.
>> S: Update to Key Phase 1.  (Concurrent with previous.)
>> C: Receive packet with KP1.  Send KEYS_ACTIVE.  Lost.
>> S: Receive packet with KP1.  Send KEYS_ACTIVE.
>>
>> At this point, both peers are fine, they are on the same keys, and a key
>> update can be triggered by the client.  The server can't update until th=
e
>> client repairs the lost KEYS_ACTIVE frame.  This continues:
>>
>> C: Update to Key Phase 0.
>> S: Receive KP0.  Update to Key Phase 0.  Send KEYS_ACTIVE.
>>
>> As you can see, the client stops sending when it updates again, but
>> that's OK.
>>
>> It's also safe if the KEYS_ACTIVE frames get through, but acknowledgment=
s
>> for them don't.
>>
>>

--0000000000006dfc000581de63b6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I don&#39;t think the proposed PR matches what we discusse=
d in Tokyo, and it seems less robust than what we discussed.<div><br><div>I=
n Tokyo we had discussed a RETIRE_KEYS frame with the following properties:=
</div><div>1) You send RETIRE_KEYS when both (a) you have sent everything y=
ou wanted with those keys AND (b) that has been ACKed</div><div>=C2=A0 =C2=
=A0 In particular, the client sends a 1RTT packet with RETIRE_KEYS(Handshak=
e) when the server ACKs the packet containing the crypto frame with the Cli=
entFinished</div><div>2) You can discard keys (and congestion control state=
 if applicable) when you&#39;ve both sent and received RETIRE_KEYS</div><di=
v><br></div><div>The proposal in PR#2237 does not have these properties, be=
cause it focuses on the new keys being ready instead of focusing on when an=
 endpoint is done sending with previous keys.</div><div>In order to avoid t=
he client infinitely retransmitting ClientFinished issue, PR#2237 has the s=
erver delay its 1-RTT KEYS_READY until it believes the handshake is complet=
e.</div><div>It would be more robust to have the endpoint who is sending de=
cide when it is done sending, instead of having the peer assume it knows.</=
div><div><br></div><div>David</div><div><br></div><div><br></div></div></di=
v><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, Feb 13, 2019 at 9=
:44 PM Mikkel Fahn=C3=B8e J=C3=B8rgensen &lt;<a href=3D"mailto:mikkelfj@gma=
il.com">mikkelfj@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex">



<div>
<div>
<div>
<div>
<div style=3D"direction:ltr">I guess because ACK?</div>
</div>
<div><br>
</div>
<div class=3D"gmail-m_793379263112057470ms-outlook-ios-signature"></div>
</div>
<div>=C2=A0</div>
<hr style=3D"display:inline-block;width:98%">
<div id=3D"gmail-m_793379263112057470divRplyFwdMsg" dir=3D"dir=3D&quot;ltr&=
quot;"><font face=3D"Calibri, sans-serif" style=3D"font-size:11pt" color=3D=
"#000000"><b>Fra:</b> Mikkel Fahn=C3=B8e J=C3=B8rgensen &lt;<a href=3D"mail=
to:mikkelfj@gmail.com" target=3D"_blank">mikkelfj@gmail.com</a>&gt;<br>
<b>Sendt:</b> torsdag, februar 14, 2019 6:42 AM<br>
<b>Til:</b> Marten Seemann; Martin Thomson<br>
<b>Cc:</b> Jana Iyengar; QUIC WG<br>
<b>Emne:</b> Re: KEYS_READY
<div>=C2=A0</div>
</font></div>

<div>
<div>
<div>
<div style=3D"direction:ltr">Why do keys need to be in sync?</div>
<div style=3D"direction:ltr">Disregarding handshake, if each peer has a sep=
arate key index counter, at change in phase bit ought to be sufficient.</di=
v>
<div><br>
</div>
<div style=3D"direction:ltr">The endpoints can have vastly different consum=
ption rates.</div>
<div><br>
</div>
<div style=3D"direction:ltr">With sync keys the peer can prevent you from u=
pdating while uou can update after ca 3 PTO in the async design. Neither de=
sign can force the peer to update.</div>
</div>
<div><br>
</div>
<div class=3D"gmail-m_793379263112057470ms-outlook-ios-signature"></div>
</div>
<div>=C2=A0</div>
<hr style=3D"display:inline-block;width:98%">
<div id=3D"gmail-m_793379263112057470divRplyFwdMsg" dir=3D"dir=3D&quot;ltr&=
quot;"><font face=3D"Calibri, sans-serif" color=3D"#000000" style=3D"font-s=
ize:11pt"><b>Fra:</b> QUIC &lt;<a href=3D"mailto:quic-bounces@ietf.org" tar=
get=3D"_blank">quic-bounces@ietf.org</a>&gt; p=C3=A5 vegne af Marten Seeman=
n &lt;<a href=3D"mailto:martenseemann@gmail.com" target=3D"_blank">martense=
emann@gmail.com</a>&gt;<br>
<b>Sendt:</b> torsdag, februar 14, 2019 6:27 AM<br>
<b>Til:</b> Martin Thomson<br>
<b>Cc:</b> Jana Iyengar; QUIC WG<br>
<b>Emne:</b> Re: KEYS_READY
<div>=C2=A0</div>
</font></div>

<div>
<div>
<div>
<div>
<div dir=3D"auto">&gt; I=C2=A0<span style=3D"color:rgb(49,49,49);word-spaci=
ng:1px;background-color:rgb(255,255,255)">was OK with that PR, and while we=
 might go back and forth on the merits of using a bit vs. a frame, the cons=
ensus in Tokyo was that the frame was superior.=C2=A0
 Also, this solves more problems.</span></div>
</div>
<div dir=3D"auto"><span style=3D"color:rgb(49,49,49);word-spacing:1px;backg=
round-color:rgb(255,255,255)"><br>
</span></div>
</div>
</div>
</div>
<div>
<div>
<div>
<div dir=3D"auto"><span style=3D"color:rgb(49,49,49);word-spacing:1px;backg=
round-color:rgb(255,255,255)">In my understanding, the consensus in Tokyo w=
as based on the assumption that the bit and the frame were basically signal=
ing the same thing - at least I wasn=E2=80=99t
 aware of the additional retransmission logic necessary, and I would=E2=80=
=99ve opposed this solution if I had known.</span></div>
</div>
</div>
</div>
<div>
<div>
<div dir=3D"auto"><span style=3D"color:rgb(49,49,49);word-spacing:1px;backg=
round-color:rgb(255,255,255)"><br>
</span></div>
<div dir=3D"auto"><span style=3D"color:rgb(49,49,49);word-spacing:1px;backg=
round-color:rgb(255,255,255)">&gt;=C2=A0</span><span style=3D"color:rgb(49,=
49,49);word-spacing:1px;background-color:rgb(255,255,255)">The PR changes h=
ow Initial keys are retired. Instead of relying
 on the=C2=A0</span><span style=3D"color:rgb(49,49,49);word-spacing:1px;bac=
kground-color:rgb(255,255,255)">delivery of Handshake packets, it relies on=
 the delivery of=C2=A0</span><span style=3D"color:rgb(49,49,49);word-spacin=
g:1px;background-color:rgb(255,255,255)">KEYS_ACTIVE
 frames. However, we do not require KEY_ACTIVE frames to be=C2=A0</span><sp=
an style=3D"color:rgb(49,49,49);word-spacing:1px;background-color:rgb(255,2=
55,255)">included in every Handshake packet being sent.</span></div>
<div dir=3D"auto"><span style=3D"color:rgb(49,49,49);word-spacing:1px;backg=
round-color:rgb(255,255,255)"><br>
</span></div>
</div>
</div>
<div>
<div>
<div dir=3D"auto"><span style=3D"color:rgb(49,49,49);word-spacing:1px;backg=
round-color:rgb(255,255,255)">This is again the problem of a discrete vs. a=
 continuous signal. Using another bit in the first byte solves this problem=
.</span></div>
<div dir=3D"auto"><font color=3D"#313131"><span style=3D"word-spacing:1px;b=
ackground-color:rgb(255,255,255)">After the handshake completes, we want th=
e peer to=C2=A0</span></font>advance from handshake mode to normal mode in =
the loss recovery logic, since in handshake
 mode we don=E2=80=99t have PTOs. The only way to achieve this using the KE=
YS_ACTIVE frame is to include it in multiple (all packets for one RTT?) aft=
er the handshake completes.=C2=A0</div>
</div>
<div>
<div>
<div dir=3D"auto"><br>
</div>
<div dir=3D"auto">That being said, adding a generation number as Kazuho sug=
gested seems to be the second best solution, since it at least removes the =
necessity to implement separate retransmission rules.</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div><br>
<div class=3D"gmail_quote">
<div dir=3D"ltr" class=3D"gmail_attr">On Thu, Feb 14, 2019 at 13:05 Martin =
Thomson &lt;<a href=3D"mailto:mt@lowentropy.net" target=3D"_blank">mt@lowen=
tropy.net</a>&gt; wrote:<br>
</div>
<blockquote class=3D"gmail_quote">On Thu, Feb 14, 2019, at 15:24, Jana Iyen=
gar wrote:<br>
&gt; (I&#39;ve left this comment on the PR as well, but seeing that this di=
scussion<br>
&gt; is happening here as well, echoing it here)<br>
&gt; If the peer hasn&#39;t acked the previous KEYS_ACTIVE, it may not have=
 seen it<br>
&gt; yet. It is possible that it simultaneously did a key update and sent a=
<br>
&gt; KEYS_ACTIVE however. Under this condition, the endpoint wouldn&#39;t b=
e able to<br>
&gt; update its keys again, since the peer may close the connection, right?=
<br>
<br>
This is not a problem, but it requires thinking the process through.<br>
<br>
An endpoint can only initiate a key update if it has received KEYS_ACTIVE.=
=C2=A0 It can only send KEYS_ACTIVE if it has received a key update (and is=
 either responding, or initiated that).<br>
<br>
Take the example where an ACK is lost, so a key update occurs when one peer=
 is retransmitting KEYS_ACTIVE:<br>
<br>
C: Update to Key Phase 1.<br>
S: Update to Key Phase 1.=C2=A0 Send KEYS_ACTIVE.<br>
C: Send packet containing ACK for the server packet containing KEYS_ACTIVE,=
 plus KEYS_ACTIVE.=C2=A0 That packet is lost.<br>
C: Update to Key Phase 0.<br>
S: Update to Key Phase 0. Send KEYS_ACTIVE.<br>
<br>
The server might believe that its KEYS_ACTIVE hasn&#39;t been acknowledged,=
 but it has to be prepared for a key update as soon as it sends the frame.<=
br>
<br>
If there is a simultanous update it looks like this:<br>
<br>
C: Update to Key Phase 1.<br>
S: Update to Key Phase 1.=C2=A0 (Concurrent with previous.)<br>
C: Receive packet with KP1.=C2=A0 Send KEYS_ACTIVE.=C2=A0 Lost.<br>
S: Receive packet with KP1.=C2=A0 Send KEYS_ACTIVE.<br>
<br>
At this point, both peers are fine, they are on the same keys, and a key up=
date can be triggered by the client.=C2=A0 The server can&#39;t update unti=
l the client repairs the lost KEYS_ACTIVE frame.=C2=A0 This continues:<br>
<br>
C: Update to Key Phase 0.<br>
S: Receive KP0.=C2=A0 Update to Key Phase 0.=C2=A0 Send KEYS_ACTIVE.<br>
<br>
As you can see, the client stops sending when it updates again, but that&#3=
9;s OK.<br>
<br>
It&#39;s also safe if the KEYS_ACTIVE frames get through, but acknowledgmen=
ts for them don&#39;t.<br>
<br>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div>

--0000000000006dfc000581de63b6--

