Re: [TLS] 0.5 RTT

Karthikeyan Bhargavan <karthik.bhargavan@gmail.com> Tue, 23 February 2016 21:58 UTC

Return-Path: <karthik.bhargavan@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 864141B313F for <tls@ietfa.amsl.com>; Tue, 23 Feb 2016 13:58:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.999
X-Spam-Level:
X-Spam-Status: No, score=-0.999 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, FREEMAIL_REPLY=1, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=no
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 BBFrvwQtd_rN for <tls@ietfa.amsl.com>; Tue, 23 Feb 2016 13:58:33 -0800 (PST)
Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (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 E58341B2FF5 for <tls@ietf.org>; Tue, 23 Feb 2016 13:58:32 -0800 (PST)
Received: by mail-pa0-x22f.google.com with SMTP id fy10so116873942pac.1 for <tls@ietf.org>; Tue, 23 Feb 2016 13:58:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=xaKsVLhg8qNOUVg6+mE50jp8xnLIXi+3mTqsJpTd9mM=; b=T1nxb1hdpxVVrwgH5mBgUuy9/Zv6xPv5qYiCsr8cYscVnLMojqU8ml2o2LE8JATNET Q0oli41AUf3v+AUWMZJ12W8SP+VD/BX9a7Ff2mlbDTP0yYj26vMQFirzOIC6LjMigyig IZO8AzmSR1sOCwU5a9mxSwLUNPYBYLeI757BmQR/kpD/e9SFD5PTHokIVOpDnVm0rrxl 8qwusN1i88C0/evmpmKH63VwvBvS400jIPtnd+dVOocqFl1GYc4j7m2L4SDL/5BZIMDk E+wQRjjgDtwNPQ9KpUC4AyPe3mInXL3QpEsA3AmTzUu0O0wgMXVixvpBXdsCwEbCZyDz Tdhw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=xaKsVLhg8qNOUVg6+mE50jp8xnLIXi+3mTqsJpTd9mM=; b=dCaZ5o6BzLZ+soYtjKVG67nORND9AW6q6rNtItcBUBHAQao37mTwovAXvrPk2+Agm7 nNnjisdbHXnzodTm+s3EihQOzyje9Qb46QQyjyTktvuCIStYP2pipU+BopdUILn1s6ST 0Sm/r0xnKolVHBSsWLgnOoDtwkSdT/SFcNERZmeLgMGJqyw4CNilxXEy15MAs5RIH72A xt9m5VGtwgniCLQnZncXQ4Odzw7Hs2saxj9vSsooXjoaDpuL3rLptiOPelzNYsVwZRYw O0r8fngT2Wv3BmyezBn4EUsxHgoBTKHfxX/3Y4LI7xCnEttgiZ95AXfFqImhFPkCZXB1 0Vzw==
X-Gm-Message-State: AG10YORKU0jfinZ9ZCvAoki9VyoZjX3ZwpNYYHDna/gDGH/mttdlwEG6QUwLppdxHC9esg==
X-Received: by 10.66.124.201 with SMTP id mk9mr36471099pab.152.1456264712540; Tue, 23 Feb 2016 13:58:32 -0800 (PST)
Received: from [172.25.3.130] (rrcs-67-52-140-5.west.biz.rr.com. [67.52.140.5]) by smtp.gmail.com with ESMTPSA id 87sm46252233pfq.93.2016.02.23.13.58.31 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 23 Feb 2016 13:58:31 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail=_45209FF7-7151-40EF-8842-A83D6BDA30B6"
Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\))
From: Karthikeyan Bhargavan <karthik.bhargavan@gmail.com>
In-Reply-To: <CADi0yUPOEL++R+_Nhy4NTfhzsA6UjbVbMAEiPx1Qg9+vPPHt7g@mail.gmail.com>
Date: Tue, 23 Feb 2016 13:58:30 -0800
Message-Id: <35EE1C1C-132D-47A1-ADF3-5AD3C3D5EE4D@gmail.com>
References: <CABkgnnW1LRhSA_i0nL=rDYnUwBZWg5dSys7yk6aDefYWptnpZQ@mail.gmail.com> <8FA1A0FD-B911-474F-AC08-6208A80EB980@gmail.com> <CADi0yUPOEL++R+_Nhy4NTfhzsA6UjbVbMAEiPx1Qg9+vPPHt7g@mail.gmail.com>
To: Hugo Krawczyk <hugo@ee.technion.ac.il>
X-Mailer: Apple Mail (2.3112)
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/bNcMiF6xD-V-zk3cwaGhcHyM_wk>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] 0.5 RTT
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: Tue, 23 Feb 2016 21:58:35 -0000

> ​That's right, we do not consider downgrades or client authentication but Martin's suggestion explicitly only applies to the case​ where the server does not require client authentication so the analysis holds in that case. As for downgrades, this will be discovered by the server when receiving the client's Finished message. So the only problem I see is that the server might have been "tricked" to send the 0.5-RTT data with less protection than intended by the (honest) client. But for that there is no need for downgrade. The attacker could have generated the exchange with the weaker ciphersuite by himself (acting as a client). If the server accepts that ciphersuite it means he is willing to send that particular data with that level of security to *anyone*. That is the meaning of not requiring client authentication. 

Yes Hugo, you’re right that when there is no client auth, the situation is less problematic. 

However, let’s note there may still be implicit kind of authentication, for example, what if the client hello requests PSK-based 1-RTT with a old-broken cipher that the real client would never use.
The server should not, in this case, send user-specific data under the old-broken cipher until it receives the client finished.
Of course, this could be worked around by having a nice whitelist of ciphers, or possibly other designs.
I am mainly pointing out that we need to be careful that the guarantees for 0.5-RTT seem to be strictly weaker than that for 1-RTT.


> ​One useful feature of client's finished is to catch 0-RTT replays. But even then I am not sure what damage can be done to the 0.5 data. Either the attacker knows the client's keying material (say PSK) and can generate the client finished by himself or he doesn't know that keying material but then it cannot decrypt 0.5 data.

Right, this is the other concern. Suppose a passive adversary records a clients 0-RTT data (under a PSK that is bound to an authenticated client).
He can then go home and replay this 0-RTT request as many times as he wants and record the server’s 0.5-RTT responses. 
They will be encrypted, sure, but maybe even the length of those responses may give the attacker useful dynamic information (e.g. he can tell whether the user’s bank balance went up or down by a digit). 

Yes, this attack is always possible for a persistent passive adversary, and we can mitigate it with length-hiding techniques, but it gives us an example of how 0.5-RTT may provide new avenues for attacking encrypted connections.

Best,
Karthik


> 
> Am I missing something on these particular points?
> 
> 
> 
>        On the whole, cryptographers including the authors of OPTLS would be happier with 0.5-RTT keys
>        not being the same as 1-RTT keys. Again, so far, this is a matter of taste and proof modularity.
>  
> 
> ​Agreed.
> 
> Hugo
>  
> ​
> 
> 
> > On 23 Feb 2016, at 11:27, Martin Thomson <martin.thomson@gmail.com <mailto:martin.thomson@gmail.com>> wrote:
> >
> > Karthik raised some concerns here, and I think that we have some
> > thinking to do.  But I don't think that it is intractable, nor even
> > hard, to reason about this problem.
> >
> > The only thing that the client's second flight provides is
> > authentication.  The Finished isn't needed if there is no client auth
> > [P].  Hugo's presentation at TRON did not include a client Finished in
> > the earlier, simpler examples.
> >
> > Thus, based on Watson's observation that the client authentication is
> > removable, we might conclude that the handshake is complete from the
> > perspective of a server that does not require client authentication.
> > There are still reasons we might like to keep the client
> > authentication in the handshake, but those are decisions we can make
> > on engineering grounds.
> >
> > If post-handshake client authentication is OK, then 0.5 RTT is equally
> > OK [X].  I would assert that any decision about changing keys after
> > the client Finished applies to post-handshake client auth (or vice
> > versa).
> >
> > If that logic is sound, then I see no reason we can't have some very
> > simple advice:
> >
> >  1. if the server does not request client authentication, it can send
> > application data immediately following its Finished
> >
> >  2. if the server requests client authentication, it MUST NOT send
> > application data until it receives and validates the client's first
> > flight.  UNLESS the server is certain that the data it sends does not
> > depend on the client's identity (that is, it would send this
> > application data to anyone).
> >
> >> From an API perspective, I believe that we should recommend that there
> > be a separate function for sending in condition 2, just as we are
> > going to recommend that there is a separate function for sending 0-RTT
> > data (as well as there being one to receive on the server end).
> >
> > Based on this, we should recommend different points in time for the
> > server API to report that the handshake is "complete" at a server.  In
> > condition 1, the handshake is complete after the server Finished is
> > sent; in condition 2, the handshake is complete after the client
> > Finished is received.
> >
> >
> > [P] Note that a client Finished does confirm a PSK.  Though you might
> > reasonably argue that successfully generating valid application data
> > works equally well in that regard.
> > [X] Post-handshake client authentication has only been analyzed very
> > lightly, so we have to caveat that statement too.
> >
> > _______________________________________________
> > TLS mailing list
> > TLS@ietf.org <mailto:TLS@ietf.org>
> > https://www.ietf.org/mailman/listinfo/tls <https://www.ietf.org/mailman/listinfo/tls>
> 
> _______________________________________________
> TLS mailing list
> TLS@ietf.org <mailto:TLS@ietf.org>
> https://www.ietf.org/mailman/listinfo/tls <https://www.ietf.org/mailman/listinfo/tls>