Re: Key updates

Kazuho Oku <kazuhooku@gmail.com> Tue, 07 August 2018 07:39 UTC

Return-Path: <kazuhooku@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 AFF4A130E79 for <quic@ietfa.amsl.com>; Tue, 7 Aug 2018 00:39:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
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: 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 YfNqwjg9XjXo for <quic@ietfa.amsl.com>; Tue, 7 Aug 2018 00:39:41 -0700 (PDT)
Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 E2CB2130E1D for <quic@ietf.org>; Tue, 7 Aug 2018 00:39:40 -0700 (PDT)
Received: by mail-lj1-x234.google.com with SMTP id u7-v6so12640145lji.3 for <quic@ietf.org>; Tue, 07 Aug 2018 00:39:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; 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; d=1e100.net; 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: <CABkgnnUNJ0+TbC6QxjppD8MrBPJGYDpKbqtRGgiwweWWu7m5XQ@mail.gmail.com>
References: <CABkgnnW9-Jn1CH0rSwbtDmMrOZ+jstugVsOpWtShDJgT_KSyOw@mail.gmail.com> <CANatvzxJVMUrCW+28FAFC21-Yg_7g0ayaGMfpyaMyztosaAVjg@mail.gmail.com> <CABkgnnWFKLN7obL9H0+ayJDSAmR_Xzk2Yxaj6y92fEJEzD=URQ@mail.gmail.com> <CANatvzz4rC2BUK7xKeUQrHVJzXxzCnp4uXNFEargmkNcz82dLg@mail.gmail.com> <CABkgnnUiikrpqNZA8oKjAHe1aBjBSSV0gFzMwAXDr8HW4Wiufg@mail.gmail.com> <CANatvzx2z15uE=Be6WCuTs1AiwjuoNbqx3_fUYOozt70JyhdRw@mail.gmail.com> <CABkgnnUNJ0+TbC6QxjppD8MrBPJGYDpKbqtRGgiwweWWu7m5XQ@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Tue, 7 Aug 2018 16:39:38 +0900
Message-ID: <CANatvzzuDwxQc4uj6RPz6UbS_2eECtCAtpnn=OLhe5CnDkP3cA@mail.gmail.com>
Subject: Re: Key updates
To: Martin Thomson <martin.thomson@gmail.com>
Cc: QUIC WG <quic@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/DC5gmHLWdu-AlT6bVBy3WrttCHE>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.27
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: Tue, 07 Aug 2018 07:39:43 -0000

2018-08-07 16:10 GMT+09:00 Martin Thomson <martin.thomson@gmail.com>:
> On Tue, Aug 7, 2018 at 5:01 PM Kazuho Oku <kazuhooku@gmail.com> 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