Re: [TLS] Fully encrypted and authenticated headers (was Re: Encrypting record headers: practical for TLS 1.3 after all?)

Watson Ladd <watsonbladd@gmail.com> Thu, 03 December 2015 16:00 UTC

Return-Path: <watsonbladd@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3898F1A014C for <tls@ietfa.amsl.com>; Thu, 3 Dec 2015 08:00:00 -0800 (PST)
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, SPF_PASS=-0.001] autolearn=ham
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 v9DMmDQsMWXq for <tls@ietfa.amsl.com>; Thu, 3 Dec 2015 07:59:58 -0800 (PST)
Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::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 8A4E91A0145 for <tls@ietf.org>; Thu, 3 Dec 2015 07:59:58 -0800 (PST)
Received: by ykba77 with SMTP id a77so90453272ykb.2 for <tls@ietf.org>; Thu, 03 Dec 2015 07:59:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=iAUq6ouFXIurJtQJGYa6jjITe/8Mr04nQ+RWEEYk84A=; b=VrnN70cakwy0CCLuS+jKrTphUUtlPYVBKluimecPV0ynEQfIyPCXXW/Su02ik15aJA sswE7QTwCwLH3kh3ZmlAEoI+mb11sLl5NZgdWRjepe52UO4aGuKagTfn1K+9gPpujU7+ 15v14aUjzjcfKoudAWus7ALw7PX3NX720JbC86n7q+5pAwGtGe7MDZ/iu6phHqkLdqwA j3lrdll+EkYoBr3d9eOm5G+2DCV6FkJqtp1BEd2pcFV4PGH72tzsz1y0lpeK4GsjT07D BPK9YHrK3MrwhdnDSEcfCP8wgdZKjLwK/xh4yPFGjVrUcbVZ0EuBnCaQeRO13fnr5Qsg zSJw==
MIME-Version: 1.0
X-Received: by 10.129.98.133 with SMTP id w127mr7438003ywb.239.1449158397834; Thu, 03 Dec 2015 07:59:57 -0800 (PST)
Received: by 10.129.148.131 with HTTP; Thu, 3 Dec 2015 07:59:57 -0800 (PST)
In-Reply-To: <CAFggDF17f4N=+x9hf1RFFjwcnG9j2XKLia659KUuFmXVhsDZKg@mail.gmail.com>
References: <56586A2F.1070703@gmail.com> <FB2973EF-F16C-404A-980D-CA0042EC4AEB@gmail.com> <565DBC63.5090908@gmail.com> <565DC935.2040607@gmail.com> <CABkgnnUoyVPC5QVc=ErzAm6DR8usjBw5scc==o4=-XaBoK5AWQ@mail.gmail.com> <9BFA68AB-9677-4BE7-8F5E-D1A66EF95BA5@gmail.com> <CABcZeBMuSeis6KNQ-D_ZAfKmWb7Ts_Lq=QM0z6YWVSSUwueZmg@mail.gmail.com> <CAFggDF1SHzU_w30Rk469G2ypTx-pRVsFexv9JHSQdAMJTf5xLQ@mail.gmail.com> <CABcZeBP2eyncPVkRMMbBk7ysco++-E9oiiu7JHOjs73wS=R5og@mail.gmail.com> <CAFggDF17f4N=+x9hf1RFFjwcnG9j2XKLia659KUuFmXVhsDZKg@mail.gmail.com>
Date: Thu, 03 Dec 2015 10:59:57 -0500
Message-ID: <CACsn0cmHyP5SvngFXBx=Ne9z7aAshneH4NK4PXYM+GxMWiroaA@mail.gmail.com>
From: Watson Ladd <watsonbladd@gmail.com>
To: Jacob Appelbaum <jacob@appelbaum.net>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/yQB4dZPH-KMKnOxhWYQHIvioz6k>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Fully encrypted and authenticated headers (was Re: Encrypting record headers: practical for TLS 1.3 after all?)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 03 Dec 2015 16:00:00 -0000

On Thu, Dec 3, 2015 at 6:36 AM, Jacob Appelbaum <jacob@appelbaum.net> wrote:
> On 12/2/15, Eric Rescorla <ekr@rtfm.com> wrote:
>> On Wed, Dec 2, 2015 at 7:34 AM, Jacob Appelbaum <jacob@appelbaum.net>
>> wrote:
>>
>>> On 12/2/15, Eric Rescorla <ekr@rtfm.com> wrote:
>>> > On Wed, Dec 2, 2015 at 1:07 AM, Bryan Ford <brynosaurus@gmail.com>
>>> wrote:
>>> >
>>> >> On 02 Dec 2015, at 06:02, Martin Thomson <martin.thomson@gmail.com>
>>> >> wrote:
>>> >> > On 1 December 2015 at 08:22, Bryan A Ford <brynosaurus@gmail.com>
>>> >> > wrote:
>>> >> >> The 2-byte length field in each record's header no longer indicates
>>> >> >> the length of the *current* record but instead indicates the length
>>> of
>>> >> >> the *next* record.
>>> >> >
>>> >> > Ensuring that you know the length of the *next* record is difficult
>>> >> > and could dramatically degrade latency, or adding extra bogus
>>> >> > padding
>>> >> > or extra bogus records.  For instance, I can always send in bursts
>>> >> > of
>>> >> > two packets, a one octet packet that promises the remainder of the
>>> >> > burst and one that promises a single octet packet.  At that point, I
>>> >> > get to do what I've always done and you have gained little other
>>> >> > than
>>> >> > an increase in packet size of around 19 octets (best case).
>>> >>
>>> >> That type of inefficiency is extremely easy to avoid; please read the
>>> >> rest
>>> >> of my proposal where I discussed exactly that at length.  Yes, a
>>> >> particularly stupid implementation could send everything in bursts of
>>> two
>>> >> packets, but it’s ridiculously easy for a slightly smarter
>>> implementation
>>> >> to avoid doing that.  And what you’ve gained is complete encryption
>>> >> and
>>> >> integrity-checking of the whole TLS record before any part is
>>> >> interpreted,
>>> >> which seems like a nontrivial security improvement.
>>> >
>>> >
>>> > It's not really clear to me what the anti-traffic-analysis benefit of
>>> your
>>> > proposal
>>> > is over and above just padding everything to a fixed size. That's
>>> certainly
>>> > far
>>> > easier for the implementation to do, especially in typical stacks where
>>> the
>>> > application just calls SSL_Write (or whatever) and so there's no
>>> > obvious
>>> > API point to provide the "next length", so as a practical matter the
>>> stack
>>> > will very often if not always be in "last block" mode.
>>> >
>>>
>>> I think that it eliminates all static distinguisher in the protocol
>>> for all data covered by the encryption. That is a fantastically
>>> wonderful benefit.
>>
>>
>> Wouldn't that benefit be equally achieved by simply padding all records
>> to a fixed length? You could do this with no protocol change and, as I
>> said, it's far easier for the implementation.
>>
>
> Padding is potentially useful but has two issues that come to mind
> which are both non-issues in most cases. The first is the economic
> cost for extra bytes and the second is the security of the padding
> scheme.
>
> Padding strategies are a complement super encryption but probably not
> a replacement. Padding protects against one set of attackers (bean
> counters) and super encryption provides confidentiality against
> another set of attackers (GPA/APA).

But as several people have noted, encrypting record lengths doesn't
actually protect the lengths of the records
as well as you think it does. Timing packets is not some exotic and
unavailable technology. I don't understand what
attacks padding and introduction of dummy packets doesn't defend
against that encryption of record lengths does.

Sincerely,
Watson