Re: Key updates

Kazuho Oku <> Tue, 07 August 2018 07:39 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id AFF4A130E79 for <>; Tue, 7 Aug 2018 00:39:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Status: No, score=-2 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id YfNqwjg9XjXo for <>; Tue, 7 Aug 2018 00:39:41 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4864:20::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id E2CB2130E1D for <>; Tue, 7 Aug 2018 00:39:40 -0700 (PDT)
Received: by with SMTP id u7-v6so12640145lji.3 for <>; Tue, 07 Aug 2018 00:39:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GLeeLFwu6svHVeFKJNe2F6Xqrj2sTWeByK1mCQvQTgU=; b=VeIRzRRedBepxvd/0SDFRb7+uokMFHFcbLhcWvdnVDs8/6zRWv4HJ1kp3L8ebl9g40 p8ymJIIG7LDbJWJ25bdqYODiVBLBIcKd09HhoPNTRIeNailCA4Yhiu5G/NuGcBB3WtSv RwAoZUrsnbuvco4RZMzMLyWus8jtdautfTjUTifOnhM5fi9HR6fkfvIkuS0E6ZxnQn6n auUmaPJpkMpoHMbzxsQEKjzI3tXPTmkQFXb2ip6adNR/TUMMNip+E5aqDy+LPe7sT8Yt 5ZVph4u90EF+MweCvvpDG8rnel/gT7L7IO0IAuwJ95RiVaYrsVDXntUosxHHPoQj2Rbm ElsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GLeeLFwu6svHVeFKJNe2F6Xqrj2sTWeByK1mCQvQTgU=; b=hnzY7WvsXCP5pMihAPkUvdquFlNd+EV14kcG80F0XYumJKsxvE4wwm3Qyyi5yYXGW4 QyOTiZYhyvorODt+jDE8MJxsqaDu2CU6AWMSNCLKhB3gP0Xwfwltsw4e8mQ4YHOLUQyu MoIyigz606jk0tfBCP9ik22kZ1SdfDJyuAl/WeiAOLPSqWRq1HBtD1I+clbd6PPOBx6a 3KyPjyEeWaoAMMthO58QKEF2rlk77w8G1RbZmrVX8U731VFyymr5PSphFMqjkaIRoIsS vbN4SFusUaqo5W5bbPJPg+VFhyZjNYBBEbM/E5eV7HUriTLn0hXfKOimGK4rvinMz+Rf xQNA==
X-Gm-Message-State: AOUpUlGFXo64r0a/ZHKR3RJe0QG+DFw64fd7Jxzvk/BypBTDj9r9pUgF xwDtxcNkkTlprIdgCo/n5PcUP+7Up71h00F3IkvsjfSf
X-Google-Smtp-Source: AAOMgpc1DmC4K2edUS9XHwEPxiG0vdlRUKfKEgEZNEuoQIFKdOR+GOnxPL5iNUXeehtSV1D+zfJ8GE9tsZjliAhHHLs=
X-Received: by 2002:a2e:9e55:: with SMTP id g21-v6mr15700502ljk.116.1533627579079; Tue, 07 Aug 2018 00:39:39 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a2e:8996:0:0:0:0:0 with HTTP; Tue, 7 Aug 2018 00:39:38 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <> <> <> <>
From: Kazuho Oku <>
Date: Tue, 7 Aug 2018 16:39:38 +0900
Message-ID: <>
Subject: Re: Key updates
To: Martin Thomson <>
Cc: QUIC WG <>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <>
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 07 Aug 2018 07:39:43 -0000

2018-08-07 16:10 GMT+09:00 Martin Thomson <>:
> On Tue, Aug 7, 2018 at 5:01 PM Kazuho Oku <> wrote:
>> My point is that the issue within the current design is that we
>> require the endpoint to update if the peer initiates an update.
>> I am suggesting to change that to "an endpoint updates its epoch if
>> the peer starts using an epoch that is higher than it uses."
>> Taking the example,
>> A sends N+1
>> B sends N followed by N+1 around the same time
>> 0.5 RTT later both receive a packet at N+1, and they will stay using
>> N+1, because each of them initiated an update and because the epoch
>> that one uses is not smaller than the value used by the peer
> I see, thanks for clarifying.  I don't think that this is a great idea
> because it means that reordered packets will be dropped.  Reordering
> is common enough for at least some implementations to want to retain N
> for some time after this changeover.

Reordered packets will not be dropped, assuming that an endpoint will
not issue more than one key update within a short amount of time (a
guarantee that is provided by the described design), that each
endpoint will retain at most 2 keys for decryption. Nor there will be
trial decryption.

Generally speaking, I think that the designs can be evaluated in two aspects.

1. if retaining at most 2 keys is fine

Retaining at most 2 keys will be fine if there is a guarantee that
multiple updates within a small amount of time does not happen. That
is guaranteed by the design I described above. It is not guaranteed by
the current design, nor by the (D)TLS-based design.

2. if installation of a new key (or a retirement of an old key) is an
explicit signal

I agree that it is nice to have an explicit signal that instructs the
peer to switch the decryption keys, from epochs=(N-1,N) to (N,N+1).
OTOH, I might prefer requiring an endpoint to switch from (N-1,N) to
(N,N+1) at the earliest moment. This is because then, you could start
using the new key after quiescence.

Considering the two, the (D)TLS-based approach does not have the first
property, even setting the discussion about the complexity aside.

I am fine with having an explicit signal for key installation, though
I think that timer is fine based on my assumption (stated above) that
we would prefer having older generation of keys being retired at the
earliest moment.

Kazuho Oku