[Cfrg] Fwd: Hash-Based Key Derivation

David Wagner <daw@cs.berkeley.edu> Tue, 25 October 2005 23:17 UTC

Received: from localhost.localdomain ([127.0.0.1] helo=megatron.ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1EUY37-000623-4d; Tue, 25 Oct 2005 19:17:45 -0400
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1EUY34-00060n-4b for cfrg@megatron.ietf.org; Tue, 25 Oct 2005 19:17:43 -0400
Received: from ietf-mx.ietf.org (ietf-mx [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id TAA01441 for <cfrg@ietf.org>; Tue, 25 Oct 2005 19:17:27 -0400 (EDT)
Received: from taverner.cs.berkeley.edu ([128.32.168.222]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1EUYG5-0000qM-R4 for cfrg@ietf.org; Tue, 25 Oct 2005 19:31:10 -0400
Received: from taverner.CS.Berkeley.EDU (localhost.localdomain [127.0.0.1]) by taverner.CS.Berkeley.EDU (8.13.1/8.13.1) with ESMTP id j9PNHS8L024404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Oct 2005 16:17:28 -0700
Received: (from daw@localhost) by taverner.CS.Berkeley.EDU (8.13.1/8.13.1/Submit) id j9PNHSRZ024400; Tue, 25 Oct 2005 16:17:28 -0700
From: David Wagner <daw@cs.berkeley.edu>
Message-Id: <200510252317.j9PNHSRZ024400@taverner.CS.Berkeley.EDU>
Subject: [Cfrg] Fwd: Hash-Based Key Derivation
To: cfrg@ietf.org
Date: Tue, 25 Oct 2005 16:17:28 -0700
Secret-Bounce-Tag: 9a029cbee41caf2ca77a77efa3c13981
X-Mailer: ELM [version 2.5 PL6]
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 8b30eb7682a596edff707698f4a80f7d
Content-Transfer-Encoding: 7bit
X-BeenThere: cfrg@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: David Wagner <daw-usenet@taverner.CS.Berkeley.EDU>
List-Id: Crypto Forum Research Group <cfrg.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:cfrg@ietf.org>
List-Help: <mailto:cfrg-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@ietf.org?subject=subscribe>
Sender: cfrg-bounces@ietf.org
Errors-To: cfrg-bounces@ietf.org

Dan Brown writes:
>Let H be a collision-resistant hash.
>
>Let D be an adversary that defines a distribution S, efficiently 
>sampleable, with some requisite level of min-entropy, such that D has a 
>signficant advantage of distinguishing H(s) from random R, where s is 
>drawn from S and R is a random bit string of the same length as R.
>
>Use D in algorithm C that finds a collision in H faster than expected, [..]

Unfortunately, this proof doesn't really prove anything.  The flaw
in the proof is that you failed to account for the time to generate
samples from S.  Consequently, while D might find a collision, it won't
necessarily be any faster than expected.

Let's take an example.  Suppose S is a source that repeatedly picks
a random 256-bit string x until it finds one with H(x) having its low
bit zero, then outputs x.  Then your construction leads to a totally
insecure way of generating a pseudorandom key: the output of your
construction will always have its low bit zero, and thus will be
trivially distinguishable from uniform random.  Does C find a collision
faster than expected?  No, it doesn't.  It halves the number of values
you need from S, but each output from S takes two hash computations
(on average), so everything equals out and there is no contradiction
to the security of H.

Here's another example.  Suppose H(x) = 0^256 || SHA256(x).  Then H
is collision-resistant, but it's output is useless for generating keys,
since these keys will not be pseudrorandom.

Bottom line: Even if H is collision-resistant, this construction may
be insecure for some choices of S, specifically S isn't independent of
H.  Collision resistance alone does not suffice to ensure that this
hashing will yield secure keys.

Notice how the random oracle model that I described avoids this problem.
In my formulation, the source S does not depend on the random oracle:
the distribution on S is chosen before the random oracle is chosen, and
consequently you cannot have these bad interactions.

_______________________________________________
Cfrg mailing list
Cfrg@ietf.org
https://www1.ietf.org/mailman/listinfo/cfrg