Re: [quicwg/base-drafts] Packet number encryption (#1079)
ekr <notifications@github.com> Wed, 18 April 2018 16:22 UTC
Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.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 23FB6127735 for <quic-issues@ietfa.amsl.com>; Wed, 18 Apr 2018 09:22:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.01
X-Spam-Level:
X-Spam-Status: No, score=-3.01 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, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] 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 wuJA4gBUQAOG for <quic-issues@ietfa.amsl.com>; Wed, 18 Apr 2018 09:22:14 -0700 (PDT)
Received: from o7.sgmail.github.com (o7.sgmail.github.com [167.89.101.198]) (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 2C3A71275AB for <quic-issues@ietf.org>; Wed, 18 Apr 2018 09:22:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=mNqixX1B2Qdhb9ufliMutYciKEo=; b=hbszVFiBAEJmweGM y9F9P5hTJ7QP/6e4lzN0IJVXzUCgEWZVbPeDCZbhApsC7jUDPsPCUxyuMh92XpZA 9c2VdfT9a02S7VarFuLhKh3QHWTnPZEV6L/Eq+X5+X0toUCyj6NwyJHmL4mYHNZq +9S/jpPNZwxhKhoyVuJykHJOO/M=
Received: by filter0543p1las1.sendgrid.net with SMTP id filter0543p1las1-27113-5AD770B4-22 2018-04-18 16:22:12.472915171 +0000 UTC
Received: from smtp.github.com (out-3.smtp.github.com [192.30.252.194]) by ismtpd0029p1mdw1.sendgrid.net (SG) with ESMTP id 0E98k4miRCuWmExlMpcHWA for <quic-issues@ietf.org>; Wed, 18 Apr 2018 16:22:12.244 +0000 (UTC)
Date: Wed, 18 Apr 2018 16:22:12 +0000
From: ekr <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab18007c8f02a3afb55d70708b226b1fca0ffcae2092cf0000000116ef32b392a169ce116c0848@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/1079/c382445631@github.com>
In-Reply-To: <quicwg/base-drafts/pull/1079@github.com>
References: <quicwg/base-drafts/pull/1079@github.com>
Subject: Re: [quicwg/base-drafts] Packet number encryption (#1079)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5ad770b3f2646_679a2ae14c012f542148ce"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: ekr
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-CSA-Complaints: whitelist-complaints@eco.de
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak2P3i1mWsq5GOlhTjCbnKraAeScWOzrMhwWur SGSVLJH3nQUMKzeYQVS9irUb9QAjfbaDw1gzQkt1xcgxHakXQW4Z6z2UCnDIw6zmyOv3Q2lIzgYrWs TEyzVr9Qta8BszXuC6OlBBwiN6wbfTl5LsqGseMmIwGaMIG+8DHFcZaSsA==
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/DukmfORHZ0PL7D7uVsCWzwozorQ>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.22
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, 18 Apr 2018 16:22:16 -0000
On Tue, Apr 17, 2018 at 7:13 AM, Antoine Delignat-Lavaud < notifications@github.com> wrote: > We have been discussing this PR at Microsoft with Cedric Fournet and Nick > Banks and have some comments on the current proposal: > > 1. > > As pointed out in the other reviews of this PR, there is a lot of > ambiguity regarding whether the packet number length is or isn’t encrypted. > In the current PR, the formula to compute the sample_offset only makes > sense if the packet number is a “varint”. However, the proposed change does > not alter the short packet header, and the PN length is indicated by the > last 3 bits of the flags byte, and restricted to be one of 8, 16, or 32 > bits. Under this assumption, the sample_offset can be redefined as the > length of the packet header - we think it is reasonable to keep the PN > length public, and avoid having a fuzzy limit between packet header and > contents, which could be a source of side channels in the processing of the > packet after PN decryption, in particular considering point 2 below. > 2. > > Given that packet numbers in short packets are only a few bytes and > get encrypted without authentication, they are extremely vulnerable to > malleability, and using a XOR mask encryption (such as CTR mode or ChaCha20 > keystream) compounds the problem even further, because an adversary can > selectively flip the few bits of interests for him (the low weight ones) to > find out using side channels what position the reader is at in the stream > (as discussed in the PR comments). We are concerned that some > implementations may try to perform optimizations based on the decrypted PN > without first first decrypting the packet (for instance, an implementation > may chose not to decrypt the packet if the decrypted SN has been acked, or > above some threshold). Any such optimization is a side channel that can be > extremely efficiently used to recover the PN. We think it is a weakness of > the PN encryption scheme to allow implementations to fall into this trap. > Using a 32-bit permutation cipher rather than AES-CTR or ChaCha20 would > make such attacks less effective. A cipher such as Speck with 32 bit blocks > could be well suited for this purpose, and also much faster. > > Note that if we're willing to bake in a permutation, we can just go back to Kazuho's original proposal of AES-ECBing the PN + <X bytes of ciphertext> in place. -- 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/1079#issuecomment-382445631
- [quicwg/base-drafts] Packet number encryption (#1… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Mike Bishop
- Re: [quicwg/base-drafts] Packet number encryption… ianswett
- Re: [quicwg/base-drafts] Packet number encryption… ianswett
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Mike Bishop
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Kazuho Oku
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Kazuho Oku
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Rui Paulo
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Christopher Wood
- Re: [quicwg/base-drafts] Packet number encryption… Christopher Wood
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Kazuho Oku
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Brian Trammell
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… ekr
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Mike Bishop
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Nick Banks
- Re: [quicwg/base-drafts] Packet number encryption… Mike Bishop
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Antoine Delignat-Lavaud
- Re: [quicwg/base-drafts] Packet number encryption… ekr
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Kazuho Oku
- Re: [quicwg/base-drafts] Packet number encryption… Christian Huitema
- Re: [quicwg/base-drafts] Packet number encryption… Antoine Delignat-Lavaud
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Nick Banks
- Re: [quicwg/base-drafts] Packet number encryption… Kazuho Oku
- Re: [quicwg/base-drafts] Packet number encryption… Kazuho Oku
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Kazuho Oku
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Kazuho Oku
- Re: [quicwg/base-drafts] Packet number encryption… MikkelFJ
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Dmitri Tikhonov
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Nick Banks
- Re: [quicwg/base-drafts] Packet number encryption… Martin Thomson
- Re: [quicwg/base-drafts] Packet number encryption… Nick Banks
- Re: [quicwg/base-drafts] Packet number encryption… janaiyengar
- Re: [quicwg/base-drafts] Packet number encryption… janaiyengar
- Re: [quicwg/base-drafts] Packet number encryption… janaiyengar
- Re: [quicwg/base-drafts] Packet number encryption… janaiyengar