Re: [Cfrg] TLS PRF security proof?

Andy Lutomirski <luto@amacapital.net> Wed, 09 July 2014 15:33 UTC

Return-Path: <luto@amacapital.net>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 06FFE1A0AF9 for <cfrg@ietfa.amsl.com>; Wed, 9 Jul 2014 08:33:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.979
X-Spam-Level:
X-Spam-Status: No, score=-1.979 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-0.7, 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 Aa2u96lleJA9 for <cfrg@ietfa.amsl.com>; Wed, 9 Jul 2014 08:33:51 -0700 (PDT)
Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E4E931A0AF7 for <cfrg@irtf.org>; Wed, 9 Jul 2014 08:33:50 -0700 (PDT)
Received: by mail-lb0-f170.google.com with SMTP id 10so5187398lbg.15 for <cfrg@irtf.org>; Wed, 09 Jul 2014 08:33:48 -0700 (PDT)
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=w97fU/kswu7jD9gniNGyJwx/ScHEz5w0k1UQCh9cArQ=; b=DjJUpbET6Nmy0l8jsJ6krxSl65wRSDj7eRoYe+rqBG7QdmWMyUwskfkjDLH+FaSHua u4uTffNiSoHaopWTf9393Uv7GMTTBxbyqff7CdqhudV++yT55OyIOcYMzsuHuFsVIfu1 6Udjrt3CbHBtQJPawB6L1nUqtp3umgFaApe8cFP0RVdcxBDzvIQr9M8F/YaVs2fza3QO 9yqdwPPmwNXZQ0UtdWs6d74Fe4WaoerC7U7o20/Qvi0dJgaIKag0OU7MvMUNZ1wab8Qx IBKC8hx0XOb/io6gwelvMangoHtGwFbXjN62634G5TaifktkOHvwlu5jXu9rOrgVLrku gTqQ==
X-Gm-Message-State: ALoCoQk0nnS1D0ncH3dZ9i8FaIgpHfl75ciaEngtiUDC+HduhvlKqNRrraDwjNHCzNxHcYViJueh
X-Received: by 10.152.206.11 with SMTP id lk11mr2277468lac.72.1404920028678; Wed, 09 Jul 2014 08:33:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.152.108.130 with HTTP; Wed, 9 Jul 2014 08:33:27 -0700 (PDT)
In-Reply-To: <6A60ED12-70B4-4CBF-B31E-3D5DDA7DC7EA@vpnc.org>
References: <20140709125829.22319253.16811.16396@certicom.com> <CALCETrVG9Ltf=9x64mOScorLCUPZNtr1XF6rkfpgzT2GDiwi+g@mail.gmail.com> <6A60ED12-70B4-4CBF-B31E-3D5DDA7DC7EA@vpnc.org>
From: Andy Lutomirski <luto@amacapital.net>
Date: Wed, 09 Jul 2014 08:33:27 -0700
Message-ID: <CALCETrXMZZVbF3tzZm0PfuKQ0h8mUoj7XcWgcJMNMgTuEp1+dg@mail.gmail.com>
To: Paul Hoffman <paul.hoffman@vpnc.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/cfrg/MzcLjbd_BTzjMNXS-a-azswfpaU
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] TLS PRF security proof?
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <http://www.irtf.org/mail-archive/web/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <http://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Jul 2014 15:33:53 -0000

On Wed, Jul 9, 2014 at 8:28 AM, Paul Hoffman <paul.hoffman@vpnc.org> wrote:
> On Jul 9, 2014, at 8:18 AM, Andy Lutomirski <luto@amacapital.net> wrote:
>
>> I can't speak for the TLS WG, but from my own perspective, I have
>> three problems with HDKF:
>>
>> 1. HKDF is parametrized by a hash.  What hash should people use?
>
> Any one that has no known weakening of preimage resistance. That is: nearly any of them.
>
>> (Hence my suggestion of using combiners -- changing the PRF in an
>> existing protocol is a real PITA and might not even be possible
>> without introducing security holes.)
>
> Adding more choices makes interoperability less likely. In real-world protocols, excellent interoperability with almost-perfect security is *much* better than good interoperability with perfect security.
>
>> 2. The RFC didn't make the security properties clear to me.  For
>> example, protocols should stick nonces into the salt.  Oh, wait, they
>> shouldn't stick nonces into the salt without care.
>
> Can you justify that second sentence with anything from RFC 5869? In fact, it says the opposite:
>
>    Ideally, the salt value is a random (or pseudorandom) string of the
>    length HashLen.  Yet, even a salt value of less quality (shorter in
>    size or with limited entropy) may still make a significant
>    contribution to the security of the output keying material; designers
>    of applications are therefore encouraged to provide salt values to
>    HKDF if such values can be obtained by the application.

Quoting from RFC 5869, section 3.4:

   Independence is also an important aspect of the salt value provided
   to a KDF.  While there is no need to keep the salt secret, and the
   same salt value can be used with multiple IKM values, it is assumed
   that salt values are independent of the input keying material.  In
   particular, an application needs to make sure that salt values are
   not chosen or manipulated by an attacker.  As an example, consider
   the case (as in IKE) where the salt is derived from nonces supplied
   by the parties in a key exchange protocol.  Before the protocol can
   use such salt to derive keys, it needs to make sure that these nonces
   are authenticated as coming from the legitimate parties rather than
   selected by the attacker (in IKE, for example this authentication is
   an integral part of the authenticated Diffie-Hellman exchange).


>
>> Can I use multiple
>> "info" values to safely extract key material and publish it?
>
> Yes. Can you point at something in the RFC that indicates any different?

No, but it wasn't clear to me that this property was guaranteed.

>
>> 3. (Only relevant to hashes using MD construction) My understanding of
>> HMAC is that it's secure against generic attacks on MD hashes if the
>> key is secret and unpredictable.  HKDF doesn't necessarily use a
>> secret, unpredictable key for HMAC.  Is HKDF-SHA-1 insecure as a
>> result?  What about HKDF-SHA-512 against an adversary with unlimited
>> precomputation power?
>
> For the discussion at hand, the key is secret and unpredictable.

I believe this, but I'd like to imagine that we've reached the point
where we don't need weird hacks (i.e. HMAC) and overcomplicated
analysis to work around the generic weaknesses of old hashes.  Oh,
well -- this is more of an aesthetic issue than a security issue.

--Andy