Re: Packet number encryption

Ian Swett <ianswett@google.com> Tue, 30 January 2018 14:49 UTC

Return-Path: <ianswett@google.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 DB0B2131896 for <quic@ietfa.amsl.com>; Tue, 30 Jan 2018 06:49:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.709
X-Spam-Level:
X-Spam-Status: No, score=-2.709 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 UKpjfX5wXJNi for <quic@ietfa.amsl.com>; Tue, 30 Jan 2018 06:49:34 -0800 (PST)
Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (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 39CA4131B7F for <quic@ietf.org>; Tue, 30 Jan 2018 06:44:08 -0800 (PST)
Received: by mail-it0-x22e.google.com with SMTP id c16so863831itc.5 for <quic@ietf.org>; Tue, 30 Jan 2018 06:44:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ep952HF7EB/e7z55Co+pTK5ygGS5DMo5u5pAl3Svm+8=; b=PDJHmsdpgX6T+JQA0SXeLfNj8h0NR4kSGQuuTo5UAVc/kSac06laq5DgVnIt3j0NK/ c5DBHmoA+xsTcjmV4gD1+PN8HCbugmYC/7VuYzcSFj7zgGl14HCZUzEeZ+DXZFnnU55Z kS7OxlwVSGaoBcIC0XxXpnRFLsAR0SoPi/c9KVwWyU2AnMSYGfThqe3hhXz7GKS3qBbC 4M/FZ0Y/nF/5sLpQ/gD628mNAlc98YNoGAUxFgqoinY7cat47wqCiYT2r82CxAj6gddB DZtl4S/aZy4tI3pP39FHjUE3Pshi204WxX5+ZGwJGt0PwaOETQvBt59516TgjyWW9zdP cpZQ==
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=Ep952HF7EB/e7z55Co+pTK5ygGS5DMo5u5pAl3Svm+8=; b=sQyjQMEHTX0Q8p1kokGG5qakC6zB3NQN4onLTPTi83ZXP1eQ0XBNNvFGEGG8JqUwm3 u7TiSQxUVAlmhNS4zad2KMVrbXuhRqg9Woo7NDWyL5q1i2VVFQ3LOSN1b8BKjLo8YKmd TO1EEAGLFIoqy34+Rb9xA78brZFIZ07b9cQwRzI/dUatVEYT+dh2zJuqmaX669y2h2k4 M0N1KyFk4RHke1zb617PqUf4ikXzR+yVnjP/LT8PdpPUEKnJNk1IhjwyX4WQfi89fWnc AxdxmDzZynoQ2jooUm0/PC5hweYcccXRzsAq6EnGLkLC4n6+ZaHMvb/cqlqDlxWrvZA6 FoZA==
X-Gm-Message-State: AKwxytePdm9nL5SD8OJ6LOcb1yMHprW2iIVq4EbVw0wmZ6uwPQw3xxpy vKxbXgy6/sy6ESdRPOg+FzQ6NnxcBj83Klb3NgNO6g==
X-Google-Smtp-Source: AH8x226gFB1DUqr11tfpJ1IeeIIDYbVOfFqjI3XuHV8zrOO82iUJjTH0OimMwfSEu5MrUkqRLB4c2kKttR8b0Ko3+RA=
X-Received: by 10.36.192.10 with SMTP id u10mr31567973itf.73.1517323447338; Tue, 30 Jan 2018 06:44:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.107.222.4 with HTTP; Tue, 30 Jan 2018 06:43:46 -0800 (PST)
In-Reply-To: <CABkgnnVyo3MmWtVULiV=FJTnR528qfY8-OmKGWAs0bCvri-a_g@mail.gmail.com>
References: <CABkgnnVyo3MmWtVULiV=FJTnR528qfY8-OmKGWAs0bCvri-a_g@mail.gmail.com>
From: Ian Swett <ianswett@google.com>
Date: Tue, 30 Jan 2018 09:43:46 -0500
Message-ID: <CAKcm_gMDZ4nG7H-qyrN8NTV7v_x3OMON+sjHg9fvoj6tMrm8Qw@mail.gmail.com>
Subject: Re: Packet number encryption
To: Martin Thomson <martin.thomson@gmail.com>
Cc: QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="94eb2c05a2c21722460563ff65dc"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/T_ZSv7bjQGuAYZIaDroGQwnh4eQ>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
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, 30 Jan 2018 14:49:37 -0000

Thanks for writing this up Martin.  I'm definitely supportive of something
like this, and I'd like to see it land in time we can try to interop with
it in London.

My intuition favors simplicity over crypto agility in this case, since
we're already forcing implementations to support AES-GCM for the handshake
packets, but I'm happy with whatever the group prefers.

On Mon, Jan 29, 2018 at 8:59 PM, Martin Thomson <martin.thomson@gmail.com>
wrote:

> Here's a PR:
>
> https://github.com/quicwg/base-drafts/pull/1079
>
> In short, this builds on Kazuho's excellent suggestion to use ECB-mode
> to protect the packet number.  It does this only slightly differently,
> using suggestions from ekr and others to allow for cryptographic
> agility and use of primitives that match the negotiated AEAD.
>
> In short, it takes some of the ciphertext of the packet payload, and
> uses that to encipher the packet number.  My intuition is that this is
> pretty solid, but I want to check if the working group is happy that
> this is generally OK before seeking cryptographic review.
>
> For instance, the requirement for side-channel resistance is already
> controversial: https://github.com/quicwg/base-drafts/pull/1079/files#
> r164588705
>
> For the record, I doubt that this can be proven to be secure without
> both breaking new ground and adding some constraints to the AEADs that
> we use.  And that's before we get into actual breaks on the technique
> that I'm too thick-headed to think of.  In any case, we're relying on
> this to protect against linkability, so I'd like to ensure that we're
> not completely crazy in doing so.
>
> In case people were wondering, and because it already came up: I
> intend to separately propose a change to the short header packet that
> would remove the type field and move the packet number length under
> encryption.  See my response to Ian's question on the PR for an
> explanation of how this will likely work.
>
>