Re: [TLS] Refactoring client auth/re-key

Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Sun, 19 October 2014 08:15 UTC

Return-Path: <ilari.liusvaara@elisanet.fi>
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 DEEB31A0037 for <tls@ietfa.amsl.com>; Sun, 19 Oct 2014 01:15:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, 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 Gv9XYtLOugbe for <tls@ietfa.amsl.com>; Sun, 19 Oct 2014 01:15:56 -0700 (PDT)
Received: from emh07.mail.saunalahti.fi (emh07.mail.saunalahti.fi [62.142.5.117]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A51B71A002D for <tls@ietf.org>; Sun, 19 Oct 2014 01:15:55 -0700 (PDT)
Received: from LK-Perkele-VII (a88-112-44-140.elisa-laajakaista.fi [88.112.44.140]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id A92EC3FCB; Sun, 19 Oct 2014 11:15:52 +0300 (EEST)
Date: Sun, 19 Oct 2014 11:15:52 +0300
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: Karthikeyan Bhargavan <karthikeyan.bhargavan@inria.fr>
Message-ID: <20141019081551.GA12098@LK-Perkele-VII>
References: <CABcZeBOdpK_JEH4EwnsoTA8Rje5pS5CtSbFGh8rHQzse92m9Wg@mail.gmail.com> <CACsn0cmYs8TMeKcTvqxv1DUGizcp5k7uo86muoqYbGRH4xDQHA@mail.gmail.com> <CABcZeBMxw3Oz1U-6GeTAuUJ1bZbBYhRWsQgscrHFLcTHh=_H1g@mail.gmail.com> <94F22FB7-ACA4-407C-8528-E806DFA64F54@inria.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <94F22FB7-ACA4-407C-8528-E806DFA64F54@inria.fr>
User-Agent: Mutt/1.5.23 (2014-03-12)
Sender: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/9y_5Sylj_YL4L7tzvC8D7F1nL3w
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Refactoring client auth/re-key
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: Sun, 19 Oct 2014 08:15:58 -0000

On Sun, Oct 19, 2014 at 08:57:25AM +0200, Karthikeyan Bhargavan wrote:
> 
> One may argue that the client and server authenticated identities
> (Certificates) do not need to be included in the session hash. This
> would be true for the initial handshake, but not for resumption. One
> use of the TLS 1.2 master secret is as a key for session resumption,
> and the Triple Handshake attack relies on the master secret not being
> bound to the peer’s identity. 

I think this is just wrong. And if it was true, you would have much
much worse problems.


- To defeat the renego fix, you need finished collision.
- To get finished collision, you need MS collision.
- MS collision is already damaging in itself.

If kex is passive-attack secure, MS hashes in kex parameters, exchange
keys, nonces (only needs to be unique across exchange key
offered) and kex result: Then MS collision impiles that kex
parameters, exchange keys and nonces are the same (kex result will be
the same too).

But since kex is passive-attack secure, MS will be unknowable for the
attacker, and any tampering will make handshake fail.

Now, for non-PFS key exchanges, certificates can contain exchange keys.
In practicular, RSA kex server certs do contain exchange key. And
thus under "hash exchange keys", you need to hash it.


In fact, one wants slightly stronger property: Each and every full
handshake computes a fresh MS never before seen, even if peer is
maliscous. But hashing the stuff listed above is sufficient for that,
because each (exchange key, nonce) pair from honest peers will be
unique, forcing the MS computed by those to be different (what
MS maliscous endpoints compute is no consideration).


The reason why one wants to also hash the crypto negotiation is to
avoid downgrade attacks.



-Ilari