Re: [TLS] Security review of TLS1.3 0-RTT

Eric Rescorla <ekr@rtfm.com> Fri, 19 May 2017 22:47 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8EC49129B5F for <tls@ietfa.amsl.com>; Fri, 19 May 2017 15:47:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.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 50ICqK9y8PDW for <tls@ietfa.amsl.com>; Fri, 19 May 2017 15:47:13 -0700 (PDT)
Received: from mail-yw0-x233.google.com (mail-yw0-x233.google.com [IPv6:2607:f8b0:4002:c05::233]) (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 748B8129B4D for <tls@ietf.org>; Fri, 19 May 2017 15:47:13 -0700 (PDT)
Received: by mail-yw0-x233.google.com with SMTP id l14so40927278ywk.1 for <tls@ietf.org>; Fri, 19 May 2017 15:47:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BdOfDOTBZIbhiKGX9idcYMf66qmhEj8CDo6OAtPiklc=; b=SPcrOQKXWwWMqUwAbR6QvcaChQrKzITFiClhNraNLGKStOJ2PRX2tKiskQC3QxQpA8 RKlkFhQoxw0L+kZcxaM9J+d6BZHeL271Qtog6wV3l6OpJrmY9NSb9csB1k7i7C0H6Lxy JXbzWrBu4Dfs5PSsruuhqNnSPqlO0lrn/12IiBYYkRrNY1o3HL0gd69B0D5hTceuGYZt Xl611pn3XJSXn1FDM3YoTFmKHp59GWSlv8Gp8ph5hNG5/Va+sW72gG6zRKjgxd1mzfjg oDvueJYy34FaHT4d9nYxjTA6ixL/feHoOFDsHb6T5tYXtKQhxjsAsqIkGHxMY9JG++hs kB+A==
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=BdOfDOTBZIbhiKGX9idcYMf66qmhEj8CDo6OAtPiklc=; b=MY7XXYg++vcAYnO6LRM5UvniBQGSDJjrRy+bpxD927nvESFtZAvIr435WqOJw59Xp2 dRv5IsyfHcX0OZ9fkJEnC58Fc1wBDQvF66QWZ6iOCZIqmqv3jnWTB1K3/sNz9JHCGcgi wO4fkYZKxIU7soGqgpJn1FJcf7vYCBXig2aHI6vVVHiLY7GgfP5Mm1lmgxZcVUHMoHUT tcm1dxz4N/PlJHBi11RMKsgAz2HU++75kz7GQdJyB3jJJ/2svwI3MNEtJQsvb+8GPGce D1cIXKR3qHVCFqOww/WMnIo5qb9hfEoKj5ngEpvq/hYe4h/4ZnNsS290UdbFP/ETP06s oUjg==
X-Gm-Message-State: AODbwcBL4uZYHOUBBygP2jcQTVpRnGOGO2RNeswJZTgkEQWbLolnWduS CPAOAlqmARhgf1EZjsXifccapsIIPCHk
X-Received: by 10.13.212.1 with SMTP id w1mr9565878ywd.24.1495234032751; Fri, 19 May 2017 15:47:12 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.131.150 with HTTP; Fri, 19 May 2017 15:46:32 -0700 (PDT)
In-Reply-To: <CAF8qwaByGeGtap8gDB-p3n-0DMqEL9uJGJQ4EErfkq-SFcbHGQ@mail.gmail.com>
References: <CAAF6GDcKZj9F-eKAeVj0Uw4aX_EgQ4DuJczL4=fsaFyG9Yjcgw@mail.gmail.com> <CABcZeBNcnW9zEPZ4mEje1_ejR3npNFz65rw-6qUPn7cQt1Nz9w@mail.gmail.com> <CAAF6GDe1_ih1aUShrzAHUuTzbLx6+0BdVexpGnq90RZsST8GvA@mail.gmail.com> <CABcZeBOX5NXuhgfap2S0naO9PFXv+K-+fZVPbgck6yciVnrYbQ@mail.gmail.com> <CABcZeBPuOupLTNKOtuCgOjYNdiuw571HM-pq1vNZz_8x-XX5mg@mail.gmail.com> <CABcZeBMqALJ10cU7FMUhv8k5Q=tw3yu1-5pdrKzOBM3=g5PHJw@mail.gmail.com> <20170519095316.GA30080@LK-Perkele-V2.elisa-laajakaista.fi> <CAAF6GDeuRMZx9MRynrxMp1fCvRS2jjr0vcqt0R89cJEkD6u=rQ@mail.gmail.com> <20170519184051.GA31741@LK-Perkele-V2.elisa-laajakaista.fi> <CAAF6GDcP3_+WOB1xsc7JecpCo2-MfeuHgkN7PVrUiLweeurv2g@mail.gmail.com> <CAF8qwaByGeGtap8gDB-p3n-0DMqEL9uJGJQ4EErfkq-SFcbHGQ@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 19 May 2017 18:46:32 -0400
Message-ID: <CABcZeBPcWawAWCtUHY77mWnD4iykfUgOkE5zNr6_uq+TokGAPg@mail.gmail.com>
To: David Benjamin <davidben@chromium.org>
Cc: Colm MacCárthaigh <colm@allcosts.net>, Ilari Liusvaara <ilariliusvaara@welho.com>, "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="001a114fb0f6610677054fe84dc5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/pzSq5c0yYYhOvREJvtpOT02d1Vc>
Subject: Re: [TLS] Security review of TLS1.3 0-RTT
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 19 May 2017 22:47:15 -0000

On Fri, May 19, 2017 at 4:49 PM, David Benjamin <davidben@chromium.org>
wrote:

> Seeing as this utterly ridiculous ticket_age_add thing is partially my
> fault, I suppose I should respond:
>
> On Fri, May 19, 2017 at 4:10 PM Colm MacCárthaigh <colm@allcosts.net>
> wrote:
>
>> > And then separate to all of the above, and lower priority:
>>> >
>>> > * There's a contradiction between the obfuscated ticket age add
>>> parameter
>>> > and the desire to use tickets multiple times in other (non-0RTT)
>>> cases. We
>>> > can't do one without defeating the point of the other. Either remove
>>> the
>>> > obfuscation because it is misleading, or move it into an encrypted
>>> message
>>> > so that it is robust.
>>>
>>> The purpose of obfustication is not to hide sibling sessions. The
>>> client already blows its cover by using the same session ID twice. The
>>> purpose of obfustication is to hide the parent session.
>>
>>
>>> Are you talking about attackers being able to determine the rate of
>>> client clock?
>>>
>>
>> Right now if a ticket is used multiple times, then the ticket age can be
>> derived (trivial cryptanalysis due to re-using the same obfuscated offset,
>> and because the progression of time between the ticket uses is public);
>> that means the parent session can be identified. So the point is defeated.
>>
>
> Could you expand on your cryptanalysis? I don't believe this is actually
> leaked. It's addition mod 2^32, not XOR, which means you effectively
> randomize the parent starting time. (It was initially XOR, and then shortly changed
> to addition
> <https://www.ietf.org/mail-archive/web/tls/current/msg20376.html>.)
> Consider:
>
> initial connection at time t1, issues a ticket with ticket_age_add = x.
> Let t1' = t1 - x.
> Resumption 1 at time t2, offers t1's ticket. The attacker learns t2 - t1 +
> x = t2 - t1'.
> Resumption 2 (or HelloRetryRequest) at time t3, offers t1's ticket. The
> attacker learns t3 - t1 + x = t3 - t1'.
>
> x is uniformly distributed over [0, 2^32), so t1' = t1 - x is as well.
> This is a one-time pad on t1, correctly used only once. x is only ever used
> to encrypt one timestamp, t1.
>
> Of course, the attacker can correlate t2 and t3 by subtracting the two
> public values and checking against the public difference between
> connections they observe. But the ticket's already leaked anyway.
>
>
>> Either the one-time-pad can be used just one time (which means the ticket
>> can be used just once) or we should move it to an encrypted message. Or
>> just get rid of it and not be so misleading. But the current state is
>> weird, to say the least.
>>
>
> I believe stuffing something into an AEAD was proposed and then rejected
> by the cryptographers for some reason? You'd have to ask other folks for
> details. I just recall being told that was a previous rejected proposal.
> Accordingly, I suggested the dumbest thing that could possibly work,
> intending it be so dumb that it could not possibly have consequences beyond
> patching that correlation hole. :-)
>

What was rejected was actually having the stuffed Finished be an
AEAD-encrypted block
containing stuff like the ticket_age. We could certainly derive a new key
and AEAD it if
we wanted to, that just seemed like a lot more work than I think people
wanted to do.

-Ekr


>
>
> David
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>