Re: [TLS] Proposed text for removing renegotiation

Watson Ladd <watsonbladd@gmail.com> Fri, 13 June 2014 11:34 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 59D4B1B283F for <tls@ietfa.amsl.com>; Fri, 13 Jun 2014 04:34:32 -0700 (PDT)
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 WY3lD-i130wK for <tls@ietfa.amsl.com>; Fri, 13 Jun 2014 04:34:30 -0700 (PDT)
Received: from mail-yk0-x231.google.com (mail-yk0-x231.google.com [IPv6:2607:f8b0:4002:c07::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0FDBF1A0340 for <tls@ietf.org>; Fri, 13 Jun 2014 04:34:30 -0700 (PDT)
Received: by mail-yk0-f177.google.com with SMTP id 10so1906172ykt.8 for <tls@ietf.org>; Fri, 13 Jun 2014 04:34:29 -0700 (PDT)
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; bh=Z3IzV+yN4IU/Ha+HEywh3anp8a5FsgaB3r0FHx1r3l8=; b=qVXJiPINOwj/Xum0mnHdUG1zyDcIZCrNa+kj10fATmky7c5C9bFJjwF5cghJ81Vj8w rOkh9XZv4vR7qvabBeyRyqVm+iQ2bMG9kGonqkfHREOqFUwBkOE11ZdraynwXre6UEPn zhT9u6tJ639a8Zuxof25Xqg7KP6vWGxoiEEtQH+grGscOelhJEIUQhV75YUAxVVh26xY VX/m6Anmb5uvbx+FWVuLb8jhFRMmxboAXkSj8e9EJ59mnvjA+PKfA25sooW7PS3X1j12 8wzDSV/BBHb4+CDMrQHH6edt39ok2w6IlmjbSVvt9ACV/GBIXChdFSRL2agR3I2oKcRh 03vg==
MIME-Version: 1.0
X-Received: by 10.236.15.133 with SMTP id f5mr3383863yhf.63.1402659269277; Fri, 13 Jun 2014 04:34:29 -0700 (PDT)
Received: by 10.170.39.136 with HTTP; Fri, 13 Jun 2014 04:34:29 -0700 (PDT)
In-Reply-To: <1402648977.6191.36.camel@dhcp-2-127.brq.redhat.com>
References: <CAFewVt65X1V6=A_HP_pcg=6nXNVFLxQmSsPB2rq1KvmGPRz+og@mail.gmail.com> <20140606223045.3B5AF1AD46@ld9781.wdf.sap.corp> <CACsn0cmcc6kXvOuqkZaDj7+QPdpY9qqQ58bs3s-JBGXdNJSZyw@mail.gmail.com> <CABcZeBPe45BM-uXd7DEBD_BBn=jhk8KkYB=facp+NMb2e4nBiw@mail.gmail.com> <1402299260.2427.2.camel@dhcp-2-127.brq.redhat.com> <CABkgnnX5+fXNDy1o7Pu60rp8vSx7XfKbt337e_q=+3fb8fXHJw@mail.gmail.com> <1402388399.2369.5.camel@dhcp-2-127.brq.redhat.com> <CACsn0cm5OzzjOh5nSXcu-cx+ZYFeJiJ5eGvgwjsWPUeX4ozz2g@mail.gmail.com> <1402476304.2305.8.camel@dhcp-2-127.brq.redhat.com> <CACsn0cmM4KpMgwXo0iTygsQ+En6N3J46jPY-Q3hfwzqG431M1w@mail.gmail.com> <1402648977.6191.36.camel@dhcp-2-127.brq.redhat.com>
Date: Fri, 13 Jun 2014 08:34:29 -0300
Message-ID: <CACsn0ck6OxPm8BwuNeAn+wpayaefkAzZtiyjkaQ1sB_4hp0C_Q@mail.gmail.com>
From: Watson Ladd <watsonbladd@gmail.com>
To: Nikos Mavrogiannopoulos <nmav@redhat.com>
Content-Type: text/plain; charset=UTF-8
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/figx0KV83cdlbqLLCvebhoF0GA0
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Proposed text for removing renegotiation
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: Fri, 13 Jun 2014 11:34:32 -0000

On Fri, Jun 13, 2014 at 5:42 AM, Nikos Mavrogiannopoulos
<nmav@redhat.com> wrote:
> On Wed, 2014-06-11 at 08:45 -0300, Watson Ladd wrote:
>> >> Quick: what is the proper response when the Certificate changes
>> >> between a negotiation and a renegotiation?
>> >
>> > That is on the application protocol to decide.
>> Always the wrong answer: we know more then the application layer
>> people do about security, just as the networking people know more than
>> we do about sending packets through the network.
>
> Sorry, but I don't believe you understand the issue. Authentication is
> to the application layer to decide. The secure transport protocol cannot
> know or guess when and if authentication is desired by the upper
> protocols. TLS should determine the algorithms and the methods, but the
> upper protocols should set the timing and the allowed combinations. It
> may be very legitimate to switch my user-certificate to access a
> different web page; that cannot be mandated by TLS.

Sure, but then we should make clear that the upper-level protocol
should control when renegotiation happens.

Right now it's a free-for-all: you can change the authentication state
repeatedly in the course of reading a request.
As a result, when the application checks what the authentication state
is there is a TOCTOU problem.

The renegotiation fix kind of solves this problem: it takes data from
the first connection and links it to the second.
>
>> >> What is the relation between the two connections? Can there ever be
>> >> sensible semantics for this?
>> >> Renegotiation makes reads block on writes, a problem for all
>> >> event-based systems. Exposing renegotiation to application level code
>> >> is hard.
>> > It has been done already, and not only once. Could you provide evidence
>> > of this hardness that you claim?
>> Where has this been done?
>
> I'd suggest you to check existing TLS implementations, or read the
> discussion in the triple handshake paper (section II).
>
>> As for the hardness, most applications expect a stream of bytes.
>> Renegotation is OOB data.
>
> What is the issue with that?

The issue is the following: most applications do something like this
parse_request(conn)
check_if_request_authorized(conn)

This assumes that the authentication state doesn't change in between
the two lines, or midway through the parse.
With renegotiation it can.

Furthermore, renegotiation makes writes block on reads. That can cause
pain for event based systems.
>
>> >> Show me a formalization of renegotiation semantics, and I might be
>> >> convinced otherwise.
>> > I think it is up to the one proposing the change to provide evidence of
>> > the contrary and there has been none so far. Otherwise we do things like
>> > prove me TLS secure  combination or we drop it completely. Formal models
>> > lag behind protocols.
>> You guessed what the next email from me when EKR posted his draft was
>> going to say. Since miTLS finished up this has been a reasonable
>> position: TLS 1.2 has fairly well understood security, so TLS 1.3
>> should be better, not worse. Or do you think that three attacks in
>> three years is acceptable?
>
> I don't think anyone would disagree with what you say here. But you are
> avoiding to reply to the point. Was the new proposal you endorse proven
> secure, or do we replace the old method, -that you claim is insecure-
> with yet another method that will be proven insecure in few years?

What new proposal have I endorsed? No, you do the work to show your
protocol is secure.
Up until now, we haven't, and users have paid the price.

(If we eliminate renegotation, clearly this cannot be less secure. If
we add key rotation, assuming we do it sanely, there is fairly clearly
not a problem.)

>
>> Where is the usecase that needs renegotiation in TLS 1.3? I've not
>> seen it: we've provided alternatives for all of them.
>
> I don't buy the we have provided alternatives for all of them, because
> you fail to show the issue that is so grave that requires throwing out
> renegotiation, and re-inventing it.
>
>>  Why do you care
>> what we do to provide an easy protocol to analyze? If there is a case
>> for keeping renegotation, make it:
>
> Sorry, protocol design doesn't work like that. If you want to change or
> remove something, you need to make a case for that, and it is up to you
> to make solid arguments. Making a change an basing it on arguments like,
> (1) everyone knows that, (2) this paper supports my opinion -but it
> doesn't-, doesn't give any credibility to your proposal.
>
> Maybe you are right, but unless you make your case with solid arguments,
> you haven't convinced me.
>
>> >> But to say that it is
>> >> "not complex" belies the experience of implementors, theorists, and
>> >> the past 17 years of security
>> > It's good to know that you are representing them. Could you share your
>> > experience with implementing or modeling TLS? Or at least cite some
>> > document that backs up the claims that you make.
>> Let's see: there's the discussion in the Triple Handshake paper of how
>> applications respond to these changes,
>
> Which changes do you refer to, and which discussion. The paper as I read
> it, makes no claims that renegotiation is overly complex or cannot be
> modeled. On the contrary, it is mentioned that it is already modeled in
> mitls.
>
>>  the previous renegotiation bug,
>
> It was addressed long time ago.

I don't think you understand the point I'm trying to make: it's not
that I can sit down and make an attack taking advantage of
renegotation. It's that renegotation is so complex that applications
don't understand how to use it, and so it's very difficult to ensure
that we've provided the right semantics, and hard to determine how
implementations should deal with it.

With the Finished message it's a different issue: analyzing with
Finished is a pain, because the master-secret gets used as is.

With the core handshake it's a third issue: the standard key agreement
semantics have never been provided, and they should be.

I don't care too much about renegotiation: the handshake fixes,
maintaining the security of the new handshakes, and fixing the
finished message are more important.

>
>> virtually every paper on the TLS handshake until miTLS, etc. Can you
>> point to someone providing an adequate explanation of what
>> renegotation does?
>
> This is not a citation, you could replace it with "everyone knows that".
> If you really have a point, because it is not of your own experience,
> please cite it properly.

Go to eprint.iacr.org. Search TLS:
http://eprint.iacr.org/2013/339.pdf "we do not model renegotation/resumption"
http://eprint.iacr.org/2012/630.pdf Analyzes the renegotation fix, a
full 3 years after the fix was proposed and adopted, and TLS does not
meet strongest security model.
http://eprint.iacr.org/2014/020.pdf Renegotation isn't mentioned.

I did skip over a few papers but the message is clear: renegotiation
is not currently amenable to analysis.

Sincerely,
Watson Ladd

>
> regards,
> Nikos
>
>



-- 
"Those who would give up Essential Liberty to purchase a little
Temporary Safety deserve neither  Liberty nor Safety."
-- Benjamin Franklin