Re: [TLS] 0-RTT security considerations (was OPTLS)

Eric Rescorla <ekr@rtfm.com> Wed, 19 November 2014 00:04 UTC

Return-Path: <ekr@rtfm.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 E39131A8AFB for <tls@ietfa.amsl.com>; Tue, 18 Nov 2014 16:04:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 czHkLn8Op5yY for <tls@ietfa.amsl.com>; Tue, 18 Nov 2014 16:04:52 -0800 (PST)
Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0EAE71A8706 for <tls@ietf.org>; Tue, 18 Nov 2014 16:04:52 -0800 (PST)
Received: by mail-wi0-f181.google.com with SMTP id r20so74242wiv.14 for <tls@ietf.org>; Tue, 18 Nov 2014 16:04:50 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=4Wkd0oYT4ErK6uNZYv94BlPxnGtMPv0iUmphIgMjMi4=; b=SugSfo7MeIM0aq5shmwuAsoD57CjtLTMsX1UEErjNrsDbj6gvEMSLHFhoZ/vfgQ4Fv KTda4KUvFAG1I2/IjI96ZyHFQpxUl0J0g4CPE+mhmPfnXaEmKEdtSczs40JSqXoYO0qb eD3+JRomfYvGFk0gLOqDIaSgE4Pt6TfEG6H9G6owQlme2p34f+clA/eKpLd2XZ8e4ooj j2XKdMuk9Jr+DzJbgW9Tv6NpyIKGMZ5OdtuWtYDIaqfR2Yj255wiFQrQu36zCWzeZLI3 IUG3OSHS3SuNwmRtENV4p9+iB+SVIZH1RzS3iZqcuuD/c0kbGUaIKFDR5akFXzAIRgpa cveA==
X-Gm-Message-State: ALoCoQkTZFYz53XRKdqBzTeHITzyejaoFg+Co1dwdV8RMK5dxD9JRosiG0B5pB7e4hRS3qsI1EjN
X-Received: by 10.180.150.138 with SMTP id ui10mr8121882wib.32.1416355490715; Tue, 18 Nov 2014 16:04:50 -0800 (PST)
MIME-Version: 1.0
Received: by 10.27.130.34 with HTTP; Tue, 18 Nov 2014 16:04:10 -0800 (PST)
In-Reply-To: <20141118234608.GA20721@localhost>
References: <20141118234608.GA20721@localhost>
From: Eric Rescorla <ekr@rtfm.com>
Date: Tue, 18 Nov 2014 16:04:10 -0800
Message-ID: <CABcZeBN7ErepGC0Y5_xiYspJG-i3z6kA=STMk0mnnu+oQNCZqA@mail.gmail.com>
To: kitten@ietf.org
Content-Type: multipart/alternative; boundary="001a11c3fb20e67d2705082af54d"
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/iZdymVMmZR4NiVsftPWkQ_20M1Q
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] 0-RTT security considerations (was OPTLS)
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: <http://www.ietf.org/mail-archive/web/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: Wed, 19 Nov 2014 00:04:58 -0000

On Tue, Nov 18, 2014 at 3:46 PM, Nico Williams <nico@cryptonector.com>
wrote:

>
> Following up to the OPTLS proposal I thought it'd be interesting to
> explore the security (API, and other) considerations of 0-RTT protocols.
> I'm not sure[0] how much this has been done on this list before, so pardon
> me if this is noisy.
>

A fair bit, including a complete solution in Snap Start
and some handwavy stuff in draft-rescorla-tls13-new-flows-01, as
well as the Watson Ladd mail you reference below



> Security considerations:
>
>  - Replay protection (use replay cache or defer protection)
>
>    Replay protection on the server side requires either a replay cache
>    (which can more than negate the latency of one network round trip),
>    or deferring replay protection availability to the end of the
>    handshake.
>
>    Deferring replay protection availability requires that the client's
>    first data record(s) be held for delivery until replay protection is
>    available (again, limiting the value of 0-RTT), or that the
>    application be aware of the replay potential.
>

Yes, I agree that this doesn't make sense. The server needs to provide
anti-replay as part of the TLS stack using some sort of server-side state.
Servers which don't want to do that should not offer 0-RTT.



>  - PFS (not available for 0-RTT data)
>
>    What about PFS?  Can't be done in 0-RTT, but it can become available
>    when each party learns the others' ephemeral (EC)DH key.
>
>    Again, the application may (likely will) need to know about PFS being
>    deferred, therefore this is an API consideration as well.
>

Yes, we'll need APIs to let the client control whether data should be sent
w/o PFS. Note that the we already have a parallel situation with resumption
which currently never offers OCSP.


 - Server authentication state
>
>    Even in the 0-RTT case the client must check that the server's pubkey
>    hasn't been revoked, of course, but either it won't be able to until
>    it receives the server's Hello (where stapled OCSP should be found),
>    or it will have to check certificate status out of band (which has
>    privacy considerations).
>
>    The problem here is that any application data sent before receiving
>    the server's Hello will be compromised if the server's private key
>    was compromised (even if the cert was revoked).
>
>    For HTTP(S) this is a problem: the HTTP request may or may not be
>    sensitive, but the HTTP client implementation and TLS can't know
>    if it is -- only the application can know.  This might mean that XHR,
>    HTML, need extensions for specifying this.
>

I'm not following this. Generally, server 0-RTT keys will probably be fairly
short-lived by comparison to OCSP-stapled responses, so you can just
continue to use the key within the OCSP window. Remember that if the
key is compromised within the OCSP window, then the attacker can
attack you with 1-RTT as well as 0-RTT. Again, this is also an issue
with resumption.


 - Client authentication state
>
>    Imagine a handshake where the client is not authenticated until the
>    second round trip, but we have key material for 0-RTT.  The server
>    cannot authorize any application protocol commands at this stage


Every proposal I have ever seen for 0-RTT has the client delivering
client auth in the first flight for exactly this reason.



 - Symmetric session key non-reuse depends entirely on the client and
>    its RNG.  E.g., in the resumption and PSK cases.
>
>    When using cipher modes where key/IV reuse is disastrous this could
>    be a serious problem.
>

The conventional way to address this (as in snap start) is to use an
anti-replay mechanism which ensures uniqueness of the client random,
thus providing key uniqueness.

-Ekr