Re: [TLS] TRON workshop

Ilari Liusvaara <ilariliusvaara@welho.com> Mon, 12 October 2015 16:05 UTC

Return-Path: <ilariliusvaara@welho.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 20C061A883A for <tls@ietfa.amsl.com>; Mon, 12 Oct 2015 09:05:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 XtNgu0e5OGew for <tls@ietfa.amsl.com>; Mon, 12 Oct 2015 09:05:41 -0700 (PDT)
Received: from filtteri2.pp.htv.fi (filtteri2.pp.htv.fi [213.243.153.185]) by ietfa.amsl.com (Postfix) with ESMTP id 908721A001C for <tls@ietf.org>; Mon, 12 Oct 2015 09:05:41 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by filtteri2.pp.htv.fi (Postfix) with ESMTP id 7626719C5CE; Mon, 12 Oct 2015 19:05:40 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from smtp4.welho.com ([213.243.153.38]) by localhost (filtteri2.pp.htv.fi [213.243.153.185]) (amavisd-new, port 10024) with ESMTP id mMWg06afldiz; Mon, 12 Oct 2015 19:05:40 +0300 (EEST)
Received: from LK-Perkele-V2 (87-92-35-116.bb.dnainternet.fi [87.92.35.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp4.welho.com (Postfix) with ESMTPSA id 3EB485BC005; Mon, 12 Oct 2015 19:05:40 +0300 (EEST)
Date: Mon, 12 Oct 2015 19:05:39 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20151012160539.GA30129@LK-Perkele-V2.elisa-laajakaista.fi>
References: <5616DE2A.6060508@cs.tcd.ie> <3257371.23XkUVl0AJ@pintsize.usersys.redhat.com> <CABcZeBMCvvuvDq17awHHMDrYpKE1moiGGOBhz5YdskZGrEKmxw@mail.gmail.com> <20151012145803.GA29740@LK-Perkele-V2.elisa-laajakaista.fi> <CABcZeBOGFD0v8cvjYJNuLheSaA8H6237CHSO47MobKO=7f4xHw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <CABcZeBOGFD0v8cvjYJNuLheSaA8H6237CHSO47MobKO=7f4xHw@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Sender: ilariliusvaara@welho.com
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/MEkTkIrMmHiVGn9ASpCRlA-THQg>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] TRON workshop
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: Mon, 12 Oct 2015 16:05:43 -0000

On Mon, Oct 12, 2015 at 08:04:37AM -0700, Eric Rescorla wrote:
> On Mon, Oct 12, 2015 at 7:58 AM, Ilari Liusvaara <ilariliusvaara@welho.com>
> wrote:
> >
> > 1) It seems to me that if server key is compromised, MITM can
> > substitute 0-RTT data with its own (at least if original and modified
> > one have the same number of records). And such modification will not
> > be detected by handshake, which will complete successfully.
> >
> > Perhaps the comment about impersonation with compromised server key
> > was about this (I can't get more usual types of attacks to work)?
> >
> 
> Yes, that's the idea.
 
If so, I think the note is really unclear. Maybe something like:

"If the server key is compromised, then the attacker can tamper with
the 0-RTT data without detection.".

(The reason I can't make straightforward impersonation to work is that
the signature presumably signs unknown client DH keys and server sends
fresh DH keys, so one can't compute the ES and contine past when
connection goes encrypted).
 
> 2) If static client authentication is used with 0-RTT data, the client
> > authentication always preceeds 0-RTT data (it is first in early
> > handshake, and using 1-RTT client auth is forbidden). This seems to
> > imply 0-RTT data should be interpretted in an authenticated context,
> > which seems dangerous given the replayability of the 0-RTT data.
> 
> Well remember that applications already have this problem because
> they send cookies and the like in their HTTP requests. So, I don't
> know how much this alters the analysis. And yes, we do have settings
> where we need this

At least HTTP has safe methods (GET) and also HTTP/2 has prelude (which
is connection-scoped) one might want to send as 0-RTT data.

And also, can you give some examples of settings where authenticating
0-RTT data is needed?

 
> 3) The document talks about making 0-RTT data unreplayable by using
> > extra identifier agreed out-of-band. Does that actually work, given
> > the likely auto-replay by the client?
> 
> I'm assuming that in these cases the server has global state and so doesn't
> have a problem.

I was thinking of stuff like this:

1) Client sends 1st flight to server, gets intercepted by attacker.
2) Attacker sends the 1st flight to server twice.
3) Attacker resets the connection where server accepts the data.
4) Attacker starts forwarding other data.
5) Client sees 0-RTT failed. Completes handshake.
6) Client compensates for failed 0-RTT and essentially causes a replay.

(Which I think actually did come up when DKG broke the heck out of
0-RTT anti-replay).


And while at it, although this isn't about 0-RTT:

4) Currently the handshake "restart" anti-tampering works by
continuing the hashes. This has nice security properties seemingly
difficult to replicate in other settings.

I have identified three kinds of attacks against handshake "restart":
- Attacker tampering with first ClientHello.
- Attacker tampering with returned HelloRetryRequest.
- Attacker causing handshake restart on serverside without client
  knowing.

Current "continue the hashes" prevents all those attacks by causing
handshake to unavoidably fail. 

It seems to me that other approaches rely on client and server
performing checks, and given the complexity of things like checking
ClientHello, I give chance of epsilon squared (= very^2 small) that
there isn't going to be implementations that get that badly wrong.



-Ilari