
From mcgrew@cisco.com  Mon Oct 19 10:45:11 2009
Return-Path: <mcgrew@cisco.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 7171D28C151 for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 10:45:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level: 
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1kJp0dU0WwjX for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 10:45:10 -0700 (PDT)
Received: from sj-iport-1.cisco.com (sj-iport-1.cisco.com [171.71.176.70]) by core3.amsl.com (Postfix) with ESMTP id 9773D28C158 for <cfrg@irtf.org>; Mon, 19 Oct 2009 10:45:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=mcgrew@cisco.com; l=3406; q=dns/txt; s=sjiport01001; t=1255974318; x=1257183918; h=from:sender:reply-to:subject:date:message-id:to:cc: mime-version:content-transfer-encoding:content-id: content-description:resent-date:resent-from:resent-sender: resent-to:resent-cc:resent-message-id:in-reply-to: references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; z=From:=20David=20McGrew=20<mcgrew@cisco.com>|Subject:=20s oliciting=20feedback=20on=20HKDF|Date:=20Mon,=2019=20Oct =202009=2010:45:15=20-0700|Message-Id:=20<2BDAD1BB-A200-4 B35-809A-FC0F0385F9D7@cisco.com>|To:=20cfrg@irtf.org|Cc: =20Tim=20Polk=20<tim.polk@nist.gov>,=20Hugo=20Krawczyk=20 <hugo@ee.technion.ac.il>,=0D=0A=20=20=20=20=20=20=20=20"P asi.Eronen@nokia.com=20Eronen"=20<Pasi.Eronen@nokia.com> |Mime-Version:=201.0=20(Apple=20Message=20framework=20v93 6); bh=eHVi66edMsDPt0Yj78isQEgJh59UIY/Mze83hBQZaRA=; b=wPlLLtsTAiRNa8mGT0KJyziJBiuYSmf8FA4i4ekzkuJH3Rhu3/p0Q6gz HRNwxHu5R/veFnbAbJiiTmmaqo7D1uKDIUw3G5gtP4Ww7TRCQNNazaQnP l8547jf8mOqWTh6wf8r/Tk0x0GrQzrcO2cgTghAHqcusUhJxLQlYZGA1/ 4=;
Authentication-Results: sj-iport-1.cisco.com; dkim=neutral (message not signed) header.i=none
X-Files: smime.p7s : 1760
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApoEALdC3EqrR7H+/2dsb2JhbADEP5Z9hDEE
X-IronPort-AV: E=Sophos;i="4.44,586,1249257600";  d="p7s'?scan'208";a="258067891"
Received: from sj-core-2.cisco.com ([171.71.177.254]) by sj-iport-1.cisco.com with ESMTP; 19 Oct 2009 17:45:17 +0000
Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-2.cisco.com (8.13.8/8.14.3) with ESMTP id n9JHjHMa012669; Mon, 19 Oct 2009 17:45:17 GMT
Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Mon, 19 Oct 2009 10:45:17 -0700
Received: from stealth-10-32-254-212.cisco.com ([10.32.254.212]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Mon, 19 Oct 2009 10:45:17 -0700
Message-Id: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com>
From: David McGrew <mcgrew@cisco.com>
To: cfrg@irtf.org
Content-Type: multipart/signed; boundary=Apple-Mail-42-641725121; micalg=sha1; protocol="application/pkcs7-signature"
Mime-Version: 1.0 (Apple Message framework v936)
Date: Mon, 19 Oct 2009 10:45:15 -0700
X-Mailer: Apple Mail (2.936)
X-OriginalArrivalTime: 19 Oct 2009 17:45:17.0409 (UTC) FILETIME=[EB9B1D10:01CA50E3]
Cc: Tim Polk <tim.polk@nist.gov>, "Pasi.Eronen@nokia.com Eronen" <Pasi.Eronen@nokia.com>, Hugo Krawczyk <hugo@ee.technion.ac.il>
Subject: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Mon, 19 Oct 2009 17:45:11 -0000

--Apple-Mail-42-641725121
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

Hello,

HMAC-based Extract-and-Expand Key Derivation Function (HKDF), http://tools.ietf.org/html/draft-krawczyk-hkdf-00 
, specifies a key derivation function that is intended to be used in a  
wide variety of applications.   This draft provides a detailed  
proposal along the lines of what Hugo presented to the IETF Security  
Area at IETF 74.   If you have an interest in the design and/or use of  
this KDF, please provide your feedback to the CFRG list.

It would be ideal to have feedback by November 8, so that it can be  
considered at the upcoming IETF meeting.  However, comments are  
welcome at any time.

David



--Apple-Mail-42-641725121
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDnjCCA5ow
ggKCoAMCAQICAWQwCwYJKoZIhvcNAQEFMG0xFTAT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PQSAa7m2ZLMUvKNIZMxweMkEUorhKNuL6yFpKUm8rj12D0eIyp6pB6g4kM+9u9NiOkEkPRaIM
wjYY7EXxrsN0ytQWuvFCtExIbVbSTehQqW706G1qx2v1FSsNN5pRmRd60b8AAAAAAAA=

--Apple-Mail-42-641725121--

From simon@josefsson.org  Mon Oct 19 11:06:09 2009
Return-Path: <simon@josefsson.org>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 9C83228C0F5 for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 11:06:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z-VyRzLnqcvj for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 11:06:08 -0700 (PDT)
Received: from yxa-v.extundo.com (yxa-v.extundo.com [83.241.177.39]) by core3.amsl.com (Postfix) with ESMTP id 5DEBF28C0E8 for <cfrg@irtf.org>; Mon, 19 Oct 2009 11:06:07 -0700 (PDT)
Received: from mocca.josefsson.org (c80-216-24-211.bredband.comhem.se [80.216.24.211]) (authenticated bits=0) by yxa-v.extundo.com (8.14.3/8.14.3/Debian-5) with ESMTP id n9JI66bj010534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 19 Oct 2009 20:06:08 +0200
From: Simon Josefsson <simon@josefsson.org>
To: David McGrew <mcgrew@cisco.com>
References: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com>
OpenPGP: id=B565716F; url=http://josefsson.org/key.txt
X-Hashcash: 1:22:091019:cfrg@irtf.org::lACIYdaWhMaOugnE:1HGn
X-Hashcash: 1:22:091019:tim.polk@nist.gov::keYFq9tzadB0T1ba:3N24
X-Hashcash: 1:22:091019:mcgrew@cisco.com::RuNe5kdfvjWzJw1d:HMTQ
X-Hashcash: 1:22:091019:pasi.eronen@nokia.com::jIdd9C2ak/azGZT/:5jij
X-Hashcash: 1:22:091019:hugo@ee.technion.ac.il::7YBCdMyAoBDA4vMK:9ZsE
Date: Mon, 19 Oct 2009 20:06:06 +0200
In-Reply-To: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com> (David McGrew's message of "Mon, 19 Oct 2009 10:45:15 -0700")
Message-ID: <87iqebl0mp.fsf@mocca.josefsson.org>
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: clamav-milter 0.95.2 at yxa-v
X-Virus-Status: Clean
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Mon, 19 Oct 2009 18:06:09 -0000

I believe this is a useful document, nice work!

There is one part which appears (intentionally) underspecified that I
fear may lead to a sub-optimal deployment scenario.  The document says:

4. Applications of HKDF
...
   One significant example is the derivation of cryptographic
   keys from a source of low entropy such as a user's password.
   ...
   Therefore, PBKDF
   applications interested in adapting HKDF to their setting can either
   replace the extract step with an intentional slow-down mechanism
   (e.g., applying repeated hashing) or can use both the extract and
   expand mechanism of HKDF with a slowing-down mechanism applied after
   the extract step and before expansion.

If implementers take this suggestion literally, there is a risk that we
will end up with more than one HKDF-derived password-based KDF with
slightly different properties.

We already have one standardized PBKDF: PKCS#5 PBKDF2 from RFC 2898.  It
is close in spirit to the HKDF.

Q: Does the PBKDF2 have some sub-optimal property that suggests we need
to consider replacements?

If there is not (I am not aware of any reason), I suggest the HKDF
document should recommend applications that are interested in a PBKDF to
look at RFC 2898 PBKDF2 rather than suggesting to invent something based
on HKDF.

The alternative would be to specify a "standard" password-based HKDF
function in the the HKDF document that also takes an iteration count to
burn some cycles.

Given that PKCS#5 PBKDF is already deployed in several protocols, I
believe we need a good rationale for introducing another PBKDF at this
point.

FWIW, understanding if there is any problem with the PBKDF2 would be
useful in the context of the upcoming SCRAM-SHA-1 SASL mechanism too.

Thanks,
/Simon

From dharkins@lounge.org  Mon Oct 19 16:36:37 2009
Return-Path: <dharkins@lounge.org>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id DEC403A69CC for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 16:36:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.265
X-Spam-Level: 
X-Spam-Status: No, score=-6.265 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BJTV6oUQloU9 for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 16:36:37 -0700 (PDT)
Received: from colo.trepanning.net (colo.trepanning.net [69.55.226.174]) by core3.amsl.com (Postfix) with ESMTP id 16F0F3A695C for <cfrg@irtf.org>; Mon, 19 Oct 2009 16:36:37 -0700 (PDT)
Received: from www.trepanning.net (localhost [127.0.0.1]) by colo.trepanning.net (Postfix) with ESMTP id DD7ADA888116; Mon, 19 Oct 2009 16:36:43 -0700 (PDT)
Received: from 69.12.173.8 (SquirrelMail authenticated user dharkins@lounge.org) by www.trepanning.net with HTTP; Mon, 19 Oct 2009 16:36:44 -0700 (PDT)
Message-ID: <d73220f6996fcacb990df658e5f2f603.squirrel@www.trepanning.net>
In-Reply-To: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com>
References: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com>
Date: Mon, 19 Oct 2009 16:36:44 -0700 (PDT)
From: "Dan Harkins" <dharkins@lounge.org>
To: "David McGrew" <mcgrew@cisco.com>
User-Agent: SquirrelMail/1.4.14 [SVN]
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
Cc: Tim Polk <tim.polk@nist.gov>, cfrg@irtf.org, Hugo Krawczyk <hugo@ee.technion.ac.il>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Mon, 19 Oct 2009 23:36:37 -0000

  Hello,

  A very nice I-D and I think HKDF will be a valuable building
block for protocol designers.

  First a (drawn-out) question:

  The HKDF-extract function uses HMAC-hash, a keyed pseudo-random
function (PRF) that represents a family of mappings, one for each
key, of (a double invocation of) "hash". HKDF uses an optional "salt"
as the key to this PRF. When the salt is not given a number of zeros
equal to the block size of "hash" is used. Also, a given "salt" can
be reused across multiple invocations of HKDF. Which means the PRF is
being reduced to a single mapping from its family of maps. So why use
the PRF construct of HMAC-hash for HKDF-extract()? Unless the "salt"
is mandatory and distinct (and possibly just unpredictable, not
necessarily random) for each invocation of HKDF I don't see the point.

  If there is a benefit to using HMAC-hash with a (possibly) fixed
key over just using "hash", it would be helpful to spell that out
somewhere in the draft. If not, I think it would be simpler to just
use a single function map if that's all that's needed.

  And now a suggestion:

  It would be nice to add to the security considerations a description
of the property that HKDF-extract() has that is useful for concentrating
the entropy of the input key. That would help when people start trying
to instantiate HKDF with different values of "hash". Or, to guide the
hands of people who might not really know what they're doing, consider
creating an IANA registry of specific instantiations of HKDF with
different values of "hash" and specify some kind of "expert review" to
add new values to the registry.

  regards,

  Dan.

On Mon, October 19, 2009 10:45 am, David McGrew wrote:
> Hello,
>
> HMAC-based Extract-and-Expand Key Derivation Function (HKDF),
> http://tools.ietf.org/html/draft-krawczyk-hkdf-00
> , specifies a key derivation function that is intended to be used in a
> wide variety of applications.   This draft provides a detailed
> proposal along the lines of what Hugo presented to the IETF Security
> Area at IETF 74.   If you have an interest in the design and/or use of
> this KDF, please provide your feedback to the CFRG list.
>
> It would be ideal to have feedback by November 8, so that it can be
> considered at the upcoming IETF meeting.  However, comments are
> welcome at any time.
>
> David
>
>
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> http://www.irtf.org/mailman/listinfo/cfrg
>



From zooko@zooko.com  Mon Oct 19 16:46:14 2009
Return-Path: <zooko@zooko.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 7746528C136 for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 16:46:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.11
X-Spam-Level: 
X-Spam-Status: No, score=-1.11 tagged_above=-999 required=5 tests=[BAYES_05=-1.11]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KcDWyl55SXwA for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 16:46:13 -0700 (PDT)
Received: from nooxie.zooko.com (nooxie.zooko.com [207.7.145.200]) by core3.amsl.com (Postfix) with ESMTP id 695A028C185 for <cfrg@irtf.org>; Mon, 19 Oct 2009 16:46:13 -0700 (PDT)
Received: from [192.168.1.118] (97-118-105-53.hlrn.qwest.net [97.118.105.53]) by nooxie.zooko.com (Postfix) with ESMTP id 1D92219D72; Mon, 19 Oct 2009 16:51:05 -0700 (PDT)
In-Reply-To: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com>
References: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com>
Mime-Version: 1.0 (Apple Message framework v753.1)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <F0780F11-22CE-4364-A93C-4D1AD1AE3DB5@zooko.com>
Content-Transfer-Encoding: 7bit
From: Zooko Wilcox-O'Hearn <zooko@zooko.com>
Date: Mon, 19 Oct 2009 17:46:12 -0600
To: David McGrew <mcgrew@cisco.com>
X-Mailer: Apple Mail (2.753.1)
Cc: "Pasi.Eronen@nokia.com Eronen" <Pasi.Eronen@nokia.com>, Tim Polk <tim.polk@nist.gov>, cfrg@irtf.org, Hugo Krawczyk <hugo@ee.technion.ac.il>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Mon, 19 Oct 2009 23:46:14 -0000

Hi there.

We've been considering using HKDF in the Tahoe-LAFS project [1].   
Here are some our notes on the topic: [2, 3, 4, 5]

I have a few questions.

One is, which parts of the security arguments in the full paper  
depend on "any good MAC" and which parts depend specifically on  
HMAC?  The full paper nicely names and cites all the properties that  
its arguments are predicated on, but unfortunately it does not always  
mention whether those properties (are believed to) hold of HMAC  
specifically or of a larger class of algorithms.

Another question is: suppose we want to derive a key which is >= 1  
and < order of an ECDSA group.  Should we use HKDF for the smallest  
number of bytes that are enough, check whether it is < the group  
order, and then if not get more bytes?  Or should we get more bytes  
up to some integral multiple of the group order, divide by that  
integral multiple, and then check whether it is < group order?  Or what?

Another question is: suppose we're doing one of these algorithms  
above, and we want to "get some more bytes" from HKDF . Should we  
just read more bytes, or should we change the INFO field, for example  
changing it to "Try number 2", and then read the first few bytes from  
this new instance?

Another question is: suppose we're doing one of these algorithms, and  
we want to spend more CPU power during the initial key generation in  
order to spend less CPU power during subsequent re-generation of that  
key.  Then could we iteratively pick an IKM, check whether it would  
produce a fitting key (>= 1 and < group order) in a single try, and  
if not start over and pick a different random IKM?

Another question is: should we really include the "extract" step even  
when the IKM is (believed by us) to be high-quality strong crypto  
keys, or should we "optimize out" the extract step and just use the  
expand step in this case?

Thank you very much!

Regards,

Zooko Wilcox-O'Hearn

[1] http://allmydata.com
[2] http://allmydata.org/trac/pycryptopp/ticket/2
[3] http://allmydata.org/pipermail/tahoe-dev/2009-August/002598.html
[4] http://groups.google.com/group/cryptopp-users/msg/01a2620f684a70bd
[5] http://groups.google.com/group/cryptopp-users/browse_thread/ 
thread/f30427601a5884f6

From zooko@zooko.com  Mon Oct 19 20:36:22 2009
Return-Path: <zooko@zooko.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id E6F5B3A6765 for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 20:36:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.855
X-Spam-Level: 
X-Spam-Status: No, score=-1.855 tagged_above=-999 required=5 tests=[AWL=0.745,  BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MoIvhIsdc35Q for <cfrg@core3.amsl.com>; Mon, 19 Oct 2009 20:36:22 -0700 (PDT)
Received: from nooxie.zooko.com (nooxie.zooko.com [207.7.145.200]) by core3.amsl.com (Postfix) with ESMTP id 40BA93A67E2 for <cfrg@irtf.org>; Mon, 19 Oct 2009 20:36:21 -0700 (PDT)
Received: from [192.168.1.118] (97-118-105-53.hlrn.qwest.net [97.118.105.53]) by nooxie.zooko.com (Postfix) with ESMTP id 8BBDF186E2; Mon, 19 Oct 2009 20:41:14 -0700 (PDT)
In-Reply-To: <d73220f6996fcacb990df658e5f2f603.squirrel@www.trepanning.net>
References: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com> <d73220f6996fcacb990df658e5f2f603.squirrel@www.trepanning.net>
Mime-Version: 1.0 (Apple Message framework v753.1)
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <F9E8C515-07F7-4DFE-8E9A-CE3F69699657@zooko.com>
Content-Transfer-Encoding: 7bit
From: Zooko Wilcox-O'Hearn <zooko@zooko.com>
Date: Mon, 19 Oct 2009 21:36:24 -0600
To: "Dan Harkins" <dharkins@lounge.org>
X-Mailer: Apple Mail (2.753.1)
Cc: Tim Polk <tim.polk@nist.gov>, David McGrew <mcgrew@cisco.com>, cfrg@irtf.org, Hugo Krawczyk <hugo@ee.technion.ac.il>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 20 Oct 2009 03:36:23 -0000

On Monday,2009-10-19, at 17:36 , Dan Harkins wrote:

>   A very nice I-D and I think HKDF will be a valuable building  
> block for protocol designers.

I would like to echo this sentiment: in attempting to stringently  
evaluate "Everything that could possibly go wrong" with Tahoe-LAFS's  
crypto design [1], I keep thinking that the KDF is a linchpin  
component in several places.  (The recent revelation of related-key  
issues in AES-256 is one of the reasons to think this.)  Thank you  
for working on the design and standardization of HKDF!

For what it is worth -- I really don't want to start an argument  
about this somewhat tangential issue -- I don't like HMAC-SHA256  
nearly as well as I like Poly1305-AES or Poly1305-Salsa20.  This is  
an unfortunate period in cryptography when there isn't a really good  
secure hash function that we can rely on, and the strong security  
proofs and superior performance of the Carter-Wegman MACs like  
Poly1305 look better to me than the security proofs of HMAC.

Regards,

Zooko Wilcox-O'Hearn

[1] http://allmydata.org/trac/tahoe/wiki/NewCaps/WhatCouldGoWrong

From uri@ll.mit.edu  Tue Oct 20 07:20:14 2009
Return-Path: <uri@ll.mit.edu>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id D31FC3A68BA for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 07:20:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.598
X-Spam-Level: 
X-Spam-Status: No, score=-6.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, UNPARSEABLE_RELAY=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7e1DeFG9Fdfu for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 07:20:13 -0700 (PDT)
Received: from ll.mit.edu (LLMAIL1.LL.MIT.EDU [129.55.12.41]) by core3.amsl.com (Postfix) with ESMTP id 9D3F63A6856 for <cfrg@irtf.org>; Tue, 20 Oct 2009 07:20:13 -0700 (PDT)
Received: (from smtp@localhost) by ll.mit.edu (8.12.10/8.8.8) id n9KEJiNd002036; Tue, 20 Oct 2009 10:19:44 -0400 (EDT)
Received: from lle2k7-hub01.llan.ll.mit.edu(            ), claiming to be "LLE2K7-HUB01.mitll.ad.local" via SMTP by llpost, id smtpdAAAKfaqpq; Tue Oct 20 10:05:18 2009
Received: from LLE2K7-BE01.mitll.ad.local ([            ]) by LLE2K7-HUB01.mitll.ad.local ([            ]) with mapi; Tue, 20 Oct 2009 10:05:18 -0400
From: "Blumenthal, Uri" <uri@ll.mit.edu>
To: "'zooko@zooko.com'" <zooko@zooko.com>, "'dharkins@lounge.org'" <dharkins@lounge.org>
Date: Tue, 20 Oct 2009 10:04:59 -0400
Thread-Topic: [Cfrg] soliciting feedback on HKDF
Thread-Index: AcpRNn6nSYIPIHBHT0GQ3Ko+7cQp8QAV9u6h
Message-ID: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BDF@LLE2K7-BE01.mitll.ad.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: "'tim.polk@nist.gov'" <tim.polk@nist.gov>, "'mcgrew@cisco.com'" <mcgrew@cisco.com>, "'cfrg@irtf.org'" <cfrg@irtf.org>, "'hugo@ee.technion.ac.il'" <hugo@ee.technion.ac.il>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 20 Oct 2009 14:20:14 -0000

SSdkIGxpa2UgdG8gYnJpbmcgdXAgbXkgb2xkIHF1ZXN0aW9uIHRoYXQgaGFzbid0IGJlZW4gYW5z
d2VyZWQuDQoNCkRlc2lnbiBvZiBoYXNoIGZ1bmN0aW9ucyBoYWQgIHByb2R1Y2luZyB1bmlxdWUg
ZGlnZXN0cyAoY29sbGlzaW9uIGF2b2lkYW5jZSkgYXMgaXRzIHByaW1hcnkgZ29hbC4gQW55IHJh
bmRvbWl6YXRpb24gcHJvcGVydGllcyAtIGlmIHRoZXkgZXhpc3RlZCAtIHdlcmUganVzdCBhIGJ5
LXByb2R1Y3QuDQoNCkVuZ2luZWVycyBub3RpY2VkIHRoYXQgaGFzaCBvdXRwdXQgbG9va2VkIHJh
bmRvbSB0byB0aGVtLCBhbmQgc3RhcnRlZCB1c2luZyBoYXNoIGZ1bmN0aW9ucyBhcyByYW5kb21p
emVycy4NCg0KSE1BQyBjb25zdHJ1Y3Qgd2FzIGRlc2lnbmVkIHRvIGZvaWwgY2VydGFpbiBhdHRh
Y2tzIGFnYWluc3Qga2V5ZWQgaGFzaCBmdW5jdGlvbnMuIFdoYXQgYXJlIHRoZSByZWFzb25zIHRv
IGJlbGlldmUgdGhhdCBITUFDIGFkZHMgYW55dGhpbmcgdG8gdGhlIHJhbmRvbWl6YXRpb24gcHJv
cGVydHkgb2YgdGhlIHVuZGVybHlpbmcgaGFzaC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YWMvdGFob2Uv
d2lraS9OZXdDYXBzL1doYXRDb3VsZEdvV3JvbmcNCl9fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fDQpDZnJnIG1haWxpbmcgbGlzdA0KQ2ZyZ0BpcnRmLm9yZw0K
aHR0cDovL3d3dy5pcnRmLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2NmcmcNCg==

From dol@cryptocom.ru  Tue Oct 20 07:58:38 2009
Return-Path: <dol@cryptocom.ru>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 25F963A6A24 for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 07:58:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.129
X-Spam-Level: 
X-Spam-Status: No, score=-1.129 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_RU=0.595, HOST_EQ_RU=0.875]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IEJ6AHG0Qr4T for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 07:58:37 -0700 (PDT)
Received: from mx.cryptocom.ru (mx.cryptocom.ru [87.245.158.60]) by core3.amsl.com (Postfix) with ESMTP id 4B01A3A6A22 for <cfrg@irtf.org>; Tue, 20 Oct 2009 07:58:36 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mx.cryptocom.ru (Postfix) with ESMTP id E76DC3EC36; Tue, 20 Oct 2009 18:58:43 +0400 (MSD)
X-Virus-Scanned: Debian amavisd-new at cryptocom.ru
Received: from mx.cryptocom.ru ([127.0.0.1]) by localhost (mx.cryptocom.ru [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NoRhYtivkMxi; Tue, 20 Oct 2009 18:58:43 +0400 (MSD)
Received: from [10.51.22.241] (reedcat.lan.cryptocom.ru [10.51.22.241]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.cryptocom.ru (Postfix) with ESMTP id 5550F3EC05; Tue, 20 Oct 2009 18:58:42 +0400 (MSD)
Message-ID: <4ADDD022.5040707@cryptocom.ru>
Date: Tue, 20 Oct 2009 18:58:42 +0400
From: Basil Dolmatov <dol@cryptocom.ru>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: "Blumenthal, Uri" <uri@ll.mit.edu>
References: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BDF@LLE2K7-BE01.mitll.ad.local>
In-Reply-To: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BDF@LLE2K7-BE01.mitll.ad.local>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Cc: "'tim.polk@nist.gov'" <tim.polk@nist.gov>, "'cfrg@irtf.org'" <cfrg@irtf.org>, "'hugo@ee.technion.ac.il'" <hugo@ee.technion.ac.il>, "'mcgrew@cisco.com'" <mcgrew@cisco.com>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 20 Oct 2009 14:58:38 -0000

Blumenthal, Uri пишет:
> I'd like to bring up my old question that hasn't been answered.
> 
> Design of hash functions had  producing unique digests (collision avoidance) as its primary goal. Any randomization properties - if they existed - were just a by-product.
> 
> Engineers noticed that hash output looked random to them, and started using hash functions as randomizers.
> 
> HMAC construct was designed to foil certain attacks against keyed hash functions. What are the reasons to believe that HMAC adds anything to the randomization property of the underlying hash functions?
> 
> (I'm not asking for a proof - just give me something that wouldn't be foolish to believe :-)
> 
> 
There cannot be a definite answer without a thorough mathematical 
analysis of HMAC transformation and its influence upon randomness of the 
source.

Moreover, taking into account that hash output is not by definition the 
source of uniformly distributed randomness, the question which 
properties will be held by the result of consecutive computation of hash 
and HMAC will definitely depend upon the hash function used and HMAC 
transformation used.

dol@

From uri@ll.mit.edu  Tue Oct 20 08:25:58 2009
Return-Path: <uri@ll.mit.edu>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 018E428C105 for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 08:25:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.598
X-Spam-Level: 
X-Spam-Status: No, score=-6.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, UNPARSEABLE_RELAY=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SPPSKcTomQpX for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 08:25:57 -0700 (PDT)
Received: from ll.mit.edu (LLMAIL1.LL.MIT.EDU [129.55.12.41]) by core3.amsl.com (Postfix) with ESMTP id F35A528C0F1 for <cfrg@irtf.org>; Tue, 20 Oct 2009 08:25:56 -0700 (PDT)
Received: (from smtp@localhost) by ll.mit.edu (8.12.10/8.8.8) id n9KFPv21014122; Tue, 20 Oct 2009 11:25:57 -0400 (EDT)
Received: from lle2k7-hub01.llan.ll.mit.edu(            ), claiming to be "LLE2K7-HUB01.mitll.ad.local" via SMTP by llpost, id smtpdAAAkDayrr; Tue Oct 20 11:05:48 2009
Received: from LLE2K7-BE01.mitll.ad.local ([            ]) by LLE2K7-HUB01.mitll.ad.local ([            ]) with mapi; Tue, 20 Oct 2009 11:05:48 -0400
From: "Blumenthal, Uri" <uri@ll.mit.edu>
To: "'dol@cryptocom.ru'" <dol@cryptocom.ru>
Date: Tue, 20 Oct 2009 11:05:28 -0400
Thread-Topic: [Cfrg] soliciting feedback on HKDF
Thread-Index: AcpRlc2dYamCLDMbRs+iBR7kZVM7QgAAQByG
Message-ID: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BE3@LLE2K7-BE01.mitll.ad.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: "'cfrg@irtf.org'" <cfrg@irtf.org>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 20 Oct 2009 15:25:58 -0000

VGhhbmsgeW91IGZvciBzdXBwb3J0aW5nIGFuZCBleHBvdW5kaW5nIG9uIG15IHBvaW50IQ0KDQoN
Ci0tLS0tIE9yaWdpbmFsIE1lc3NhZ2UgLS0tLS0NCkZyb206IEJhc2lsIERvbG1hdG92IDxkb2xA
Y3J5cHRvY29tLnJ1Pg0KVG86IEJsdW1lbnRoYWwsIFVyaQ0KQ2M6ICd6b29rb0B6b29rby5jb20n
IDx6b29rb0B6b29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Fy
ZSB0aGUgcmVhc29ucyB0byBiZWxpZXZlIHRoYXQgSE1BQyBhZGRzIGFueXRoaW5nIHRvIHRoZSBy
YW5kb21pemF0aW9uIHByb3BlcnR5IG9mIHRoZSB1bmRlcmx5aW5nIGhhc2ggZnVuY3Rpb25zPw0K
PiANCj4gKEknbSBub3QgYXNraW5nIGZvciBhIHByb29mIC0ganVzdCBnaXZlIG1lIHNvbWV0aGlu
ZyB0aGF0IHdvdWxkbid0IGJlIGZvb2xpc2ggdG8gYmVsaWV2ZSA6LSkNCj4gDQo+IA0KVGhlcmUg
Y2Fubm90IGJlIGEgZGVmaW5pdGUgYW5zd2VyIHdpdGhvdXQgYSB0aG9yb3VnaCBtYXRoZW1hdGlj
YWwgDQphbmFseXNpcyBvZiBITUFDIHRyYW5zZm9ybWF0aW9uIGFuZCBpdHMgaW5mbHVlbmNlIHVw
b24gcmFuZG9tbmVzcyBvZiB0aGUgDQpzb3VyY2UuDQoNCk1vcmVvdmVyLCB0YWtpbmcgaW50byBh
Y2NvdW50IHRoYXQgaGFzaCBvdXRwdXQgaXMgbm90IGJ5IGRlZmluaXRpb24gdGhlIA0Kc291cmNl
IG9mIHVuaWZvcm1seSBkaXN0cmlidXRlZCByYW5kb21uZXNzLCB0aGUgcXVlc3Rpb24gd2hpY2gg
DQpwcm9wZXJ0aWVzIHdpbGwgYmUgaGVsZCBieSB0aGUgcmVzdWx0IG9mIGNvbnNlY3V0aXZlIGNv
bXB1dGF0aW9uIG9mIGhhc2ggDQphbmQgSE1BQyB3aWxsIGRlZmluaXRlbHkgZGVwZW5kIHVwb24g
dGhlIGhhc2ggZnVuY3Rpb24gdXNlZCBhbmQgSE1BQyANCnRyYW5zZm9ybWF0aW9uIHVzZWQuDQoN
CmRvbEANCg==

From dbrown@certicom.com  Tue Oct 20 08:27:06 2009
Return-Path: <dbrown@certicom.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id D087728C12A for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 08:27:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.203
X-Spam-Level: 
X-Spam-Status: No, score=-5.203 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1fexIxbFgMB7 for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 08:27:05 -0700 (PDT)
Received: from mhs04ykf.rim.net (mhs04ykf.rim.net [216.9.243.82]) by core3.amsl.com (Postfix) with ESMTP id AED9528C129 for <cfrg@irtf.org>; Tue, 20 Oct 2009 08:27:05 -0700 (PDT)
X-AuditID: 0a666446-b7b98ae000004fe3-af-4addd6d00f8e
Received: from XCH39YKF.rim.net ( [10.64.31.40]) by mhs04ykf.rim.net (RIM Mail) with SMTP id 6A.55.20451.0D6DDDA4; Tue, 20 Oct 2009 11:27:12 -0400 (EDT)
Received: from XCH57YKF.rim.net ([10.64.31.54]) by XCH39YKF.rim.net with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Oct 2009 11:26:19 -0400
x-mimeole: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
content-transfer-encoding: quoted-printable
Date: Tue, 20 Oct 2009 11:26:18 -0400
Message-ID: <7E1DF37F1F42AB4E877E492C308E6AC49492E1@XCH57YKF.rim.net>
In-Reply-To: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Cfrg] soliciting feedback on HKDF
Thread-Index: AcpQ5FJiYWXbhB5ERRGVu9BCW3kTnwAsdXhQ
References: <2BDAD1BB-A200-4B35-809A-FC0F0385F9D7@cisco.com>
From: "Dan Brown" <dbrown@certicom.com>
To: "David McGrew" <mcgrew@cisco.com>, <cfrg@irtf.org>
X-OriginalArrivalTime: 20 Oct 2009 15:26:19.0049 (UTC) FILETIME=[ABF81990:01CA5199]
X-Brightmail-Tracker: AAAAAQAAAZE=
Cc: Tim Polk <tim.polk@nist.gov>, Pasi.Eronen@nokia.com, Hugo Krawczyk <hugo@ee.technion.ac.il>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 20 Oct 2009 15:27:06 -0000

1. For key generation (not key derivation), I believe that NIST SP
800-90 is meant to be applied by most NIST standards, e.g. FIPS 186-3.
There is also the ANSI X9.83 standards, which has a part 3 aligning with
NIST SP 800-90, and a draft part 2 discussing entropy sources (their
assessment and perhaps debiasing), and a draft part 4 combining the
latter two (so part 4 overlaps in aim with the HKDF), and again other
ANSI crypto standards will expect X9.82 to be used for key generation.

2.  The menagerie of key derivation functions (i.e. DH-like shared
secret value to symmetric key, which unlike key generation are needed
for interoperability) such as IEEE KDF1 and KDF2, ANSI X9.63 X9.42, NIST
SP 800-56A, TLS-PRF, and IKE, and now HKDF, could lead a general purpose
crypto module to be application-limited, or to support multiple KDFs, or
to output the raw shared DH secret value (g^(xy)). 

-----Original Message-----
From: cfrg-bounces@irtf.org [mailto:cfrg-bounces@irtf.org] On Behalf Of
David McGrew
Sent: Monday, October 19, 2009 1:45 PM
To: cfrg@irtf.org
Cc: Tim Polk; Pasi.Eronen@nokia.com Eronen; Hugo Krawczyk
Subject: [Cfrg] soliciting feedback on HKDF

Hello,

HMAC-based Extract-and-Expand Key Derivation Function (HKDF),
http://tools.ietf.org/html/draft-krawczyk-hkdf-00
, specifies a key derivation function that is intended to be used in a  
wide variety of applications.   This draft provides a detailed  
proposal along the lines of what Hugo presented to the IETF Security  
Area at IETF 74.   If you have an interest in the design and/or use of  
this KDF, please provide your feedback to the CFRG list.

It would be ideal to have feedback by November 8, so that it can be
considered at the upcoming IETF meeting.  However, comments are welcome
at any time.

David



---------------------------------------------------------------------=0A=
This transmission (including any attachments) may contain confidential infor=
mation, privileged material (including material protected by the solicitor-c=
lient or other applicable privileges), or constitute non-public information.=
 Any use of this information by anyone other than the intended recipient is=
 prohibited. If you have received this transmission in error, please immedia=
tely reply to the sender and delete this information from your system. Use,=
 dissemination, distribution, or reproduction of this transmission by uninte=
nded recipients is not authorized and may be unlawful.

From dharkins@lounge.org  Tue Oct 20 10:32:03 2009
Return-Path: <dharkins@lounge.org>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C1AF23A6A35 for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 10:32:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.265
X-Spam-Level: 
X-Spam-Status: No, score=-6.265 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6mQc6uc8bH0Y for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 10:32:01 -0700 (PDT)
Received: from colo.trepanning.net (colo.trepanning.net [69.55.226.174]) by core3.amsl.com (Postfix) with ESMTP id 81BFB3A68AC for <cfrg@irtf.org>; Tue, 20 Oct 2009 10:32:00 -0700 (PDT)
Received: from www.trepanning.net (localhost [127.0.0.1]) by colo.trepanning.net (Postfix) with ESMTP id 4BC9A10224074; Tue, 20 Oct 2009 10:32:08 -0700 (PDT)
Received: from 69.12.173.8 (SquirrelMail authenticated user dharkins@lounge.org) by www.trepanning.net with HTTP; Tue, 20 Oct 2009 10:32:08 -0700 (PDT)
Message-ID: <5a1cb812c670ce0801ec6a628f1b438c.squirrel@www.trepanning.net>
In-Reply-To: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BDF@LLE2K7-BE01.mitll.ad.local >
References: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BDF@LLE2K7-BE01.mitll.ad.local>
Date: Tue, 20 Oct 2009 10:32:08 -0700 (PDT)
From: "Dan Harkins" <dharkins@lounge.org>
To: "Blumenthal, Uri" <uri@ll.mit.edu>
User-Agent: SquirrelMail/1.4.14 [SVN]
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
Cc: "'tim.polk@nist.gov'" <tim.polk@nist.gov>, "'cfrg@irtf.org'" <cfrg@irtf.org>, "'hugo@ee.technion.ac.il'" <hugo@ee.technion.ac.il>, "'mcgrew@cisco.com'" <mcgrew@cisco.com>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 20 Oct 2009 17:32:03 -0000

  Hi Uri,

  Check out "Random Oracles are Practical" by Bellare and Rogaway.
Section 6 discusses how to use a standard hash function, which by
itself has too much structure, to make a random oracle.

  In fact, they provide an example to extend the range and domain of
the mapping for an example random oracle and end up with something that
looks remarkably like a KDF. It even includes a random "salt" to
instantiate multiple independent random oracles.

  Dan.

On Tue, October 20, 2009 7:04 am, Blumenthal, Uri wrote:
> I'd like to bring up my old question that hasn't been answered.
>
> Design of hash functions had  producing unique digests (collision
> avoidance) as its primary goal. Any randomization properties - if they
> existed - were just a by-product.
>
> Engineers noticed that hash output looked random to them, and started
> using hash functions as randomizers.
>
> HMAC construct was designed to foil certain attacks against keyed hash
> functions. What are the reasons to believe that HMAC adds anything to the
> randomization property of the underlying hash functions?
>
> (I'm not asking for a proof - just give me something that wouldn't be
> foolish to believe :-)
>
>
> ----- Original Message -----
> From: cfrg-bounces@irtf.org <cfrg-bounces@irtf.org>
> To: Dan Harkins <dharkins@lounge.org>
> Cc: Tim Polk <tim.polk@nist.gov>; David McGrew <mcgrew@cisco.com>;
> cfrg@irtf.org <cfrg@irtf.org>; Hugo Krawczyk <hugo@ee.technion.ac.il>
> Sent: Mon Oct 19 23:36:24 2009
> Subject: Re: [Cfrg] soliciting feedback on HKDF
>
> On Monday,2009-10-19, at 17:36 , Dan Harkins wrote:
>
>>   A very nice I-D and I think HKDF will be a valuable building
>> block for protocol designers.
>
> I would like to echo this sentiment: in attempting to stringently
> evaluate "Everything that could possibly go wrong" with Tahoe-LAFS's
> crypto design [1], I keep thinking that the KDF is a linchpin
> component in several places.  (The recent revelation of related-key
> issues in AES-256 is one of the reasons to think this.)  Thank you
> for working on the design and standardization of HKDF!
>
> For what it is worth -- I really don't want to start an argument
> about this somewhat tangential issue -- I don't like HMAC-SHA256
> nearly as well as I like Poly1305-AES or Poly1305-Salsa20.  This is
> an unfortunate period in cryptography when there isn't a really good
> secure hash function that we can rely on, and the strong security
> proofs and superior performance of the Carter-Wegman MACs like
> Poly1305 look better to me than the security proofs of HMAC.
>
> Regards,
>
> Zooko Wilcox-O'Hearn
>
> [1] http://allmydata.org/trac/tahoe/wiki/NewCaps/WhatCouldGoWrong
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> http://www.irtf.org/mailman/listinfo/cfrg
>



From uri@ll.mit.edu  Tue Oct 20 10:59:08 2009
Return-Path: <uri@ll.mit.edu>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id BA3633A6899 for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 10:59:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.223
X-Spam-Level: 
X-Spam-Status: No, score=-6.223 tagged_above=-999 required=5 tests=[AWL=-0.375, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, SARE_OBFU_ALL=0.751, UNPARSEABLE_RELAY=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SMBp9fg9FsAj for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 10:59:07 -0700 (PDT)
Received: from ll.mit.edu (LLMAIL1.LL.MIT.EDU [129.55.12.41]) by core3.amsl.com (Postfix) with ESMTP id 8ABE93A679C for <cfrg@irtf.org>; Tue, 20 Oct 2009 10:59:07 -0700 (PDT)
Received: (from smtp@localhost) by ll.mit.edu (8.12.10/8.8.8) id n9KHxBQo004047; Tue, 20 Oct 2009 13:59:11 -0400 (EDT)
Received: from lle2k7-hub01.llan.ll.mit.edu(            ), claiming to be "LLE2K7-HUB01.mitll.ad.local" via SMTP by llpost, id smtpdAAAHyaq6E; Tue Oct 20 13:43:34 2009
Received: from LLE2K7-BE01.mitll.ad.local ([            ]) by LLE2K7-HUB01.mitll.ad.local ([            ]) with mapi; Tue, 20 Oct 2009 13:43:34 -0400
From: "Blumenthal, Uri" <uri@ll.mit.edu>
To: Dan Harkins <dharkins@lounge.org>
Date: Tue, 20 Oct 2009 13:43:31 -0400
Thread-Topic: [Cfrg] soliciting feedback on HKDF
Thread-Index: AcpRqzm+jZK9nsWaQZuBPwJiRj8gnAAAZzbe
Message-ID: <C7036F03.5956%uri@ll.mit.edu>
In-Reply-To: <5a1cb812c670ce0801ec6a628f1b438c.squirrel@www.trepanning.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
user-agent: Microsoft-Entourage/13.0.0.090609
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "'cfrg@irtf.org'" <cfrg@irtf.org>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 20 Oct 2009 17:59:08 -0000

There are two issues. One - whether a hash function as-designed is a good
source of randomness. The other one - which is the most relevant here - is
whether HMAC adds anything useful to randomization property.

Because neither hashes like SHA nor HMAC were designed as randomizers.

I'll certainly look up the reference, thanks!

On 10/20/09  13:32 , "Dan Harkins" <dharkins@lounge.org> wrote:

>=20
>   Hi Uri,
>=20
>   Check out "Random Oracles are Practical" by Bellare and Rogaway.
> Section 6 discusses how to use a standard hash function, which by
> itself has too much structure, to make a random oracle.
>=20
>   In fact, they provide an example to extend the range and domain of
> the mapping for an example random oracle and end up with something that
> looks remarkably like a KDF. It even includes a random "salt" to
> instantiate multiple independent random oracles.
>=20
>   Dan.
>=20
> On Tue, October 20, 2009 7:04 am, Blumenthal, Uri wrote:
>> I'd like to bring up my old question that hasn't been answered.
>>=20
>> Design of hash functions had  producing unique digests (collision
>> avoidance) as its primary goal. Any randomization properties - if they
>> existed - were just a by-product.
>>=20
>> Engineers noticed that hash output looked random to them, and started
>> using hash functions as randomizers.
>>=20
>> HMAC construct was designed to foil certain attacks against keyed hash
>> functions. What are the reasons to believe that HMAC adds anything to th=
e
>> randomization property of the underlying hash functions?
>>=20
>> (I'm not asking for a proof - just give me something that wouldn't be
>> foolish to believe :-)
>>=20
>>=20
>> ----- Original Message -----
>> From: cfrg-bounces@irtf.org <cfrg-bounces@irtf.org>
>> To: Dan Harkins <dharkins@lounge.org>
>> Cc: Tim Polk <tim.polk@nist.gov>; David McGrew <mcgrew@cisco.com>;
>> cfrg@irtf.org <cfrg@irtf.org>; Hugo Krawczyk <hugo@ee.technion.ac.il>
>> Sent: Mon Oct 19 23:36:24 2009
>> Subject: Re: [Cfrg] soliciting feedback on HKDF
>>=20
>> On Monday,2009-10-19, at 17:36 , Dan Harkins wrote:
>>=20
>>>   A very nice I-D and I think HKDF will be a valuable building
>>> block for protocol designers.
>>=20
>> I would like to echo this sentiment: in attempting to stringently
>> evaluate "Everything that could possibly go wrong" with Tahoe-LAFS's
>> crypto design [1], I keep thinking that the KDF is a linchpin
>> component in several places.  (The recent revelation of related-key
>> issues in AES-256 is one of the reasons to think this.)  Thank you
>> for working on the design and standardization of HKDF!
>>=20
>> For what it is worth -- I really don't want to start an argument
>> about this somewhat tangential issue -- I don't like HMAC-SHA256
>> nearly as well as I like Poly1305-AES or Poly1305-Salsa20.  This is
>> an unfortunate period in cryptography when there isn't a really good
>> secure hash function that we can rely on, and the strong security
>> proofs and superior performance of the Carter-Wegman MACs like
>> Poly1305 look better to me than the security proofs of HMAC.
>>=20
>> Regards,
>>=20
>> Zooko Wilcox-O'Hearn
>>=20
>> [1] http://allmydata.org/trac/tahoe/wiki/NewCaps/WhatCouldGoWrong
>> _______________________________________________
>> Cfrg mailing list
>> Cfrg@irtf.org
>> http://www.irtf.org/mailman/listinfo/cfrg
>>=20
>=20
>=20

--=20
Regards,
Uri         uri@ll.mit.edu
<Disclaimer>


From mcgrew@cisco.com  Tue Oct 20 14:43:28 2009
Return-Path: <mcgrew@cisco.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 8D3ED3A6911 for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 14:43:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level: 
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ErfDSLpCNzgM for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 14:43:27 -0700 (PDT)
Received: from sj-iport-6.cisco.com (sj-iport-6.cisco.com [171.71.176.117]) by core3.amsl.com (Postfix) with ESMTP id 4753F3A6964 for <cfrg@irtf.org>; Tue, 20 Oct 2009 14:43:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=mcgrew@cisco.com; l=8495; q=dns/txt; s=sjiport06001; t=1256075015; x=1257284615; h=from:sender:reply-to:subject:date:message-id:to:cc: mime-version:content-transfer-encoding:content-id: content-description:resent-date:resent-from:resent-sender: resent-to:resent-cc:resent-message-id:in-reply-to: references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; z=From:=20David=20McGrew=20<mcgrew@cisco.com>|Subject:=20c omments=20and=20questions=20on=20draft-krawczyk-hkdf=20an d=20related=20work|Date:=20Tue,=2020=20Oct=202009=2014:43 :33=20-0700|Message-Id:=20<FF282486-6438-4E2E-97B5-0C4034 D6BB3D@cisco.com>|To:=20Hugo=20Krawczyk=20<hugo@ee.techni on.ac.il>,=0D=0A=20=20=20=20=20=20=20=20"Pasi.Eronen@noki a.com=20Eronen"=20<Pasi.Eronen@nokia.com>|Cc:=20cfrg@irtf .org|Mime-Version:=201.0=20(Apple=20Message=20framework =20v936); bh=llOEHnOpO1A++CDzm9yV6pPbyMWRJLo1J86vIg4nIIw=; b=iwaPx+bc2buEPwt1CIYNbea9CdqoJPSPLNVja7EqsnWd0k6Ra/zDAqWW YDyuDwMP5PvqKPpQJI2atIE2CtBUG95IhZNS917WLYlljwbwAc8Bfuzre yqKRVvpFrh97zTkngqcY6W2nPRnjTab1AUnWSXgbKtRWru7ZgNC5PsZGJ Y=;
Authentication-Results: sj-iport-6.cisco.com; dkim=neutral (message not signed) header.i=none
X-Files: smime.p7s : 1760
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApoEAMPL3UqrR7Ht/2dsb2JhbADCf5hRhDEEgVyJJw
X-IronPort-AV: E=Sophos;i="4.44,593,1249257600";  d="p7s'?scan'208";a="413777242"
Received: from sj-core-1.cisco.com ([171.71.177.237]) by sj-iport-6.cisco.com with ESMTP; 20 Oct 2009 21:43:35 +0000
Received: from xbh-sjc-231.amer.cisco.com (xbh-sjc-231.cisco.com [128.107.191.100]) by sj-core-1.cisco.com (8.13.8/8.14.3) with ESMTP id n9KLhZrc026595; Tue, 20 Oct 2009 21:43:35 GMT
Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-231.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Tue, 20 Oct 2009 14:43:35 -0700
Received: from stealth-10-32-254-212.cisco.com ([10.32.254.212]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Tue, 20 Oct 2009 14:43:34 -0700
Message-Id: <FF282486-6438-4E2E-97B5-0C4034D6BB3D@cisco.com>
From: David McGrew <mcgrew@cisco.com>
To: Hugo Krawczyk <hugo@ee.technion.ac.il>, "Pasi.Eronen@nokia.com Eronen" <Pasi.Eronen@nokia.com>
Content-Type: multipart/signed; boundary=Apple-Mail-64-742422793; micalg=sha1; protocol="application/pkcs7-signature"
Mime-Version: 1.0 (Apple Message framework v936)
Date: Tue, 20 Oct 2009 14:43:33 -0700
X-Mailer: Apple Mail (2.936)
X-OriginalArrivalTime: 20 Oct 2009 21:43:34.0759 (UTC) FILETIME=[5FE75770:01CA51CE]
Cc: cfrg@irtf.org
Subject: [Cfrg] comments and questions on draft-krawczyk-hkdf and related work
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 20 Oct 2009 21:43:28 -0000

--Apple-Mail-64-742422793
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed
Content-Transfer-Encoding: 7bit

Hi Hugo and Pasi,

I have some comments and questions on draft-krawczyk-hkdf-00 and "On
Extract-then-Expand Key Derivation Functions and an HMAC-based KDF".
First, thanks for taking on this work; it makes strong contributions
in an important area.

The most important question is: what is the precise security statement
for HKDF?  What assumptions does one need to make about the hash
function used in HKDF in order that the security analysis applies?
The paper says that "it is shown in [23] (see Section 8) that using
HMAC with a truncated output as an extractor allows to prove security
under considerably weaker assumptions on the underlying hash
function."  However, both of the Lemmas in that paper (and the
implication in Section 8) make random oracle assumptions.

A recommended instantiation of HKDF from the paper uses HMAC-SHA-512
(with output truncated to 256 bits) in the extract stage and
HMAC-SHA-256 in the expand stage.  I understand from [23] that "if we
are interested in an output of L close-to-uniform bits then the key to
the underlying compression function needs to be sufficiently larger
than L," which motivates the use of SHA-512 in the extraction stage.
But I don't see any exact security statement for this instantiation.

What is the impact of the salt (and its omission) on the security
properties?

The draft is somewhat incomplete as a normative specification, in that
it does not require the implementation of any particular hash (would
it make sense to include the recommended instantiation from the
paper?).  Also, it does not use any of the RFC 2119 keywords.  I would
expect that, to be used in standards, it would be necessary to at
least provide some recommended instantiations and the security levels
that they target.

The conspicuous unmeet need, in crypto standards at least, is for a
computational extractor, since "extraction" is an important goal, and
there is an efficiency gap for statistical extractors.  On the other
hand, there are many definitions and implementations of PRFs that
implement the "expand" stage perfectly well.  One option we have is to
define an extractor function, rather than a general-purpose KDF (or in
addition to it).  It is worth considering the different use cases.
Here is a categorization of the different applications mentioned for a
KDF:

    1. Generate one key from another (IKEv2 Section 2.15 and TLS "Key
    Calculation", for example).  In this case, no extraction stage is
    needed.

    2. Generate a key from a DH shared secret (IKEv2 SKEYSEED
    computation, Sections 2.14 and 2.18, and TLS "Computing the Master
    Secret", for example).  In this case, computational extraction
    seems to be needed, because statistical extraction would be
    inefficient.

    3. Generate key material from a non-uniform random source.  In this
    case, either statistical or computational extraction could be used.

    4. Generate a key from a passphrase.  It is not exactly clear if
    this is in scope, because the draft discusses modifications of HKDF
    to better address this application.  But it could be in scope, and
    if it is, computational extraction should be used to ensure that
    the output keys are unpredictable whenever the passwords used as
    input have sufficient min-entropy.

I wonder if we really want to target all of these disparate cases with
a single KDF function.  Applications using just case #1 may reject
adopting HKDF on the reasonable grounds that they don't need the
extraction stage, and that adopting HKDF with the suggestion of
Section 3.3 to skip that stage would amount to replacing a perfectly
OK PRF with another PRF that offers no security advantage.

IKE and TLS both use a PRF for applications #1 and #2, but are there
other protocols that use a single PRF in multiple applications?  There
is a listing of some IETF references to KDFs at
http://www.mindspring.com/~dmcgrew/ic/internet-crypto.html#prfs and,
besides IKE, these uses seem to belong to just a single case.  There
are also some other protocols with built-in single-purpose KDFs that
are not externally documented, such as SRTP's AES-CTR based KDF
and EAP TLS key derivation.

If IKE and TLS are the main intended applications, I suggest adding a
discussion of these applications to the draft.  It would be valuable
to compare HKDF to the existing KDF functions used in those protocols.

A minor point: The HKDF analysis asserts that OFB mode is better than
CTR, because the attacker has less knowledge on the inputs to the PRF,
and because successive values of a counter differ in very few bits.
These are valid points, but are they strong enough to justify the
implementation of a new algorithm for an "expand" stage?

It would be a valuable contribution to theory to isolate the security
requirements of the hash function that are needed to build a
good computational extractor, and provide these requirements to the
NIST hash function competition.

I was unsatisfied with my results in trying to track down references
on a computational extractor.  It would be valuable to have a precise
and concise statement of the security goal (reference [35] in the
paper doesn't mention min-entropy - should I be looking somewhere
else?).  Also, the citation "Randomness Extraction and Key Derivation
Using the CBC, Cascade and HMAC Modes", includes the statement
"Computational Security: Our second approach to analyzing NMAC is
similar to the analysis of the padded cascade from Lemma 5. We will
present it in the full version."  Is the full version available
online?  Or is there another reference that you could recommend?

Regards,

David


--Apple-Mail-64-742422793
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDnjCCA5ow
ggKCoAMCAQICAWQwCwYJKoZIhvcNAQEFMG0xFTATBgNVBAMMDERhdmlkIE1jR3JldzETMBEGA1UE
CAwKQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMxETAPBgNVBAcMCFNhbiBKb3NlMR8wHQYJKoZIhvcN
AQkBFhBtY2dyZXdAY2lzY28uY29tMB4XDTA4MTIwOTIyMDMzMFoXDTA5MTIwOTIyMDMzMFowbTEV
MBMGA1UEAwwMRGF2aWQgTWNHcmV3MRMwEQYDVQQIDApDYWxpZm9ybmlhMQswCQYDVQQGEwJVUzER
MA8GA1UEBwwIU2FuIEpvc2UxHzAdBgkqhkiG9w0BCQEWEG1j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IBZDAJBgUrDgMCGgUAoIIBZzAYBgkqhkiG9w0BCQMxCwYJKoZI
hvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTEwMjAyMTQzMzNaMCMGCSqGSIb3DQEJBDEWBBSBvPEi
i+QTg+LDssp2YTV+ql6+9DCBgQYJKwYBBAGCNxAEMXQwcjBtMRUwEwYDVQQDDAxEYXZpZCBNY0dy
ZXcxEzARBgNVBAgMCkNhbGlmb3JuaWExCzAJBgNVBAYTAlVTMREwDwYDVQQHDAhTYW4gSm9zZTEf
MB0GCSqGSIb3DQEJARYQbWNncmV3QGNpc2NvLmNvbQIBZDCBgwYLKoZIhvcNAQkQAgsxdKByMG0x
FTATBgNVBAMMDERhdmlkIE1jR3JldzETMBEGA1UECAwKQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMx
ETAPBgNVBAcMCFNhbiBKb3NlMR8wHQYJKoZIhvcNAQkBFhBtY2dyZXdAY2lzY28uY29tAgFkMA0G
CSqGSIb3DQEBAQUABIIBAEOboPCejPr/lwr/C/DNwp7Yjf7wdLbdOqT+fqyKmmK5+r9l3nVQrfT3
o3xwGQ0C5FsfcSTh33e2ijaKH0evPjqM81hrVBLxT6mOBZZfuptUTzDE/2RBGBhfbrGMm3y3wVE0
Ob8uqZDkpThZ4xN+DpwsqfJYicEeqM4CWHmAxpl3zkTkPail6LZl8F7yfAEwixZrbCXMXFJW6Rjh
pm0xOfKx3gxQTxvlPPtYG5zi5lwnFAQRpZMZwwjoZ6Skb65I7aFQP1Qq8tez/6g3ZzKjj46lpjA+
UEiODaCkc/o8D2B/f9pQt5LZMZZwz2nLA2wYscwSPgE1D+6W9V9Xq7RhnswAAAAAAAA=

--Apple-Mail-64-742422793--

From zooko@zooko.com  Tue Oct 20 15:51:42 2009
Return-Path: <zooko@zooko.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 2766A28C15F for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 15:51:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.227
X-Spam-Level: 
X-Spam-Status: No, score=-2.227 tagged_above=-999 required=5 tests=[AWL=0.372,  BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hcacZbdr3cvJ for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 15:51:40 -0700 (PDT)
Received: from nooxie.zooko.com (nooxie.zooko.com [207.7.145.200]) by core3.amsl.com (Postfix) with ESMTP id D55B328C159 for <cfrg@irtf.org>; Tue, 20 Oct 2009 15:51:40 -0700 (PDT)
Received: from [192.168.1.118] (97-118-105-53.hlrn.qwest.net [97.118.105.53]) by nooxie.zooko.com (Postfix) with ESMTP id 1897919FD3; Tue, 20 Oct 2009 15:56:33 -0700 (PDT)
In-Reply-To: <5a1cb812c670ce0801ec6a628f1b438c.squirrel@www.trepanning.net>
References: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BDF@LLE2K7-BE01.mitll.ad.local> <5a1cb812c670ce0801ec6a628f1b438c.squirrel@www.trepanning.net>
Mime-Version: 1.0 (Apple Message framework v753.1)
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <4B763033-C8A8-478C-9278-C85825BBF529@zooko.com>
Content-Transfer-Encoding: 7bit
From: Zooko Wilcox-O'Hearn <zooko@zooko.com>
Date: Tue, 20 Oct 2009 16:51:43 -0600
To: Dan Harkins <dharkins@lounge.org>
X-Mailer: Apple Mail (2.753.1)
Cc: "'tim.polk@nist.gov'" <tim.polk@nist.gov>, "'mcgrew@cisco.com'" <mcgrew@cisco.com>, "'cfrg@irtf.org'" <cfrg@irtf.org>, "'hugo@ee.technion.ac.il'" <hugo@ee.technion.ac.il>
Subject: Re: [Cfrg] soliciting feedback on HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 20 Oct 2009 22:51:42 -0000

On Tuesday,2009-10-20, at 11:32 , Dan Harkins wrote:

>   Check out "Random Oracles are Practical" by Bellare and Rogaway.
> Section 6 discusses how to use a standard hash function, which by
> itself has too much structure, to make a random oracle.
>
>   In fact, they provide an example to extend the range and domain of
> the mapping for an example random oracle and end up with something  
> that
> looks remarkably like a KDF. It even includes a random "salt" to
> instantiate multiple independent random oracles.

Yes, and you might also be interested in "How Risky is the Random- 
Oracle Model?" by Gaetan Leurent and Phong Q. Nguyen 2008 which  
attacks those constructions from BR93 along the way of making  
interesting points about "How bad is it" in different cryptosystems  
if the thing standing in for a random oracle fails to act like one.

http://eprint.iacr.org/2008/441

Regards,

Zooko

From dmjacobson@sbcglobal.net  Tue Oct 20 20:24:27 2009
Return-Path: <dmjacobson@sbcglobal.net>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 8A71F3A682B for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 20:24:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.664
X-Spam-Level: 
X-Spam-Status: No, score=-1.664 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, IP_NOT_FRIENDLY=0.334, J_CHICKENPOX_41=0.6, UNPARSEABLE_RELAY=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7+8ADUYS4uNf for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 20:24:26 -0700 (PDT)
Received: from smtp107.sbc.mail.gq1.yahoo.com (smtp107.sbc.mail.gq1.yahoo.com [67.195.14.110]) by core3.amsl.com (Postfix) with SMTP id B52A03A672F for <cfrg@irtf.org>; Tue, 20 Oct 2009 20:24:26 -0700 (PDT)
Received: (qmail 49161 invoked from network); 21 Oct 2009 03:24:32 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=txtYGHMqgwOfN4vvs0f1ph+2lUhBNoDmijNPhj+VobHYEOe/W6pTqNjBuFP8YmIqkX2xlFLospR99k6Tho1/zHo32XOcUyBnHpMwgrrggJy0GMrPnCuk9bc6Hyi15UivaeN2wiFk2vHgmt59/CNPEY7LLJDwnG3paEsc78/ojSg= ; 
Received: from adsl-69-232-76-158.dsl.sndg02.pacbell.net (dmjacobson@69.232.76.158 with plain) by smtp107.sbc.mail.gq1.yahoo.com with SMTP; 20 Oct 2009 20:24:32 -0700 PDT
X-Yahoo-SMTP: nOrmCa6swBAE50FabWnlVFUpgFVJ9Gbi__8U5mpvhtQq7tTV1g--
X-YMail-OSG: Ck4tdp4VM1kdbR5e8T3crLu7BrloP62I850EGYk3Onkt.DVBkAWndMoVJ6vE1sJxa.o70H03C78llDtlGiw2P7Hi_o1svYy6HV1x.i0v4TEyhogMQFQrQ7U5jdYFW1Jp7k36prINk4DR0UG83bacNm495MW0fExa4shhN7hnyNfWFxV_FvjZYJRmuTXVjnNChBS6EtfTgLBysYGClFVgN23GaqRzmbLq_UyK2WavnF13q7vEpnRoRXuGxoY3iLVUf3ejwEkHaBs_4ykpkQLz2xqeX7xjavUJpbDkU.hddoIDpJAH3ztldYA-
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4ADE7EF0.3060702@sbcglobal.net>
Date: Tue, 20 Oct 2009 20:24:32 -0700
From: David Jacobson <dmjacobson@sbcglobal.net>
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
To: David McGrew <mcgrew@cisco.com>
References: <FF282486-6438-4E2E-97B5-0C4034D6BB3D@cisco.com>
In-Reply-To: <FF282486-6438-4E2E-97B5-0C4034D6BB3D@cisco.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: cfrg@irtf.org, "Pasi.Eronen@nokia.com Eronen" <Pasi.Eronen@nokia.com>, Hugo Krawczyk <hugo@ee.technion.ac.il>
Subject: Re: [Cfrg] comments and questions on draft-krawczyk-hkdf and related work
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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, 21 Oct 2009 03:24:27 -0000

David McGrew wrote:
> Hi Hugo and Pasi,

[snip]

> 
> The conspicuous unmeet need, in crypto standards at least, is for a
> computational extractor, since "extraction" is an important goal, and
> there is an efficiency gap for statistical extractors.  On the other
> hand, there are many definitions and implementations of PRFs that
> implement the "expand" stage perfectly well.  One option we have is to
> define an extractor function, rather than a general-purpose KDF (or in
> addition to it).  

[snip]

> Regards,
> 
> David

[snip]

NIST SP 800-90, which is actually about random number generation, 
specifies two extractors, which it calls Derivation Functions, in 
Section 10.4.1 and 10.4.2.  These are hash based and block cipher based, 
respectively.  Both can deal with generating internal key material wider 
than a single block.  (I write "internal key material" because the data 
so generated is used to as input to the expansion function.)

The hash-based generation function is basically just a hash in counter 
mode:  block_i = Hash(i || N || input), where i is a 32-bit counter and 
N is  the number of bits to be generated as a 32-bit value.

The block cipher based extractor similarly generates block_i = 
last_block(XXX_CBC(fixed_key, i, L || N || input || 0x80 | 0-padding)) 
where XXX is the block cipher (e.g. AES_128), i (the IV) is the block 
count as a 32 bit value 0-padded to the block size, L is the input size 
as a 32 bit value, and N is the number of bits to to be returned by the 
derivation function as a 32 bit value.  The fixed_key is just octets of 
0, 1, ... out to the key length.  (They don't actually say CBC mode; but 
that is what it looks like to me.)

(I've ignored endian issues, and omitted some special cases, such as 
when the internal key is not a multiple of the block size, etc.)

Only 2 requirements on the entropy are stated that are relevant to us:

1.  "The entropy input shall have entropy that is equal to or greater 
than the security strength of the instantiation."  (Section 8.6.3)

2.  "The entropy input and the resulting seed shall be handled in a 
manner that is consistent with the security required for the data 
protected by the consuming application. For example, if the DRBG is used 
to generate keys, then the entropy inputs and seeds used to generate the 
keys shall (at a minimum) be protected as well as the keys."  (Section 
8.6.6)

One difference between this and HKDF regarding input is that HKDF 
explicitly allows the adversary to know some of the input.  But it is 
not obvious how allowing the adversary to know some of the input would 
be harmful to security of the SP 800-90 functions, as long as the 
portions known to the adversary were not counted as entropy.

Intuition tells me to worry a bit about using a block cipher with a 
fixed key, since the key is known to the adversary and a block cipher is 
invertible,  But maybe it is okay since their expansion functions 
protect the internal key material.

   -- David Jacobson

From uri@ll.mit.edu  Tue Oct 20 22:26:57 2009
Return-Path: <uri@ll.mit.edu>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 7DC353A67D6 for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 22:26:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.173
X-Spam-Level: 
X-Spam-Status: No, score=-6.173 tagged_above=-999 required=5 tests=[AWL=-0.175, BAYES_00=-2.599, J_CHICKENPOX_41=0.6, RCVD_IN_DNSWL_MED=-4, UNPARSEABLE_RELAY=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JuJ74Pqe-DYU for <cfrg@core3.amsl.com>; Tue, 20 Oct 2009 22:26:56 -0700 (PDT)
Received: from ll.mit.edu (LLMAIL1.LL.MIT.EDU [129.55.12.41]) by core3.amsl.com (Postfix) with ESMTP id 545F33A682B for <cfrg@irtf.org>; Tue, 20 Oct 2009 22:26:56 -0700 (PDT)
Received: (from smtp@localhost) by ll.mit.edu (8.12.10/8.8.8) id n9L5QuGq012078; Wed, 21 Oct 2009 01:26:56 -0400 (EDT)
Received: from lle2k7-hub02.llan.ll.mit.edu(            ), claiming to be "LLE2K7-HUB02.mitll.ad.local" via SMTP by llpost, id smtpdAAA_Xay9w; Wed Oct 21 01:26:03 2009
Received: from LLE2K7-BE01.mitll.ad.local ([            ]) by LLE2K7-HUB02.mitll.ad.local ([            ]) with mapi; Wed, 21 Oct 2009 01:26:03 -0400
From: "Blumenthal, Uri" <uri@ll.mit.edu>
To: "'dmjacobson@sbcglobal.net'" <dmjacobson@sbcglobal.net>, "'mcgrew@cisco.com'" <mcgrew@cisco.com>
Date: Wed, 21 Oct 2009 01:25:41 -0400
Thread-Topic: [Cfrg] comments and questions on draft-krawczyk-hkdf and related work
Thread-Index: AcpR/fvRBse+rPiFTIaEb0FfAJxMpwAEP7gL
Message-ID: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BEA@LLE2K7-BE01.mitll.ad.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: "'Pasi.Eronen@nokia.com'" <Pasi.Eronen@nokia.com>, "'cfrg@irtf.org'" <cfrg@irtf.org>, "'hugo@ee.technion.ac.il'" <hugo@ee.technion.ac.il>
Subject: Re: [Cfrg] comments and questions on draft-krawczyk-hkdf and related work
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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, 21 Oct 2009 05:26:57 -0000

TXkgcXVlc3Rpb24gc3RhbmRzOiBob3cgZG9lcyBITUFDIGFkZCBhbnl0aGluZyB0byByYW5kb21u
ZXNzLCBjb21wYXJlZCB0byBwbGFpbiBoYXNoIGluIGUuZy4gQ0JDLWxpa2UgbW9kZT8gSE1BQyB3
YXMgZGVzaWduZWQgZm9yIGEgZGlmZmVyZW50IHB1cnBvc2UuIEFuZCBJJ2QgcmF0aGVyIGFjY2Vw
dCBBRVMgYXMgYW4gaWRlYWwgY2lwaGVyICh3aGljaCBpdCBpc24ndCkgdGhhbiBTSEEgYXMgYSBy
YW5kb20gb3JhY2xlLg0KDQoNCi0tLS0tIE9yaWdpbmFsIE1lc3NhZ2UgLS0tLS0NCkZyb206IGNm
cmctYm91bmNlc0BpcnRmLm9yZyA8Y2ZyZy1ib3VuY2VzQGlydGYub3JnPg0KVG86IERhdmlkIE1j
R3JldyA8bWNncmV3QGNpc2NvLmNvbT4NCkNjOiBjZnJnQGlydGYub3JnIDxjZnJnQGlydGYub3Jn
PjsgUGFzaS5Fcm9uZW5Abm9raWEuY29tIEV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gYmxvY2sgY2lwaGVyIGlzIA0KaW52ZXJ0aWJsZSwgIEJ1dCBtYXli
ZSBpdCBpcyBva2F5IHNpbmNlIHRoZWlyIGV4cGFuc2lvbiBmdW5jdGlvbnMgDQpwcm90ZWN0IHRo
ZSBpbnRlcm5hbCBrZXkgbWF0ZXJpYWwuDQoNCiAgIC0tIERhdmlkIEphY29ic29uDQpfX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0KQ2ZyZyBtYWlsaW5nIGxp
c3QNCkNmcmdAaXJ0Zi5vcmcNCmh0dHA6Ly93d3cuaXJ0Zi5vcmcvbWFpbG1hbi9saXN0aW5mby9j
ZnJnDQo=

From mcgrew@cisco.com  Wed Oct 21 08:29:02 2009
Return-Path: <mcgrew@cisco.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 058E03A6986 for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 08:29:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level: 
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 45qadt2131Ur for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 08:29:01 -0700 (PDT)
Received: from sj-iport-1.cisco.com (sj-iport-1.cisco.com [171.71.176.70]) by core3.amsl.com (Postfix) with ESMTP id EA0CB3A6963 for <cfrg@irtf.org>; Wed, 21 Oct 2009 08:29:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=mcgrew@cisco.com; l=7136; q=dns/txt; s=sjiport01001; t=1256138950; x=1257348550; h=from:sender:reply-to:subject:date:message-id:to:cc: mime-version:content-transfer-encoding:content-id: content-description:resent-date:resent-from:resent-sender: resent-to:resent-cc:resent-message-id:in-reply-to: references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; z=From:=20David=20McGrew=20<mcgrew@cisco.com>|Subject:=20e xisting=20KDFs=20and=20their=20uses|Date:=20Wed,=2021=20O ct=202009=2008:29:06=20-0700|Message-Id:=20<89F9203E-440C -44A8-BA5D-31A1C4A6453D@cisco.com>|To:=20Peter=20Gutmann =20<pgut001@cs.auckland.ac.nz>,=20Dan=20Brown=20<dbrown@c erticom.com>,=0D=0A=20=20=20=20=20=20=20=20David=20Jacobs on=20<dmjacobson@sbcglobal.net>|Cc:=20cfrg@irtf.org,=20Hu go=20Krawczyk=20<hugo@ee.technion.ac.il>,=0D=0A=20=20=20 =20=20=20=20=20"Pasi.Eronen@nokia.com=20Eronen"=20<Pasi.E ronen@nokia.com>|Mime-Version:=201.0=20(Apple=20Message =20framework=20v936)|In-Reply-To:=20<E1N0PO7-0001YN-HW@wi ntermute01.cs.auckland.ac.nz>|References:=20<E1N0PO7-0001 YN-HW@wintermute01.cs.auckland.ac.nz>; bh=rOiy+hEzDZOLH4PqSZO71ploEmVo8g3jpb4lgF5Ajbk=; b=DmJQqq7t6xVMy5RT6oYKsR8oyF8+Ihy979QS5wBq832HS7FrHTIEgLoY WvyijCAtBpj8PuaNbsR3E8aKq3WttWajYckr8UYoo/nM37gsMwmJWELNz exbTGjmzbb+W3dMvXHwDW2QWWbXTDXnJndM9wu3IBp01pLPP5Uk7ucQ4J M=;
Authentication-Results: sj-iport-1.cisco.com; dkim=neutral (message not signed) header.i=none
X-Files: smime.p7s : 1760
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApoEAB3G3kqrRN+J/2dsb2JhbADDZ4kejzuCU4FeBIFciSc
X-IronPort-AV: E=Sophos;i="4.44,597,1249257600";  d="p7s'?scan'208";a="259287526"
Received: from sj-core-3.cisco.com ([171.68.223.137]) by sj-iport-1.cisco.com with ESMTP; 21 Oct 2009 15:29:09 +0000
Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by sj-core-3.cisco.com (8.13.8/8.14.3) with ESMTP id n9LFT9gj001435; Wed, 21 Oct 2009 15:29:09 GMT
Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Wed, 21 Oct 2009 08:29:09 -0700
Received: from stealth-10-32-254-212.cisco.com ([10.32.254.212]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Wed, 21 Oct 2009 08:29:08 -0700
Message-Id: <89F9203E-440C-44A8-BA5D-31A1C4A6453D@cisco.com>
From: David McGrew <mcgrew@cisco.com>
To: Peter Gutmann <pgut001@cs.auckland.ac.nz>, Dan Brown <dbrown@certicom.com>, David Jacobson <dmjacobson@sbcglobal.net>
In-Reply-To: <E1N0PO7-0001YN-HW@wintermute01.cs.auckland.ac.nz>
Content-Type: multipart/signed; boundary=Apple-Mail-76-806356603; micalg=sha1; protocol="application/pkcs7-signature"
Mime-Version: 1.0 (Apple Message framework v936)
Date: Wed, 21 Oct 2009 08:29:06 -0700
References: <E1N0PO7-0001YN-HW@wintermute01.cs.auckland.ac.nz>
X-Mailer: Apple Mail (2.936)
X-OriginalArrivalTime: 21 Oct 2009 15:29:09.0274 (UTC) FILETIME=[3BD81FA0:01CA5263]
Cc: "Pasi.Eronen@nokia.com Eronen" <Pasi.Eronen@nokia.com>, cfrg@irtf.org, Hugo Krawczyk <hugo@ee.technion.ac.il>
Subject: [Cfrg] existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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, 21 Oct 2009 15:29:02 -0000

--Apple-Mail-76-806356603
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

Hi Peter, Dan, and David,

> "Dan Brown" <dbrown@certicom.com> writes:
>
>> 2.  The menagerie of key derivation functions (i.e. DH-like shared  
>> secret
>> value to symmetric key, which unlike key generation are needed for
>> interoperability) such as IEEE KDF1 and KDF2, ANSI X9.63 X9.42,  
>> NIST SP
>> 800-56A, TLS-PRF, and IKE, and now HKDF,
>

Peter Gutmann wrote:
> You missed out the SSH one, and what S/MIME uses for its DH keying,  
> and there
> are probably several others as well used in lesser-known protocols.   
> In fact
> every protocol that I know of has invented its own KDF, incompatible  
> with
> every other KDF out there, thus my question about why we need yet  
> another one.

David Jacobson wrote:
> NIST SP 800-90, which is actually about random number generation,  
> specifies two extractors, which it calls Derivation Functions, in  
> Section 10.4.1 and 10.4.2. These are hash based and block cipher  
> based, respectively.  Both can deal with generating internal key  
> material wider than a single block.  (I write "internal key  
> material" because the data so generated is used to as input to the  
> expansion function.)

good points, and it looks like underestimated the number of KDFs used  
to extract keys from DH in my note yesterday.   It would be valuable  
to list and categorize all of these functions and their uses, to  
better understand the situation.  Collecting text from all of our  
emails, here is a start:
Uses:
  1. Generate one key from another. In this case, no extraction stage  
is needed.
  2. Generate a key from a DH shared secret.  In this case,  
computational extraction seems to be needed, because statistical  
extraction would be inefficient.

  3. Generate key material from a non-uniform random source.  In this  
case, either statistical or computational extraction could be used.

   4. Generate a key from a passphrase.

KDFs:
P_SHA256 from Section 5 of RFC 5246, The Transport Layer Security  
(TLS) Protocol, Version 1.2.  (HMAC in an OFB mode variant)   Uses #1  
and #2.
P_MD5 XOR P_SHA1 from Section 5 of RFC 4346, The Transport Layer  
Security (TLS) Protocol Version 1.1.  (HMAC in an OFB mode variant,  
XORed with MD5 in the same mode.)  Uses #1 and #2.
AES-CMAC-PRF-128 from RFC 4615, The Advanced Encryption Standard- 
Cipher-based Message Authentication Code-Pseudo-Random Function-128  
(AES-CMAC-PRF-128) Algorithm for the Internet Key Exchange Protocol  
(IKE).   Uses #1 and #2.

PRF+ from Section 2.13 of RFC 4306, IKEv2.   (HMAC in counter mode.)   
Uses #1 and #2.

SSH-KDF, Section 7.2 of RFC4253, The Secure Shell (SSH) Transport  
Layer Protocol.  (Hash function in counter mode.)  Uses #1 and #2.

AES-CM-PRF, Section 4.3.3 of RFC3711, The Secure Real-time Transport  
Protocol.

S/MIME DH KDF.  Section 2.1.2 of RFC 2631.  (Hash function.)  (Is this  
really the most up-to-date reference for SMIME DH?)   Uses #1 and #2.
Krb5-KDF from RFC 4402 A Pseudo-Random Function (PRF) for the Kerberos  
V Generic Security Service Application Program Interface (GSS-API)  
Mechanism.  (Hash function in counter mode.)  Use #1.

PBKDF1 (Hash function in OFB mode.) PBKDF2 (HMAC iterated, with all of  
the iterates XORed together.) from RFC2898, PKCS #5: Password-Based  
Cryptography Specification Version 2.0.   Use #4.

IEEE KDF1 (Hash function.)   Uses #1 and #2.

IEEE KDF2 (Hash function in counter mode.)   Uses #1 and #2.

ANSI X9.42 (Hash function.)   Uses #1 and #2.

ANSI X9.63 (Hash function in counter mode.)   Uses #1 and #2.

NIST SP 800-56A Concatenation-KDF and ASN.1-KDF (Hash function in  
counter mode.)   Uses #1 and #2.

NIST SP 800-90, Section 10.4 defines two extractors (hash function in  
counter mode, and a block cipher mode) and Sections 10.1, 10.2, and  
10.3 define some "expanders".   Use #3.

Additions and corrections are welcome.  Also, pointers to security  
analyses would be good to have, wherever they exist.
For each of these functions, it would be good to know a) under what  
conditions is it secure (e.g. what has to be assumed of the hash  
function) b) where and how is it used, c) does the protocol using it  
admit the replacement of its KDF, and if so, d) what is its interface  
(does it take a "salt" input, for example).
David
--Apple-Mail-76-806356603
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDnjCCA5ow
ggKCoAMCAQICAWQwCwYJKoZIhvcNAQEFMG0xFTATBgNVBAMMDERhdmlkIE1jR3JldzETMBEGA1UE
CAwKQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMxETAPBgNVBAcMCFNhbiBKb3NlMR8wHQYJKoZIhvcN
AQkBFhBtY2dyZXdAY2lzY28uY29tMB4XDTA4MTIwOTIyMDMzMFoXDTA5MTIwOTIyMDMzMFowbTEV
MBMGA1UEAwwMRGF2aWQgTWNHcmV3MRMwEQYDVQQIDApDYWxpZm9ybmlhMQswCQYDVQQGEwJVUzER
MA8GA1UEBwwIU2FuIEpvc2UxHzAdBgkqhkiG9w0BCQEWEG1jZ3Jld0BjaXNjby5jb20wggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDh5WR1gATRK4ubbWwmG2T/XTUeVc2FAxnmtoYy00fM
5jp3DYFXHkWj4Cl8RVVfAJxP/2PhKsTl0qx2b7N9pIZZa6BaODEyJ8yVMRHloHrpzHeU8DIrst/H
SFVkcJvl3p9LFD42BCvznzQ48VxnWX68OCk7GAwg6XoKMY8Z1F70PVvcZ0JcbnDuKx0efQ+P74uY
UdpjRYSXb2xJUziGs5k6b1kTr5754B3tnYCGkum49YAbONpsOL4R+e4HNNrkVTx254ggrcDb1GDr
IpZYCSPh6lZWwOp0XBoJiLYEKXuBf/jSNEv15/Kt/Uu5Oh8jUBxkBHGAVZuaVu25s3Zk9waLAgMB
AAGjRzBFMA4GA1UdDwEB/wQEAwIEsDAWBgNVHSUBAf8EDDAKBggrBgEFBQcDBDAbBgNVHREEFDAS
gRBtY2dyZXdAY2lzY28uY29tMA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0G
CSqGSIb3DQEBAQUABIIBAAdV6+uy+BffnBmbHZOfkSchR8JoHlJ8EesX+Mbcb9w1xJRuloCz+P1Z
/aEHDsqJ4zER40DgaN0vMIRLZVAo8xik4k41XUlue6LrxYpRz1wUqq5627pRLTmLcIVb5iOW9PlF
pmyod0fain8bG5C9JhE845pgYCKMPM0WsFb9jTnfnZdw6U2HnzzyUz+nwe8iBiOFDTfcdZJGoqSI
/A0wwBlsM8Be305Yq+8vVCiNrhK/hJEpvAe2/py6TBjIakXFe/HBsYz/bIxLBkabauSkIeR5JbF8
8xeAOv+T14m3B/6TCbOqZqnW4C3IcOdQ59RJSnLXWGRXjTtOqD4w8yUpPF4AAAAAAAA=

--Apple-Mail-76-806356603--

From uri@ll.mit.edu  Wed Oct 21 08:41:31 2009
Return-Path: <uri@ll.mit.edu>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 08D5B28C118 for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 08:41:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.429
X-Spam-Level: 
X-Spam-Status: No, score=-6.429 tagged_above=-999 required=5 tests=[AWL=0.169,  BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, UNPARSEABLE_RELAY=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XGeoipr1MlTe for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 08:41:29 -0700 (PDT)
Received: from ll.mit.edu (LLMAIL1.LL.MIT.EDU [129.55.12.41]) by core3.amsl.com (Postfix) with ESMTP id 73F403A69A8 for <cfrg@irtf.org>; Wed, 21 Oct 2009 08:41:29 -0700 (PDT)
Received: (from smtp@localhost) by ll.mit.edu (8.12.10/8.8.8) id n9LFfQEr015532; Wed, 21 Oct 2009 11:41:26 -0400 (EDT)
Received: from lle2k7-hub01.llan.ll.mit.edu(            ), claiming to be "LLE2K7-HUB01.mitll.ad.local" via SMTP by llpost, id smtpdAAAWVaqwi; Wed Oct 21 11:33:46 2009
Received: from LLE2K7-BE01.mitll.ad.local ([            ]) by LLE2K7-HUB01.mitll.ad.local ([            ]) with mapi; Wed, 21 Oct 2009 11:33:46 -0400
From: "Blumenthal, Uri" <uri@ll.mit.edu>
To: "'mcgrew@cisco.com'" <mcgrew@cisco.com>, "'pgut001@cs.auckland.ac.nz'" <pgut001@cs.auckland.ac.nz>, "'dbrown@certicom.com'" <dbrown@certicom.com>, "'dmjacobson@sbcglobal.net'" <dmjacobson@sbcglobal.net>
Date: Wed, 21 Oct 2009 11:33:22 -0400
Thread-Topic: [Cfrg] existing KDFs and their uses
Thread-Index: AcpSYzY/Zvt1Nl7uR+ertHaU4dzBRgAAKojz
Message-ID: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: "'cfrg@irtf.org'" <cfrg@irtf.org>
Subject: Re: [Cfrg] existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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, 21 Oct 2009 15:41:31 -0000

U28gaGF2aW5nIHRo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N1cmUgKGUuZy4gd2hhdCBoYXMgdG8gYmUgYXNzdW1lZCBvZiB0
aGUgaGFzaCAgDQpmdW5jdGlvbikgYikgd2hlcmUgYW5kIGhvdyBpcyBpdCB1c2VkLCBjKSBkb2Vz
IHRoZSBwcm90b2NvbCB1c2luZyBpdCAgDQphZG1pdCB0aGUgcmVwbGFjZW1lbnQgb2YgaXRzIEtE
RiwgYW5kIGlmIHNvLCBkKSB3aGF0IGlzIGl0cyBpbnRlcmZhY2UgIA0KKGRvZXMgaXQgdGFrZSBh
ICJzYWx0IiBpbnB1dCwgZm9yIGV4YW1wbGUpLg0KRGF2aWQ=

From simon@josefsson.org  Wed Oct 21 09:48:37 2009
Return-Path: <simon@josefsson.org>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 5D4F128C101 for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 09:48:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.224
X-Spam-Level: 
X-Spam-Status: No, score=-2.224 tagged_above=-999 required=5 tests=[AWL=-0.375, BAYES_00=-2.599, SARE_OBFU_ALL=0.751]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sX2oqldQ9vHX for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 09:48:36 -0700 (PDT)
Received: from yxa-v.extundo.com (yxa-v.extundo.com [83.241.177.39]) by core3.amsl.com (Postfix) with ESMTP id 087C43A68CC for <cfrg@irtf.org>; Wed, 21 Oct 2009 09:48:35 -0700 (PDT)
Received: from mocca.josefsson.org (c80-216-24-211.bredband.comhem.se [80.216.24.211]) (authenticated bits=0) by yxa-v.extundo.com (8.14.3/8.14.3/Debian-5) with ESMTP id n9LGmPsk010069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 21 Oct 2009 18:48:27 +0200
From: Simon Josefsson <simon@josefsson.org>
To: "Blumenthal\, Uri" <uri@ll.mit.edu>
References: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local>
OpenPGP: id=B565716F; url=http://josefsson.org/key.txt
X-Hashcash: 1:22:091021:cfrg@irtf.org::nHzhjnKA1705biBH:Xiw
X-Hashcash: 1:22:091021:mcgrew@cisco.com::f1vv29DfIuVEWV1A:lRQ
X-Hashcash: 1:22:091021:dbrown@certicom.com::bANp4kp9irfkYKNH:4yVM
X-Hashcash: 1:22:091021:<dmjacob::rDvNCPmv+ZjDean9:7xXs
X-Hashcash: 1:22:091021:uri@ll.mit.edu::/t6DiY6ARAO1wnfe:ZpSa
X-Hashcash: 1:22:091021:pgut001@cs.auckland.ac.nz::gKRUP0T5FqB02Csb:M+En
Date: Wed, 21 Oct 2009 18:48:25 +0200
In-Reply-To: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local> (Uri Blumenthal's message of "Wed, 21 Oct 2009 11:33:22 -0400")
Message-ID: <87bpk0y9pi.fsf@mocca.josefsson.org>
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: clamav-milter 0.95.2 at yxa-v
X-Virus-Status: Clean
Cc: dbrown@certicom.com, mcgrew@cisco.com, cfrg@irtf.org, pgut001@cs.auckland.ac.nz
Subject: Re: [Cfrg] existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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, 21 Oct 2009 16:48:37 -0000

"Blumenthal, Uri" <uri@ll.mit.edu> writes:

> So having this many different KDF's - why do we need one more, and how is it more secure (and more "random") than those already standardized??? 

That is a reasonable question.  So far I haven't seen any answer to why
there is any need to make HKDF applicable to the medium-entropy password
scenario.  If I missed any argument in the recent flurry of e-mails,
please remind me.

/Simon

>
> ----- Original Message -----
> From: cfrg-bounces@irtf.org <cfrg-bounces@irtf.org>
> To: Peter Gutmann <pgut001@cs.auckland.ac.nz>; Dan Brown <dbrown@certicom.com>; David Jacobson <dmjacobson@sbcglobal.net>
> Cc: Pasi.Eronen@nokia.com Eronen <Pasi.Eronen@nokia.com>; cfrg@irtf.org <cfrg@irtf.org>; Hugo Krawczyk <hugo@ee.technion.ac.il>
> Sent: Wed Oct 21 11:29:06 2009
> Subject: [Cfrg] existing KDFs and their uses
>
> Hi Peter, Dan, and David,
>
>> "Dan Brown" <dbrown@certicom.com> writes:
>>
>>> 2.  The menagerie of key derivation functions (i.e. DH-like shared  
>>> secret
>>> value to symmetric key, which unlike key generation are needed for
>>> interoperability) such as IEEE KDF1 and KDF2, ANSI X9.63 X9.42,  
>>> NIST SP
>>> 800-56A, TLS-PRF, and IKE, and now HKDF,
>>
>
> Peter Gutmann wrote:
>> You missed out the SSH one, and what S/MIME uses for its DH keying,  
>> and there
>> are probably several others as well used in lesser-known protocols.   
>> In fact
>> every protocol that I know of has invented its own KDF, incompatible  
>> with
>> every other KDF out there, thus my question about why we need yet  
>> another one.
>
> David Jacobson wrote:
>> NIST SP 800-90, which is actually about random number generation,  
>> specifies two extractors, which it calls Derivation Functions, in  
>> Section 10.4.1 and 10.4.2. These are hash based and block cipher  
>> based, respectively.  Both can deal with generating internal key  
>> material wider than a single block.  (I write "internal key  
>> material" because the data so generated is used to as input to the  
>> expansion function.)
>
> good points, and it looks like underestimated the number of KDFs used  
> to extract keys from DH in my note yesterday.   It would be valuable  
> to list and categorize all of these functions and their uses, to  
> better understand the situation.  Collecting text from all of our  
> emails, here is a start:
> Uses:
>   1. Generate one key from another. In this case, no extraction stage  
> is needed.
>   2. Generate a key from a DH shared secret.  In this case,  
> computational extraction seems to be needed, because statistical  
> extraction would be inefficient.
>
>   3. Generate key material from a non-uniform random source.  In this  
> case, either statistical or computational extraction could be used.
>
>    4. Generate a key from a passphrase.
>
> KDFs:
> P_SHA256 from Section 5 of RFC 5246, The Transport Layer Security  
> (TLS) Protocol, Version 1.2.  (HMAC in an OFB mode variant)   Uses #1  
> and #2.
> P_MD5 XOR P_SHA1 from Section 5 of RFC 4346, The Transport Layer  
> Security (TLS) Protocol Version 1.1.  (HMAC in an OFB mode variant,  
> XORed with MD5 in the same mode.)  Uses #1 and #2.
> AES-CMAC-PRF-128 from RFC 4615, The Advanced Encryption Standard- 
> Cipher-based Message Authentication Code-Pseudo-Random Function-128  
> (AES-CMAC-PRF-128) Algorithm for the Internet Key Exchange Protocol  
> (IKE).   Uses #1 and #2.
>
> PRF+ from Section 2.13 of RFC 4306, IKEv2.   (HMAC in counter mode.)   
> Uses #1 and #2.
>
> SSH-KDF, Section 7.2 of RFC4253, The Secure Shell (SSH) Transport  
> Layer Protocol.  (Hash function in counter mode.)  Uses #1 and #2.
>
> AES-CM-PRF, Section 4.3.3 of RFC3711, The Secure Real-time Transport  
> Protocol.
>
> S/MIME DH KDF.  Section 2.1.2 of RFC 2631.  (Hash function.)  (Is this  
> really the most up-to-date reference for SMIME DH?)   Uses #1 and #2.
> Krb5-KDF from RFC 4402 A Pseudo-Random Function (PRF) for the Kerberos  
> V Generic Security Service Application Program Interface (GSS-API)  
> Mechanism.  (Hash function in counter mode.)  Use #1.
>
> PBKDF1 (Hash function in OFB mode.) PBKDF2 (HMAC iterated, with all of  
> the iterates XORed together.) from RFC2898, PKCS #5: Password-Based  
> Cryptography Specification Version 2.0.   Use #4.
>
> IEEE KDF1 (Hash function.)   Uses #1 and #2.
>
> IEEE KDF2 (Hash function in counter mode.)   Uses #1 and #2.
>
> ANSI X9.42 (Hash function.)   Uses #1 and #2.
>
> ANSI X9.63 (Hash function in counter mode.)   Uses #1 and #2.
>
> NIST SP 800-56A Concatenation-KDF and ASN.1-KDF (Hash function in  
> counter mode.)   Uses #1 and #2.
>
> NIST SP 800-90, Section 10.4 defines two extractors (hash function in  
> counter mode, and a block cipher mode) and Sections 10.1, 10.2, and  
> 10.3 define some "expanders".   Use #3.
>
> Additions and corrections are welcome.  Also, pointers to security  
> analyses would be good to have, wherever they exist.
> For each of these functions, it would be good to know a) under what  
> conditions is it secure (e.g. what has to be assumed of the hash  
> function) b) where and how is it used, c) does the protocol using it  
> admit the replacement of its KDF, and if so, d) what is its interface  
> (does it take a "salt" input, for example).
> David

From zooko@zooko.com  Wed Oct 21 12:05:22 2009
Return-Path: <zooko@zooko.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 09B0A3A698F for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 12:05:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.351
X-Spam-Level: 
X-Spam-Status: No, score=-2.351 tagged_above=-999 required=5 tests=[AWL=0.248,  BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iWRb-usSWux4 for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 12:05:20 -0700 (PDT)
Received: from nooxie.zooko.com (nooxie.zooko.com [207.7.145.200]) by core3.amsl.com (Postfix) with ESMTP id E0D0F3A6801 for <cfrg@irtf.org>; Wed, 21 Oct 2009 12:05:20 -0700 (PDT)
Received: from [192.168.1.118] (97-118-105-53.hlrn.qwest.net [97.118.105.53]) by nooxie.zooko.com (Postfix) with ESMTP id 21CD519701; Wed, 21 Oct 2009 12:10:16 -0700 (PDT)
In-Reply-To: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local>
References: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local>
Mime-Version: 1.0 (Apple Message framework v753.1)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <B418D21A-0BC0-4E6E-8063-4D100B94B974@zooko.com>
Content-Transfer-Encoding: 7bit
From: Zooko Wilcox-O'Hearn <zooko@zooko.com>
Date: Wed, 21 Oct 2009 13:05:25 -0600
To: "Blumenthal, Uri" <uri@ll.mit.edu>
X-Mailer: Apple Mail (2.753.1)
Cc: "'dbrown@certicom.com'" <dbrown@certicom.com>, "'mcgrew@cisco.com'" <mcgrew@cisco.com>, "'cfrg@irtf.org'" <cfrg@irtf.org>, "'pgut001@cs.auckland.ac.nz'" <pgut001@cs.auckland.ac.nz>
Subject: [Cfrg] why HKDF?  -- Re:  existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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, 21 Oct 2009 19:05:22 -0000

I'm speaking as a consumer of such standards rather than as a  
producer.  I have already invented my own KDF [1] because, as far as  
I know, the existing specs don't spell out how to generate a random  
key which isn't just a certain number of bytes or bits, but instead a  
random element from a group.  (Fortunately I haven't yet deployed  
this KDF that I invented so I am still free to change it.)

At this time I would probably prefer to use HKDF over the other KDF  
algorithms that I know of because the accompanying full paper [2]  
comes with much more thorough arguments about its theoretical  
security properties.  It isn't perfect for me!  As I mentioned in my  
initial questions, HKDF has the same omission that the others do in  
specifying how to generate keys which aren't just byte sequences, and  
it isn't entirely clear to me whether the security arguments for HKDF  
are predicated on the underlying primitive being HMAC, being a MAC,  
being a PRF, or what.  (I am more comfortable relying on AES or  
Salsa20 to be like an ideal cipher than relying on SHA-256 or SHA-512  
to be like an ideal hash function.)

Also I don't know which of those same security arguments apply to the  
other KDFs.

Also it isn't clear whether I should skip the extract step when my  
original key is already densely packed with nutritious entropy.

However, as things stand I would much rather use HKDF since it is  
apparent that someone (Hugo Krawczyck) has spent the effort to  
analyze and write down a bunch of relevant security arguments.   
HKDF's rigorous reductions (as far as I understand them) and its  
heuristic design both look good to me.

Regards,

Zooko

[1] http://allmydata.org/trac/pycryptopp/browser/pycryptopp/publickey/ 
ecdsamodule.cpp?rev=672#L269
[2] http://webee.technion.ac.il/~hugo/kdf/kdf.pdf

From Pasi.Eronen@nokia.com  Wed Oct 21 13:03:26 2009
Return-Path: <Pasi.Eronen@nokia.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 3A81B3A677E for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 13:03:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.591
X-Spam-Level: 
X-Spam-Status: No, score=-6.591 tagged_above=-999 required=5 tests=[AWL=0.008,  BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7jNLfJewki7H for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 13:03:25 -0700 (PDT)
Received: from mgw-mx06.nokia.com (smtp.nokia.com [192.100.122.233]) by core3.amsl.com (Postfix) with ESMTP id 734823A68D0 for <cfrg@irtf.org>; Wed, 21 Oct 2009 13:03:24 -0700 (PDT)
Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9LK3G8N005864; Wed, 21 Oct 2009 23:03:17 +0300
Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959);  Wed, 21 Oct 2009 23:03:11 +0300
Received: from smtp.mgd.nokia.com ([65.54.30.6]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959);  Wed, 21 Oct 2009 23:03:11 +0300
Received: from NOK-EUMSG-01.mgdnok.nokia.com ([65.54.30.86]) by nok-am1mhub-02.mgdnok.nokia.com ([65.54.30.6]) with mapi; Wed, 21 Oct 2009 22:03:10 +0200
From: <Pasi.Eronen@nokia.com>
To: <uri@ll.mit.edu>, <mcgrew@cisco.com>, <pgut001@cs.auckland.ac.nz>, <dbrown@certicom.com>, <dmjacobson@sbcglobal.net>
Date: Wed, 21 Oct 2009 22:03:09 +0200
Thread-Topic: [Cfrg] existing KDFs and their uses
Thread-Index: AcpSYzY/Zvt1Nl7uR+ertHaU4dzBRgAAKojzAAjvsGA=
Message-ID: <808FD6E27AD4884E94820BC333B2DB773C09AD285C@NOK-EUMSG-01.mgdnok.nokia.com>
References: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local>
In-Reply-To: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginalArrivalTime: 21 Oct 2009 20:03:11.0178 (UTC) FILETIME=[83FB92A0:01CA5289]
X-Nokia-AV: Clean
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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, 21 Oct 2009 20:03:26 -0000

Uri and Peter,

This is not a new KDF; it's the IKEv2 PRF+ (also used in PANA and EAP-AKA')=
.
So we're *not* proposing creating one more.
=20
This is merely moving the KDF specification to a stand-alone document,
so it would be easier to reference it from new protocol specifications=20
(that would like to avoid both (1) normative reference to RFC 4306, and=20
(2) copy-pasting the specification from RFC 4306).=20

(BTW, I'm speaking from personal experience here -- in RFC 5448, we=20
ended up copy-pasting the specification...)

Best regards,
Pasi

> -----Original Message-----
> From: cfrg-bounces@irtf.org [mailto:cfrg-bounces@irtf.org] On Behalf Of
> ext Blumenthal, Uri
> Sent: 21 October, 2009 18:33
> To: 'mcgrew@cisco.com'; 'pgut001@cs.auckland.ac.nz';
> 'dbrown@certicom.com'; 'dmjacobson@sbcglobal.net'
> Cc: 'cfrg@irtf.org'
> Subject: Re: [Cfrg] existing KDFs and their uses
>=20
> So having this many different KDF's - why do we need one more, and how
> is it more secure (and more "random") than those already
> standardized???
>=20
>=20
> ----- Original Message -----
> From: cfrg-bounces@irtf.org <cfrg-bounces@irtf.org>
> To: Peter Gutmann <pgut001@cs.auckland.ac.nz>; Dan Brown
> <dbrown@certicom.com>; David Jacobson <dmjacobson@sbcglobal.net>
> Cc: Pasi.Eronen@nokia.com Eronen <Pasi.Eronen@nokia.com>; cfrg@irtf.org
> <cfrg@irtf.org>; Hugo Krawczyk <hugo@ee.technion.ac.il>
> Sent: Wed Oct 21 11:29:06 2009
> Subject: [Cfrg] existing KDFs and their uses
>=20
> Hi Peter, Dan, and David,
>=20
> > "Dan Brown" <dbrown@certicom.com> writes:
> >
> >> 2.  The menagerie of key derivation functions (i.e. DH-like shared
> >> secret
> >> value to symmetric key, which unlike key generation are needed for
> >> interoperability) such as IEEE KDF1 and KDF2, ANSI X9.63 X9.42,
> >> NIST SP
> >> 800-56A, TLS-PRF, and IKE, and now HKDF,
> >
>=20
> Peter Gutmann wrote:
> > You missed out the SSH one, and what S/MIME uses for its DH keying,
> > and there
> > are probably several others as well used in lesser-known protocols.
> > In fact
> > every protocol that I know of has invented its own KDF, incompatible
> > with
> > every other KDF out there, thus my question about why we need yet
> > another one.
>=20
> David Jacobson wrote:
> > NIST SP 800-90, which is actually about random number generation,
> > specifies two extractors, which it calls Derivation Functions, in
> > Section 10.4.1 and 10.4.2. These are hash based and block cipher
> > based, respectively.  Both can deal with generating internal key
> > material wider than a single block.  (I write "internal key
> > material" because the data so generated is used to as input to the
> > expansion function.)
>=20
> good points, and it looks like underestimated the number of KDFs used
> to extract keys from DH in my note yesterday.   It would be valuable
> to list and categorize all of these functions and their uses, to
> better understand the situation.  Collecting text from all of our
> emails, here is a start:
> Uses:
>   1. Generate one key from another. In this case, no extraction stage
> is needed.
>   2. Generate a key from a DH shared secret.  In this case,
> computational extraction seems to be needed, because statistical
> extraction would be inefficient.
>=20
>   3. Generate key material from a non-uniform random source.  In this
> case, either statistical or computational extraction could be used.
>=20
>    4. Generate a key from a passphrase.
>=20
> KDFs:
> P_SHA256 from Section 5 of RFC 5246, The Transport Layer Security
> (TLS) Protocol, Version 1.2.  (HMAC in an OFB mode variant)   Uses #1
> and #2.
> P_MD5 XOR P_SHA1 from Section 5 of RFC 4346, The Transport Layer
> Security (TLS) Protocol Version 1.1.  (HMAC in an OFB mode variant,
> XORed with MD5 in the same mode.)  Uses #1 and #2.
> AES-CMAC-PRF-128 from RFC 4615, The Advanced Encryption Standard-
> Cipher-based Message Authentication Code-Pseudo-Random Function-128
> (AES-CMAC-PRF-128) Algorithm for the Internet Key Exchange Protocol
> (IKE).   Uses #1 and #2.
>=20
> PRF+ from Section 2.13 of RFC 4306, IKEv2.   (HMAC in counter mode.)
> Uses #1 and #2.
>=20
> SSH-KDF, Section 7.2 of RFC4253, The Secure Shell (SSH) Transport
> Layer Protocol.  (Hash function in counter mode.)  Uses #1 and #2.
>=20
> AES-CM-PRF, Section 4.3.3 of RFC3711, The Secure Real-time Transport
> Protocol.
>=20
> S/MIME DH KDF.  Section 2.1.2 of RFC 2631.  (Hash function.)  (Is this
> really the most up-to-date reference for SMIME DH?)   Uses #1 and #2.
> Krb5-KDF from RFC 4402 A Pseudo-Random Function (PRF) for the Kerberos
> V Generic Security Service Application Program Interface (GSS-API)
> Mechanism.  (Hash function in counter mode.)  Use #1.
>=20
> PBKDF1 (Hash function in OFB mode.) PBKDF2 (HMAC iterated, with all of
> the iterates XORed together.) from RFC2898, PKCS #5: Password-Based
> Cryptography Specification Version 2.0.   Use #4.
>=20
> IEEE KDF1 (Hash function.)   Uses #1 and #2.
>=20
> IEEE KDF2 (Hash function in counter mode.)   Uses #1 and #2.
>=20
> ANSI X9.42 (Hash function.)   Uses #1 and #2.
>=20
> ANSI X9.63 (Hash function in counter mode.)   Uses #1 and #2.
>=20
> NIST SP 800-56A Concatenation-KDF and ASN.1-KDF (Hash function in
> counter mode.)   Uses #1 and #2.
>=20
> NIST SP 800-90, Section 10.4 defines two extractors (hash function in
> counter mode, and a block cipher mode) and Sections 10.1, 10.2, and
> 10.3 define some "expanders".   Use #3.
>=20
> Additions and corrections are welcome.  Also, pointers to security
> analyses would be good to have, wherever they exist.
> For each of these functions, it would be good to know a) under what
> conditions is it secure (e.g. what has to be assumed of the hash
> function) b) where and how is it used, c) does the protocol using it
> admit the replacement of its KDF, and if so, d) what is its interface
> (does it take a "salt" input, for example).
> David
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> http://www.irtf.org/mailman/listinfo/cfrg

From dharkins@lounge.org  Wed Oct 21 14:17:09 2009
Return-Path: <dharkins@lounge.org>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 557903A6A18 for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 14:17:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.265
X-Spam-Level: 
X-Spam-Status: No, score=-6.265 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YkCr5Yu0P6XD for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 14:17:08 -0700 (PDT)
Received: from colo.trepanning.net (colo.trepanning.net [69.55.226.174]) by core3.amsl.com (Postfix) with ESMTP id 3334A3A6A11 for <cfrg@irtf.org>; Wed, 21 Oct 2009 14:17:08 -0700 (PDT)
Received: from www.trepanning.net (localhost [127.0.0.1]) by colo.trepanning.net (Postfix) with ESMTP id 46D8C10224074; Wed, 21 Oct 2009 14:17:16 -0700 (PDT)
Received: from 69.12.173.8 (SquirrelMail authenticated user dharkins@lounge.org) by www.trepanning.net with HTTP; Wed, 21 Oct 2009 14:17:16 -0700 (PDT)
Message-ID: <a4cba530b530e4026f49464d9e2ff73a.squirrel@www.trepanning.net>
In-Reply-To: <808FD6E27AD4884E94820BC333B2DB773C09AD285C@NOK-EUMSG-01.mgdnok.nokia. com>
References: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local> <808FD6E27AD4884E94820BC333B2DB773C09AD285C@NOK-EUMSG-01.mgdnok.nokia.com>
Date: Wed, 21 Oct 2009 14:17:16 -0700 (PDT)
From: "Dan Harkins" <dharkins@lounge.org>
To: Pasi.Eronen@nokia.com
User-Agent: SquirrelMail/1.4.14 [SVN]
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
Cc: pgut001@cs.auckland.ac.nz, dbrown@certicom.com, cfrg@irtf.org, mcgrew@cisco.com
Subject: Re: [Cfrg] existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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, 21 Oct 2009 21:17:09 -0000

  Hi Pasi,

  You're generalizing IKEv2's KDF. Specifically, you're loosening
the requirements on the "salt" to the extract function. In IKEv2
each side contributes a nonce, which cannot be reused (!!), and the
concatenation of them becomes the key to a pseudo-random function,
which is the "extract" phase of HKDF. But in HKDF the "salt" can be
reused or it can not even exist.

  What properties does HMAC-SHA256(0^32, X) have that SHA-256(X | X)
doesn't?

  Dan.

On Wed, October 21, 2009 1:03 pm, Pasi.Eronen@nokia.com wrote:
> Uri and Peter,
>
> This is not a new KDF; it's the IKEv2 PRF+ (also used in PANA and
> EAP-AKA').
> So we're *not* proposing creating one more.
>
> This is merely moving the KDF specification to a stand-alone document,
> so it would be easier to reference it from new protocol specifications
> (that would like to avoid both (1) normative reference to RFC 4306, and
> (2) copy-pasting the specification from RFC 4306).
>
> (BTW, I'm speaking from personal experience here -- in RFC 5448, we
> ended up copy-pasting the specification...)
>
> Best regards,
> Pasi
>
>> -----Original Message-----
>> From: cfrg-bounces@irtf.org [mailto:cfrg-bounces@irtf.org] On Behalf Of
>> ext Blumenthal, Uri
>> Sent: 21 October, 2009 18:33
>> To: 'mcgrew@cisco.com'; 'pgut001@cs.auckland.ac.nz';
>> 'dbrown@certicom.com'; 'dmjacobson@sbcglobal.net'
>> Cc: 'cfrg@irtf.org'
>> Subject: Re: [Cfrg] existing KDFs and their uses
>>
>> So having this many different KDF's - why do we need one more, and how
>> is it more secure (and more "random") than those already
>> standardized???
>>
>>
>> ----- Original Message -----
>> From: cfrg-bounces@irtf.org <cfrg-bounces@irtf.org>
>> To: Peter Gutmann <pgut001@cs.auckland.ac.nz>; Dan Brown
>> <dbrown@certicom.com>; David Jacobson <dmjacobson@sbcglobal.net>
>> Cc: Pasi.Eronen@nokia.com Eronen <Pasi.Eronen@nokia.com>; cfrg@irtf.org
>> <cfrg@irtf.org>; Hugo Krawczyk <hugo@ee.technion.ac.il>
>> Sent: Wed Oct 21 11:29:06 2009
>> Subject: [Cfrg] existing KDFs and their uses
>>
>> Hi Peter, Dan, and David,
>>
>> > "Dan Brown" <dbrown@certicom.com> writes:
>> >
>> >> 2.  The menagerie of key derivation functions (i.e. DH-like shared
>> >> secret
>> >> value to symmetric key, which unlike key generation are needed for
>> >> interoperability) such as IEEE KDF1 and KDF2, ANSI X9.63 X9.42,
>> >> NIST SP
>> >> 800-56A, TLS-PRF, and IKE, and now HKDF,
>> >
>>
>> Peter Gutmann wrote:
>> > You missed out the SSH one, and what S/MIME uses for its DH keying,
>> > and there
>> > are probably several others as well used in lesser-known protocols.
>> > In fact
>> > every protocol that I know of has invented its own KDF, incompatible
>> > with
>> > every other KDF out there, thus my question about why we need yet
>> > another one.
>>
>> David Jacobson wrote:
>> > NIST SP 800-90, which is actually about random number generation,
>> > specifies two extractors, which it calls Derivation Functions, in
>> > Section 10.4.1 and 10.4.2. These are hash based and block cipher
>> > based, respectively.  Both can deal with generating internal key
>> > material wider than a single block.  (I write "internal key
>> > material" because the data so generated is used to as input to the
>> > expansion function.)
>>
>> good points, and it looks like underestimated the number of KDFs used
>> to extract keys from DH in my note yesterday.   It would be valuable
>> to list and categorize all of these functions and their uses, to
>> better understand the situation.  Collecting text from all of our
>> emails, here is a start:
>> Uses:
>>   1. Generate one key from another. In this case, no extraction stage
>> is needed.
>>   2. Generate a key from a DH shared secret.  In this case,
>> computational extraction seems to be needed, because statistical
>> extraction would be inefficient.
>>
>>   3. Generate key material from a non-uniform random source.  In this
>> case, either statistical or computational extraction could be used.
>>
>>    4. Generate a key from a passphrase.
>>
>> KDFs:
>> P_SHA256 from Section 5 of RFC 5246, The Transport Layer Security
>> (TLS) Protocol, Version 1.2.  (HMAC in an OFB mode variant)   Uses #1
>> and #2.
>> P_MD5 XOR P_SHA1 from Section 5 of RFC 4346, The Transport Layer
>> Security (TLS) Protocol Version 1.1.  (HMAC in an OFB mode variant,
>> XORed with MD5 in the same mode.)  Uses #1 and #2.
>> AES-CMAC-PRF-128 from RFC 4615, The Advanced Encryption Standard-
>> Cipher-based Message Authentication Code-Pseudo-Random Function-128
>> (AES-CMAC-PRF-128) Algorithm for the Internet Key Exchange Protocol
>> (IKE).   Uses #1 and #2.
>>
>> PRF+ from Section 2.13 of RFC 4306, IKEv2.   (HMAC in counter mode.)
>> Uses #1 and #2.
>>
>> SSH-KDF, Section 7.2 of RFC4253, The Secure Shell (SSH) Transport
>> Layer Protocol.  (Hash function in counter mode.)  Uses #1 and #2.
>>
>> AES-CM-PRF, Section 4.3.3 of RFC3711, The Secure Real-time Transport
>> Protocol.
>>
>> S/MIME DH KDF.  Section 2.1.2 of RFC 2631.  (Hash function.)  (Is this
>> really the most up-to-date reference for SMIME DH?)   Uses #1 and #2.
>> Krb5-KDF from RFC 4402 A Pseudo-Random Function (PRF) for the Kerberos
>> V Generic Security Service Application Program Interface (GSS-API)
>> Mechanism.  (Hash function in counter mode.)  Use #1.
>>
>> PBKDF1 (Hash function in OFB mode.) PBKDF2 (HMAC iterated, with all of
>> the iterates XORed together.) from RFC2898, PKCS #5: Password-Based
>> Cryptography Specification Version 2.0.   Use #4.
>>
>> IEEE KDF1 (Hash function.)   Uses #1 and #2.
>>
>> IEEE KDF2 (Hash function in counter mode.)   Uses #1 and #2.
>>
>> ANSI X9.42 (Hash function.)   Uses #1 and #2.
>>
>> ANSI X9.63 (Hash function in counter mode.)   Uses #1 and #2.
>>
>> NIST SP 800-56A Concatenation-KDF and ASN.1-KDF (Hash function in
>> counter mode.)   Uses #1 and #2.
>>
>> NIST SP 800-90, Section 10.4 defines two extractors (hash function in
>> counter mode, and a block cipher mode) and Sections 10.1, 10.2, and
>> 10.3 define some "expanders".   Use #3.
>>
>> Additions and corrections are welcome.  Also, pointers to security
>> analyses would be good to have, wherever they exist.
>> For each of these functions, it would be good to know a) under what
>> conditions is it secure (e.g. what has to be assumed of the hash
>> function) b) where and how is it used, c) does the protocol using it
>> admit the replacement of its KDF, and if so, d) what is its interface
>> (does it take a "salt" input, for example).
>> David
>> _______________________________________________
>> Cfrg mailing list
>> Cfrg@irtf.org
>> http://www.irtf.org/mailman/listinfo/cfrg
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> http://www.irtf.org/mailman/listinfo/cfrg
>



From hugokraw@gmail.com  Wed Oct 21 15:44:08 2009
Return-Path: <hugokraw@gmail.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6FBB528C107 for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 15:44:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.376
X-Spam-Level: 
X-Spam-Status: No, score=-1.376 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_31=0.6]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pX6jr7eJpbpq for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 15:44:06 -0700 (PDT)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by core3.amsl.com (Postfix) with ESMTP id 0176A3A68EA for <cfrg@irtf.org>; Wed, 21 Oct 2009 15:44:05 -0700 (PDT)
Received: by qw-out-2122.google.com with SMTP id 5so969799qwd.7 for <cfrg@irtf.org>; Wed, 21 Oct 2009 15:44:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=34cNm+DQ1uCCdi4jlZM+DwR4VTMXwLhfd4ONxGjZczQ=; b=wzHQR6yosUfQ/SOXnmfJ6O5xCBFxScT/kx/+XgeGo1CHaxJOl+fT12S8Z3LRO9/2WZ R2cVJdd1sBVyz1AFuYs4rm1VTqWVbfVzZ0KH72EYJLr17Sc8opyJh5NDkH3P82vOEpLl Kcu2uL2okGLhX3zfoPJ8ih1iZHgVoSK998UDM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=okygH9kKZQ/baAUagj0YdGKHDrJ4WboUszFl2gVXgZkAuXkRgVWhbPt0ISUBYrgM95 y708kifUT7iQ5b9QIChfsnjRuQRLIpBBdBW53zt/WkgQvlVFM2jORq5NVLHBbsmZsX6d fVArMRFHq4zX6VUrT1lL2Q3/kZvieTyk9aRks=
MIME-Version: 1.0
Sender: hugokraw@gmail.com
Received: by 10.224.116.137 with SMTP id m9mr4245845qaq.319.1256165052282;  Wed, 21 Oct 2009 15:44:12 -0700 (PDT)
From: Hugo Krawczyk <hugo@ee.technion.ac.il>
Date: Wed, 21 Oct 2009 18:43:52 -0400
X-Google-Sender-Auth: f1a152786d075413
Message-ID: <e89b43830910211543s13ba2705y2e1f5febb201cd9f@mail.gmail.com>
To: cfrg@irtf.org
Content-Type: multipart/alternative; boundary=00c09f9db11bb87df0047679b7b3
Subject: [Cfrg] Rationale for HKDF
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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, 21 Oct 2009 22:44:08 -0000

--00c09f9db11bb87df0047679b7b3
Content-Type: text/plain; charset=ISO-8859-1

There have been many interesting and relevant issues raised in these
discussions. Instead of responding to each message separately I will try to
answer as many of them as I can in this -- not so concise -- message.
(I will then answer some more specific messages separately.)

The issues raised in this discussion and many other aspects of KDF design
and
analysis are much less trivial than they may seem and most do not have a
simple
answer (except if one trivializes the problem assuming we have perfect,
unbreakable hash functions). For that reason I wrote a paper that should
hopefully provide well founded answers that cannot be argued in an email
exchange.  The paper is posted in:
http://webee.technion.ac.il/~hugo/kdf/

I must say that what motivated me to write this paper were the recurring
(and endless) discussions in this cfrg list about basic questions such as
"What is a KDF, What properties define this primitive, Can we achieve them,
analyze them, etc.?"  In spite of the apparent simplicity of KDF as a
cryptographic primitive there are a LOT of subtleties surrounding this
notion,
especially if one is willing to come up with a design that is well-founded
on
current crypto knowledge; can be applied in many different practical
scenarios;
and USES HASH FUNCTIONS AS PRUDENTLY AS POSSIBLE.

The latter is a very  important point and it means that we want to trust our
hash functions as little as possible. For example, if one KDF scheme
requires a
hash function to be fully collision resistant and another will only require
second preimage resistance then the latter should be considered a much
better
design. If one design can only be justified assuming the hash function
behaves
magically as a perfect random function (or random oracle) and another only
requires combinatorial properties of the hash function or the pseudorandom
properties of the compression function then the latter should be favored.
One of the goals of the above paper is to illustrate how common KDFs
(including NIST's, ANSI, etc) ABUSE the hash functions by designing the KDF
under the premise (explicit or implicit) that the hash is some magic object
with perfect randomness.

The HKDF design in turn is much more careful. It is geared to base the
(mathematical) rationale of the scheme on as weak as possible assumptions on
the
underlying hash. True, in some cases (for example, where one is supposed to
extract ALL the entropy of an input without even having a salt value), also
HKDF requires some idealized assumptions. But in many other cases the
scheme can be based on much weaker and realistic assumptions (e.g., HKDF as
used
in IKE with safe-prime DH groups does not require any such ideal modeling
nor
are these assumptions needed in the many realistic cases where you have a
source
of high entropy and a salt value). Even when assuming some random-oracle
type
properties from the hash, we can make a much more sound analysis modeling
the
compression function as random rather than the iterated hash (this is a
prudent
approach as exemplified by extension attacks that work on the iterated hash
but
not on the compression function).

Another very important aspect of HKDF and its analysis is that we are not
asking
the individual user or engineer to study the specifics of his application
and
then decide what KDF to use. We propose a single design that can be
justified
with different assumptions in different scenarios, and does that in quite an
optimal way. It is true that in some particular cases a perfect
combinatorial
extractor will do better analytically and it is fine if an application
decides
to use such extractor; but we want one, as general as possible, scheme that
does
not require the user or engineer to have a crisp understanding of the exact
"entropy gap" in his application or other such hard-to-figure parameters.
We want a general purpose design that is conservative yet practical. HKDF
does
quite well in this regard, certainly at the analytical level (in particular
much
better than the traditional repeated hash approach of ANSI, NIST, etc).

I know that many people are skeptical of the value of a complexity-theoretic
type analysis as the one I present for HKDF. I am not going to convince
anyone
with such prejudice to change their minds. For those that value this
approach, I
think that they should find the HKDF analysis valuable. For those in between
I
would suggest thinking about the original HMAC design and its purposes (and
proof) and how this design and mathematical analysis helped the scheme to
resist the passage of time and the increasing hash function cryptanalysis.
Let me be illustrate this point with some "historical anecdotes".

At the time (ca. 1995) the proposals on the table for an "MD5-based MAC"
(message authentication code to be used in IPsec) were the prepended-key
MAC:
MAC(K,MSG)=MD5(K || MSG), and the appended-key MAC: MAC(K,MSG)=MD5(MSG ||
K)).
The supporters of the former claimed that since every packet header had the
length of the IP packet then extension attacks would not be possible. Guess
what? After a short while ESP was introduced that did not include the header
under the MAC. Had we used that proposal it would have been broken after 6
months. The appended-key proposal was much better. But if we had adopted
that
one, it would mean that today (and actually quite many years ago) we would
have a broken MAC. Indeed, the appended-key scheme is broken if collisions
against the hash function are possible. Even the combined prepend-and-append
scheme was found to have some surprising weaknesses [Preneel-van Oorschot].
HMAC instead had much weaker assumption on the (compression) hash function,
and that's why its use with SHA1 today (or even with MD5 to some extent) can

still considered secure. An even more important point to make here is that
if
we treat the hash function as a random function all of the above designs are
equally good. That is why ideal modelings are "bad advisers"; they have to
be
left only for the cases where we do not have any other advise. And that is a
big
differentiator between HKDF and other KDFs.

What we are trying to do with HKDF is exactly the same as we did with HMAC:
Prudent design combining sound analysis with careful engineering
considerations.
I see no reason to stick to "legacy" KDFs for new applications. I am not
claiming or implying that applications using other KDFs should necessarily
move to HKDF, but it would be a good idea for new ones to adopt this more
careful design. No reason to stick to "legacy designs".

And, by the way, those that prefer to stick to designs already used in
practice
should have no problem with HKDF. As it is defined in our internet draft it
is
exactly the KDF used in IKE (both v1 and v2) and, I believe, in some other
applications. In that sense, even NIST approves this function (the next step
would be not only to approve it but to recommend it...)

Some have argued that we have too many KDFs already (NIST, ANSI, IEEE,
PBKDF,
etc.). That is true, but rather than being an argument against HKDF it is
one
important reason for the IETF to recommend a specific one for new
applications.
Things would be different if we just had one well-established KDF that fits
all
cases.

I have not entered a more technical discussion of the results in the paper.
I feel that such discussion is needed as a response to some questions that
were raised in this thread. I will answer those separately.
One thing I can say in one sentence here: A first basic test for a KDF is to
check whether it becomes a strong PRF when the source key material is fuly
random; if it doesn't then the design is flawed...  (e.g.  "repeated-hash"
designs of the type NIST, IEEE, etc do NOT pass this test -- see the paper).

Sorry for the length. I hope it does help to position this work better and
respond to many of the messages in this list. I will try to respond to more
specific issues separately later.

Hugo

--00c09f9db11bb87df0047679b7b3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

There have been many interesting and relevant issues raised in these<br>dis=
cussions. Instead of responding to each message separately I will try to<br=
>answer as many of them as I can in this -- not so concise -- message.<br>

(I will then answer some more specific messages separately.)<br><br>The iss=
ues raised in this discussion and many other aspects of KDF design and<br>a=
nalysis are much less trivial than they may seem and most do not have a sim=
ple<br>

answer (except if one trivializes the problem assuming we have perfect,<br>=
unbreakable hash functions). For that reason I wrote a paper that should<br=
>hopefully provide well founded answers that cannot be argued in an email<b=
r>

exchange.=A0 The paper is posted in:<br><a href=3D"http://webee.technion.ac=
.il/~hugo/kdf/">http://webee.technion.ac.il/~hugo/kdf/</a><br><br>I must sa=
y that what motivated me to write this paper were the recurring<br>(and end=
less) discussions in this cfrg list about basic questions such as<br>

&quot;What is a KDF, What properties define this primitive, Can we achieve =
them,<br>analyze them, etc.?&quot;=A0 In spite of the apparent simplicity o=
f KDF as a<br>cryptographic primitive there are a LOT of subtleties surroun=
ding this notion,<br>

especially if one is willing to come up with a design that is well-founded =
on<br>current crypto knowledge; can be applied in many different practical =
scenarios;<br>and USES HASH FUNCTIONS AS PRUDENTLY AS POSSIBLE.<br><br>

The latter is a very=A0 important point and it means that we want to trust =
our<br>hash functions as little as possible. For example, if one KDF scheme=
 requires a<br>hash function to be fully collision resistant and another wi=
ll only require<br>

second preimage resistance then the latter should be considered a much bett=
er<br>design. If one design can only be justified assuming the hash functio=
n behaves<br>magically as a perfect random function (or random oracle) and =
another only<br>

requires combinatorial properties of the hash function or the pseudorandom<=
br>properties of the compression function then the latter should be favored=
. <br>One of the goals of the above paper is to illustrate how common KDFs =
<br>

(including NIST&#39;s, ANSI, etc) ABUSE the hash functions by designing the=
 KDF<br>under the premise (explicit or implicit) that the hash is some magi=
c object <br>with perfect randomness.<br><br>The HKDF design in turn is muc=
h more careful. It is geared to base the<br>

(mathematical) rationale of the scheme on as weak as possible assumptions o=
n the<br>underlying hash. True, in some cases (for example, where one is su=
pposed to<br>extract ALL the entropy of an input without even having a salt=
 value), also <br>

HKDF requires some idealized assumptions. But in many other cases the<br>sc=
heme can be based on much weaker and realistic assumptions (e.g., HKDF as u=
sed<br>in IKE with safe-prime DH groups does not require any such ideal mod=
eling nor<br>

are these assumptions needed in the many realistic cases where you have a s=
ource<br>of high entropy and a salt value). Even when assuming some random-=
oracle type<br>properties from the hash, we can make a much more sound anal=
ysis modeling the<br>

compression function as random rather than the iterated hash (this is a pru=
dent<br>approach as exemplified by extension attacks that work on the itera=
ted hash but<br>not on the compression function).<br><br>Another very impor=
tant aspect of HKDF and its analysis is that we are not asking<br>

the individual user or engineer to study the specifics of his application a=
nd<br>then decide what KDF to use. We propose a single design that can be j=
ustified<br>with different assumptions in different scenarios, and does tha=
t in quite an<br>

optimal way. It is true that in some particular cases a perfect combinatori=
al<br>extractor will do better analytically and it is fine if an applicatio=
n decides<br>to use such extractor; but we want one, as general as possible=
, scheme that does<br>

not require the user or engineer to have a crisp understanding of the exact=
 <br>&quot;entropy gap&quot; in his application or other such hard-to-figur=
e parameters. <br>We want a general purpose design that is conservative yet=
 practical. HKDF does<br>

quite well in this regard, certainly at the analytical level (in particular=
 much<br>better than the traditional repeated hash approach of ANSI, NIST, =
etc).<br><br>I know that many people are skeptical of the value of a comple=
xity-theoretic<br>

type analysis as the one I present for HKDF. I am not going to convince any=
one<br>with such prejudice to change their minds. For those that value this=
 approach, I<br>think that they should find the HKDF analysis valuable. For=
 those in between I<br>

would suggest thinking about the original HMAC design and its purposes (and=
<br>proof) and how this design and mathematical analysis helped the scheme =
to <br>resist the passage of time and the increasing hash function cryptana=
lysis. <br>

Let me be illustrate this point with some &quot;historical anecdotes&quot;.=
<br><br>At the time (ca. 1995) the proposals on the table for an &quot;MD5-=
based MAC&quot;<br>(message authentication code to be used in IPsec) were t=
he prepended-key MAC:<br>

MAC(K,MSG)=3DMD5(K || MSG), and the appended-key MAC: MAC(K,MSG)=3DMD5(MSG =
|| K)).<br>The supporters of the former claimed that since every packet hea=
der had the<br>length of the IP packet then extension attacks would not be =
possible. Guess<br>

what? After a short while ESP was introduced that did not include the heade=
r<br>under the MAC. Had we used that proposal it would have been broken aft=
er 6<br>months. The appended-key proposal was much better. But if we had ad=
opted that<br>

one, it would mean that today (and actually quite many years ago) we would<=
br>have a broken MAC. Indeed, the appended-key scheme is broken if collisio=
ns<br>against the hash function are possible. Even the combined prepend-and=
-append<br>

scheme was found to have some surprising weaknesses [Preneel-van Oorschot].=
<br>HMAC instead had much weaker assumption on the (compression) hash funct=
ion,<br>and that&#39;s why its use with SHA1 today (or even with MD5 to som=
e extent) can <br>

still considered secure. An even more important point to make here is that =
if <br>we treat the hash function as a random function all of the above des=
igns are<br>equally good. That is why ideal modelings are &quot;bad adviser=
s&quot;; they have to be<br>

left only for the cases where we do not have any other advise. And that is =
a big<br>differentiator between HKDF and other KDFs.<br><br>What we are try=
ing to do with HKDF is exactly the same as we did with HMAC: <br>Prudent de=
sign combining sound analysis with careful engineering considerations.<br>

I see no reason to stick to &quot;legacy&quot; KDFs for new applications. I=
 am not<br>claiming or implying that applications using other KDFs should n=
ecessarily<br>move to HKDF, but it would be a good idea for new ones to ado=
pt this more<br>

careful design. No reason to stick to &quot;legacy designs&quot;.<br><br>An=
d, by the way, those that prefer to stick to designs already used in practi=
ce<br>should have no problem with HKDF. As it is defined in our internet dr=
aft it is<br>

exactly the KDF used in IKE (both v1 and v2) and, I believe, in some other<=
br>applications. In that sense, even NIST approves this function (the next =
step<br>would be not only to approve it but to recommend it...)<br><br>

Some have argued that we have too many KDFs already (NIST, ANSI, IEEE, PBKD=
F,<br>etc.). That is true, but rather than being an argument against HKDF i=
t is one<br>important reason for the IETF to recommend a specific one for n=
ew applications.<br>

Things would be different if we just had one well-established KDF that fits=
 all<br>cases.<br><br>I have not entered a more technical discussion of the=
 results in the paper. <br>I feel that such discussion is needed as a respo=
nse to some questions that <br>

were raised in this thread. I will answer those separately. <br>One thing I=
 can say in one sentence here: A first basic test for a KDF is to<br>check =
whether it becomes a strong PRF when the source key material is fuly<br>

random; if it doesn&#39;t then the design is flawed...=A0 (e.g.=A0 &quot;re=
peated-hash&quot; <br>designs of the type NIST, IEEE, etc do NOT pass this =
test -- see the paper).<br><br>Sorry for the length. I hope it does help to=
 position this work better and<br>

respond to many of the messages in this list. I will try to respond to more=
<br>specific issues separately later.<br><br>Hugo<br><br><br>

--00c09f9db11bb87df0047679b7b3--

From hugokraw@gmail.com  Wed Oct 21 18:38:30 2009
Return-Path: <hugokraw@gmail.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 547EC3A68D6 for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 18:38:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.676
X-Spam-Level: 
X-Spam-Status: No, score=-1.676 tagged_above=-999 required=5 tests=[AWL=0.300,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fKXHkQSVl2i5 for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 18:38:28 -0700 (PDT)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by core3.amsl.com (Postfix) with ESMTP id 2790F3A6876 for <cfrg@irtf.org>; Wed, 21 Oct 2009 18:38:28 -0700 (PDT)
Received: by qw-out-2122.google.com with SMTP id 5so992416qwd.7 for <cfrg@irtf.org>; Wed, 21 Oct 2009 18:38:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=GpaKxlnbDPs5Dgp4xw7BNKi8FhEFFox8F+6+VyYz9AE=; b=KuKSYXETQTNbfMxNFa0jfCH0GxBveYcSPIjUhZRff6TOjZPMaa8IapBHQ6ETm9HjKt lltl/7BVDlLtlB8QUZ19n7cxs2W6FlGhgGLB4zfoJhogGRivUTJN/RIH9h83sn0QQHoD JKnz5m6Ts0MQKlAFwWqX3G0aCISLm0yGsW5XY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=kbvnaD0KtPdSm920Vtt7gtGSgYTMKnKl3ysai8122PMifPtnwRdnPqiUrXb6VIKCg8 XVhDga1sXKTHZG6pg4nypMkLucsz/CrjS7RpAmy+UQBzW0oib8ObYKwt+S75Qm0beH77 yYZlq7HSag8AY/bivXvBaj8zlXjLGj5QKC4Fs=
MIME-Version: 1.0
Sender: hugokraw@gmail.com
Received: by 10.224.30.209 with SMTP id v17mr4336093qac.188.1256175516133;  Wed, 21 Oct 2009 18:38:36 -0700 (PDT)
From: Hugo Krawczyk <hugo@ee.technion.ac.il>
Date: Wed, 21 Oct 2009 21:38:16 -0400
X-Google-Sender-Auth: 273d73088cf8ee45
Message-ID: <e89b43830910211838x2e1ca67cgaf48d02cd4008710@mail.gmail.com>
To: cfrg@irtf.org
Content-Type: multipart/alternative; boundary=00c09f89928f6a2be204767c2757
Subject: [Cfrg] Answers to HKDF questions
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 01:38:30 -0000

--00c09f89928f6a2be204767c2757
Content-Type: text/plain; charset=ISO-8859-1

Here is a list of questions people asked related to HKDF in the last two
days
with some answers. I wrote it in this way as it seems more manageable than
answering 20 or so messages, many raising similar questions.
SEE ALSO MY LONG MESSAGE FROM EARLIER TODAY WITH MORE
GENERAL RATIONALE.

>Many comments ask "why we need yet another KDF, if we have so many".

Answer: Because we have too many! (*)
Designers of new protocols/applications do not have any guidance to choose
between them. No one took the effort to sort out what properties we are
looking
for. What does each of these schemes provide and what they lack, etc etc.
Well, I did.
My work is far from a full taxonomy of properties, scenarios and existing
schemes. But it does provide the main guidelines, and it does show (I want
to
believe) that analysis does favor some schemes over others. In particular,
HKDF
is the closest I could get to something that is general purpose enough and
well-founded in analytics.

(*) The best answer to the above question is given by Peter's own question:
> In fact every protocol that I know of has invented its own KDF,
incompatible
> with every other KDF out there, thus my question about why we need yet
another
> one.
We do not need another one, we need one...

> Dan Harkins and others: How is HMAC(0,X) better than SHA256(X||X).

Merkle-Damgard (MD), the iteration mode underlying SHA256, does not preserve
"randomness" in the following sense: Even if the compression function that
you
use as the underlying hash is purely random, the result you get from M-D
iterating this compression function is NOT random (actually not even a good
extractor). HMAC, on the other hand, if you start with a random compression
function you end with a random oracle (i.e., a function that looks random to
an
adversary that can only query the function in a bounded number of points).
This is known in the literature as "random oracle indifferentiability".
It is not a result about actual hash functions but a strong result about the
STRUCTURAL STRENGTH OF HMAC (if it starts with something good it preserves
the
goodness). There are several papers on this; the main ones are [23,17] in my
paper.

>What is the value of HKDF when salt is set to 0.

In this case we can only say useful things if we assume the compression
function
to be random. In this case, as said above in the context of
indifferentiability,
HMAC implies a random oracle and then good extraction properties while in
the
case of a plain M-D hash an underlying random compression function does not
imply randomness and not even extraction. Moreover, the fact that you apply
HMAC
only once (with salt=0) to concentrate the input entropy in one key, and
then
use this key with the PRF is much better than the naive (unsalted)
repetition
SHA(X||1)||SHA(X||2)||... common to other KDFs -- for more on this see the
paper.

>Dan: HKDF is a GENERALIZATION of IKE's HKDF.

True, but only for the unsalted case. Note that IKEv1 illustrates nicely the
versatility of HKDF. It can use public nonces for salt in the signature
mode,
and it can use a secret salt in PK encryption mode. The latter gives you a
much
stronger KDF. One that is only based on the PRF properties of HMAC (since
the
salt acts as a secret key to the PRF). IKE is also a good example of how
applications may use/find salt. Most other protocols do not use salt even if
they have it available (e.g., SP 800-56A). Salting the KDF has important
benefits for randomization and independence.

>Uri repeatedly asks what makes HMAC appropriate for extraction/KDF.

You should read the paper and the results cited there (especially section
8).
Keep in mind that HMAC can only inherit its properties from the underlying
hash
function. It cannot transform a bad hash function into a good one, but for
some
functionalities (KDF is one of them) it can use weaker hash functions for
stronger purposes than alternative schemes using the plain hash.
If you are not willing to assume anything from the underlying hash function
other than collision resistance, then there is only one result I can offer
to
you: Look at the result from [23] quoted in page 24 of my paper (second
bullet).
That result assumes properties of the hash function implied by collision
resistance only. The downside: It applies only when you truncate the output
of
the extract part (for example, you use SHA-512 for extraction and SHA-256
for
PRF). But it may not be totally foolish (smiley inserted) for you to make a
heuristic leap of faith and accept this as an indication of strength also
when
you do not truncate.

>Peter Gutman and Simon J.: PBKDF.

PBKDF is quite specific to passwords since it has the iterations count that
is
not needed in general and you certainly do now want to artificially slow
down
your KDF when your source has decent entropy. I believe that PBKDF2 is a
good
design for passwords: it uses an iteration counter, salt, and HMAC as the
underlying PRF (better in that sense than PBKDF1). You could make it general
purpose by having the option of using it with iteration-count=1. However,
even
in this case the design is not great as a general purpose KDF since it uses
the
source keying material directly as a PRF key. There is nothing we can say in
general if you key a PRF with a non-uniform key (some PRFs do not even
accept
arbitrary-long keys). That's why you first extract (or concentrate) the
entropy
of the input into a short key and then use that key for keying the PRF in
the
extraction stage.

> Can we use HKDF for passwords?

Not as defined. For passwords you need to replace the entropy of the source
with
slowing iterations of the function to slow down dictionary attacks (see page
25
in my paper). This can be added, but it is not included now. For example,
for
the specific case of passwords one could replace the extract part of HKDF
with
the F(P,S,c,1) function from PBKDF2. I am not sure if this is something we
want
to include in our draft. I will discuss with Pasi.


>The input source is random (a strong cryptographic key), can we skip
extract?

When your input is already a strong cryptographic key you may choose to skip
the
extract part and go directly to expansion. For this any (variable output)
PRF
will do. The expansion part of HKDF is an implementation of such a PRF.

>David McGrew raises the question that we may need different KDFs for
different
>settings.

I believe that having one general-purpose KDF is IMPORTANT. It does not
preclude
an application to choose another one or a variant. But if we start
standardizing
a KDF for each usage scenario (including different types of key material
sources)
we will have to leave in the user's or protocol designer's hands to choose
what
is best for his setting. Not only this is not an easy task (understanding
entropy and extraction in full generality is hard) but what you may assume
for
an application today may be different tomorrow. The one case where a special
variant may be needed is for passwords (see above).

>Are block ciphers better than hash for KDF?

Block ciphers are good as a basis for a PRF (e.g via a variable input PRF
mode).
However, they are more problematic for extraction. For block ciphers as
extractors we can only say things under the assumption that the block cipher
is
a truly random permutation. In the case of HMAC we have much richer results
including those that do not idealize the hash function.
(BTW, those that said to believe more on ideal ciphers than in random
oracles,
should pay attention to the related-key attacks against AES-256!)

>David McGrew: Should we standardize on the extract part and allow for
multiple
>expansion modules?
Good question. From a modularity point of view the answer is yes.
>From the IETF point of view that wants to have as specific transforms as
possible this may be problematic. In other words, my academic side would
prefer
modularity in the spec and independence between extraction and expansion
(as long as the latter uses a good appropriate PRF mode). But I think that
the
IETF (well represented in this work by Pasi :) will not like that.

>Zooko: How about outputting a random (algebraic) group element instead of a
>(close to) uniform string?

Even a "general purpose" KDF has limits to its generality. To me, the main
need
for applications is to have a KDF that produces uniform (or "close to
uniform")
strings of a certain length(s). In particular, the problem with choosing a
random group element is that techniques to do so are group-dependent (you do
it
differently in a finite field multiplicative group than in an RSA group than
in
an elliptic curve; you may even have different techniques for different
types of
curves). So I do not see that you can find a "fits all" solution here.
(Neither is HKDF a fit-all solution - for example it doesn't do what you
want -
but it as close as it get to serve the most common applications).

> David McGrew: what is the precise security statement for HKDF?
> What assumptions does one need to make about the hash function used in
HKDF in
> order that the security analysis applies? The paper says that "it is shown
in
> [23] (see Section 8) that using HMAC with a truncated output as an
extractor
> allows to prove security under considerably weaker assumptions on the
> underlying hash function." However, both of the Lemmas in that paper (and
the
> implication in Section 8) make random oracle assumptions.

Section 8 contains a summary of results from [23,17] regarding the
properties of
HMAC extractor. These results are quantitative, relating the strength of the
underlying hash function with the quality of extraction. They cover a
variety of
situations depending on the entropy of the source and the existence of salt.
The truncated output result that does not require any form of idealized
assumption (uses almost universality and/or collision resistance) is quoted
in
my paper page 24 second bullet and is proven in [23].

I apologize for questions I missed.

Hugo

--00c09f89928f6a2be204767c2757
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Here is a list of questions people asked related to HKDF in the last two da=
ys<br>with some answers. I wrote it in this way as it seems more manageable=
 than<br>answering 20 or so messages, many raising similar questions.<br>

SEE ALSO MY LONG MESSAGE FROM EARLIER TODAY WITH MORE <br>GENERAL RATIONALE=
.<br><br>&gt;Many comments ask &quot;why we need yet another KDF, if we hav=
e so many&quot;.<br><br>Answer: Because we have too many! (*)<br>Designers =
of new protocols/applications do not have any guidance to choose<br>

between them. No one took the effort to sort out what properties we are loo=
king<br>for. What does each of these schemes provide and what they lack, et=
c etc. <br>Well, I did. <br>My work is far from a full taxonomy of properti=
es, scenarios and existing<br>

schemes. But it does provide the main guidelines, and it does show (I want =
to<br>believe) that analysis does favor some schemes over others. In partic=
ular, HKDF<br>is the closest I could get to something that is general purpo=
se enough and<br>

well-founded in analytics. <br><br>(*) The best answer to the above questio=
n is given by Peter&#39;s own question:<br>&gt; In fact every protocol that=
 I know of has invented its own KDF, incompatible<br>&gt; with every other =
KDF out there, thus my question about why we need yet another<br>

&gt; one.<br>We do not need another one, we need one...<br><br>&gt; Dan Har=
kins and others: How is HMAC(0,X) better than SHA256(X||X).<br><br>Merkle-D=
amgard (MD), the iteration mode underlying SHA256, does not preserve<br>

&quot;randomness&quot; in the following sense: Even if the compression func=
tion that you<br>use as the underlying hash is purely random, the result yo=
u get from M-D<br>iterating this compression function is NOT random (actual=
ly not even a good<br>

extractor). HMAC, on the other hand, if you start with a random compression=
<br>function you end with a random oracle (i.e., a function that looks rand=
om to an<br>adversary that can only query the function in a bounded number =
of points). <br>

This is known in the literature as &quot;random oracle indifferentiability&=
quot;. <br>It is not a result about actual hash functions but a strong resu=
lt about the<br>STRUCTURAL STRENGTH OF HMAC (if it starts with something go=
od it preserves the<br>

goodness). There are several papers on this; the main ones are [23,17] in m=
y paper.<br><br>&gt;What is the value of HKDF when salt is set to 0.<br><br=
>In this case we can only say useful things if we assume the compression fu=
nction<br>

to be random. In this case, as said above in the context of indifferentiabi=
lity,<br>HMAC implies a random oracle and then good extraction properties w=
hile in the <br>case of a plain M-D hash an underlying random compression f=
unction does not <br>

imply randomness and not even extraction. Moreover, the fact that you apply=
 HMAC<br>only once (with salt=3D0) to concentrate the input entropy in one =
key, and then<br>use this key with the PRF is much better than the naive (u=
nsalted) repetition <br>

SHA(X||1)||SHA(X||2)||... common to other KDFs -- for more on this see the =
paper.<br><br>&gt;Dan: HKDF is a GENERALIZATION of IKE&#39;s HKDF. <br><br>=
True, but only for the unsalted case. Note that IKEv1 illustrates nicely th=
e<br>

versatility of HKDF. It can use public nonces for salt in the signature mod=
e,<br>and it can use a secret salt in PK encryption mode. The latter gives =
you a much<br>stronger KDF. One that is only based on the PRF properties of=
 HMAC (since the<br>

salt acts as a secret key to the PRF). IKE is also a good example of how<br=
>applications may use/find salt. Most other protocols do not use salt even =
if<br>they have it available (e.g., SP 800-56A). Salting the KDF has import=
ant<br>

benefits for randomization and independence.<br><br>&gt;Uri repeatedly asks=
 what makes HMAC appropriate for extraction/KDF.<br><br>You should read the=
 paper and the results cited there (especially section 8).<br>Keep in mind =
that HMAC can only inherit its properties from the underlying hash<br>

function. It cannot transform a bad hash function into a good one, but for =
some<br>functionalities (KDF is one of them) it can use weaker hash functio=
ns for<br>stronger purposes than alternative schemes using the plain hash. =
<br>

If you are not willing to assume anything from the underlying hash function=
<br>other than collision resistance, then there is only one result I can of=
fer to<br>you: Look at the result from [23] quoted in page 24 of my paper (=
second bullet).<br>

That result assumes properties of the hash function implied by collision<br=
>resistance only. The downside: It applies only when you truncate the outpu=
t of<br>the extract part (for example, you use SHA-512 for extraction and S=
HA-256 for<br>

PRF). But it may not be totally foolish (smiley inserted) for you to make a=
<br>heuristic leap of faith and accept this as an indication of strength al=
so when<br>you do not truncate.<br><br>&gt;Peter Gutman and Simon J.: PBKDF=
.<br>

<br>PBKDF is quite specific to passwords since it has the iterations count =
that is<br>not needed in general and you certainly do now want to artificia=
lly slow down<br>your KDF when your source has decent entropy. I believe th=
at PBKDF2 is a good<br>

design for passwords: it uses an iteration counter, salt, and HMAC as the<b=
r>underlying PRF (better in that sense than PBKDF1). You could make it gene=
ral<br>purpose by having the option of using it with iteration-count=3D1. H=
owever, even<br>

in this case the design is not great as a general purpose KDF since it uses=
 the<br>source keying material directly as a PRF key. There is nothing we c=
an say in<br>general if you key a PRF with a non-uniform key (some PRFs do =
not even accept<br>

arbitrary-long keys). That&#39;s why you first extract (or concentrate) the=
 entropy<br>of the input into a short key and then use that key for keying =
the PRF in the<br>extraction stage.<br><br>&gt; Can we use HKDF for passwor=
ds?<br>

<br>Not as defined. For passwords you need to replace the entropy of the so=
urce with<br>slowing iterations of the function to slow down dictionary att=
acks (see page 25<br>in my paper). This can be added, but it is not include=
d now. For example, for<br>

the specific case of passwords one could replace the extract part of HKDF w=
ith <br>the F(P,S,c,1) function from PBKDF2. I am not sure if this is somet=
hing we want<br>to include in our draft. I will discuss with Pasi.<br>
<br>
<br>&gt;The input source is random (a strong cryptographic key), can we ski=
p extract?<br><br>When your input is already a strong cryptographic key you=
 may choose to skip the<br>extract part and go directly to expansion. For t=
his any (variable output) PRF <br>

will do. The expansion part of HKDF is an implementation of such a PRF. <br=
><br>&gt;David McGrew raises the question that we may need different KDFs f=
or different<br>&gt;settings.<br><br>I believe that having one general-purp=
ose KDF is IMPORTANT. It does not preclude<br>

an application to choose another one or a variant. But if we start standard=
izing<br>a KDF for each usage scenario (including different types of key ma=
terial sources) <br>we will have to leave in the user&#39;s or protocol des=
igner&#39;s hands to choose what<br>

is best for his setting. Not only this is not an easy task (understanding<b=
r>entropy and extraction in full generality is hard) but what you may assum=
e for<br>an application today may be different tomorrow. The one case where=
 a special<br>

variant may be needed is for passwords (see above).<br><br>&gt;Are block ci=
phers better than hash for KDF?<br><br>Block ciphers are good as a basis fo=
r a PRF (e.g via a variable input PRF mode).<br>However, they are more prob=
lematic for extraction. For block ciphers as<br>

extractors we can only say things under the assumption that the block ciphe=
r is<br>a truly random permutation. In the case of HMAC we have much richer=
 results<br>including those that do not idealize the hash function.<br>

(BTW, those that said to believe more on ideal ciphers than in random oracl=
es,<br>should pay attention to the related-key attacks against AES-256!)<br=
><br>&gt;David McGrew: Should we standardize on the extract part and allow =
for multiple<br>

&gt;expansion modules?<br>Good question. From a modularity point of view th=
e answer is yes.<br>From the IETF point of view that wants to have as speci=
fic transforms as<br>possible this may be problematic. In other words, my a=
cademic side would prefer<br>

modularity in the spec and independence between extraction and expansion<br=
>(as long as the latter uses a good appropriate PRF mode). But I think that=
 the<br>IETF (well represented in this work by Pasi :) will not like that.<=
br>

<br>&gt;Zooko: How about outputting a random (algebraic) group element inst=
ead of a<br>&gt;(close to) uniform string?<br><br>Even a &quot;general purp=
ose&quot; KDF has limits to its generality. To me, the main need<br>for app=
lications is to have a KDF that produces uniform (or &quot;close to uniform=
&quot;)<br>

strings of a certain length(s). In particular, the problem with choosing a<=
br>random group element is that techniques to do so are group-dependent (yo=
u do it<br>differently in a finite field multiplicative group than in an RS=
A group than in<br>

an elliptic curve; you may even have different techniques for different typ=
es of<br>curves). So I do not see that you can find a &quot;fits all&quot; =
solution here.<br>(Neither is HKDF a fit-all solution - for example it does=
n&#39;t do what you want -<br>

but it as close as it get to serve the most common applications).<br><br>&g=
t; David McGrew: what is the precise security statement for HKDF? <br>&gt; =
What assumptions does one need to make about the hash function used in HKDF=
 in<br>

&gt; order that the security analysis applies? The paper says that &quot;it=
 is shown in<br>&gt; [23] (see Section 8) that using HMAC with a truncated =
output as an extractor<br>&gt; allows to prove security under considerably =
weaker assumptions on the<br>

&gt; underlying hash function.&quot; However, both of the Lemmas in that pa=
per (and the<br>&gt; implication in Section 8) make random oracle assumptio=
ns.<br><br>Section 8 contains a summary of results from [23,17] regarding t=
he properties of<br>

HMAC extractor. These results are quantitative, relating the strength of th=
e<br>underlying hash function with the quality of extraction. They cover a =
variety of<br>situations depending on the entropy of the source and the exi=
stence of salt.<br>

The truncated output result that does not require any form of idealized<br>=
assumption (uses almost universality and/or collision resistance) is quoted=
 in<br>my paper page 24 second bullet and is proven in [23].<br><br>I apolo=
gize for questions I missed.<br>

<br>Hugo<br>

--00c09f89928f6a2be204767c2757--

From zooko@zooko.com  Wed Oct 21 20:01:15 2009
Return-Path: <zooko@zooko.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 30F333A6892 for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 20:01:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.413
X-Spam-Level: 
X-Spam-Status: No, score=-2.413 tagged_above=-999 required=5 tests=[AWL=0.186,  BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X78MWmlOLBjT for <cfrg@core3.amsl.com>; Wed, 21 Oct 2009 20:01:14 -0700 (PDT)
Received: from nooxie.zooko.com (nooxie.zooko.com [207.7.145.200]) by core3.amsl.com (Postfix) with ESMTP id 93A3F3A67AE for <cfrg@irtf.org>; Wed, 21 Oct 2009 20:01:14 -0700 (PDT)
Received: from [192.168.1.118] (97-118-105-53.hlrn.qwest.net [97.118.105.53]) by nooxie.zooko.com (Postfix) with ESMTP id 9BBFE197D1; Wed, 21 Oct 2009 20:06:11 -0700 (PDT)
In-Reply-To: <e89b43830910211838x2e1ca67cgaf48d02cd4008710@mail.gmail.com>
References: <e89b43830910211838x2e1ca67cgaf48d02cd4008710@mail.gmail.com>
Mime-Version: 1.0 (Apple Message framework v753.1)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <46DFA920-54BF-4567-90AF-6742C8FAA5F2@zooko.com>
Content-Transfer-Encoding: 7bit
From: Zooko Wilcox-O'Hearn <zooko@zooko.com>
Date: Wed, 21 Oct 2009 21:01:16 -0600
To: Hugo Krawczyk <hugo@ee.technion.ac.il>
X-Mailer: Apple Mail (2.753.1)
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] Answers to HKDF questions
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 03:01:15 -0000

Dear Hugo Krawcyck:

Thank you for the detailed answers.  I still have a question about  
HMAC as compared to other MACs.  Feel free to point me to existing  
documents if they answer my question.  Suppose I were to instantiate  
HKDF with the keyed PRF being a cipher based MAC such as Poly1305  
instead of HMAC.  Which of the arguments for HKDF's security would  
still apply?

Regards,

Zooko

From mcgrew@cisco.com  Thu Oct 22 04:59:52 2009
Return-Path: <mcgrew@cisco.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 5AA763A68A4 for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 04:59:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.901
X-Spam-Level: 
X-Spam-Status: No, score=-5.901 tagged_above=-999 required=5 tests=[AWL=-0.698, BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 83bGIDkrMYVp for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 04:59:51 -0700 (PDT)
Received: from sj-iport-1.cisco.com (sj-iport-1.cisco.com [171.71.176.70]) by core3.amsl.com (Postfix) with ESMTP id 574BE3A6875 for <cfrg@irtf.org>; Thu, 22 Oct 2009 04:59:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=mcgrew@cisco.com; l=4449; q=dns/txt; s=sjiport01001; t=1256212801; x=1257422401; h=from:sender:reply-to:subject:date:message-id:to:cc: mime-version:content-transfer-encoding:content-id: content-description:resent-date:resent-from:resent-sender: resent-to:resent-cc:resent-message-id:in-reply-to: references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; z=From:=20David=20McGrew=20<mcgrew@cisco.com>|Subject:=20R e:=20[Cfrg]=20Answers=20to=20HKDF=20questions|Date:=20Thu ,=2022=20Oct=202009=2004:59:58=20-0700|Message-Id:=20<F5E F53C3-2037-4EBC-B806-997035F9F14C@cisco.com>|To:=20"Zooko =20Wilcox-O'Hearn"=20<zooko@zooko.com>|Cc:=20Hugo=20Krawc zyk=20<hugo@ee.technion.ac.il>,=20cfrg@irtf.org |Mime-Version:=201.0=20(Apple=20Message=20framework=20v93 6)|In-Reply-To:=20<46DFA920-54BF-4567-90AF-6742C8FAA5F2@z ooko.com>|References:=20<e89b43830910211838x2e1ca67cgaf48 d02cd4008710@mail.gmail.com>=20<46DFA920-54BF-4567-90AF-6 742C8FAA5F2@zooko.com>; bh=/YVfXi2jA5jC1EI+X5Zyp+k1ZXx2uYZ8Z+eNFMejY2Y=; b=ytj1jU0xDplNGMcOIYBLtN3fObL9dTkHd313fDGZquW4OlZo2i27KBJ0 F3vRKSYFplBQXw2aVKezcPF8psUGv00hdMxSr7B4uUSifQygVGaVEJ5mg BDVqDB2AmZzem1GWl3xB8cGh5DucSvU7VD49ihaH8QpAILQLzd0L6sD3W A=;
Authentication-Results: sj-iport-1.cisco.com; dkim=neutral (message not signed) header.i=none
X-Files: smime.p7s : 1760
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AsIEAFvm30qrR7Hu/2dsb2JhbACEdJUNqFeHEZFXg2xTBA
X-IronPort-AV: E=Sophos;i="4.44,605,1249257600";  d="p7s'?scan'208";a="259773113"
Received: from sj-core-5.cisco.com ([171.71.177.238]) by sj-iport-1.cisco.com with ESMTP; 22 Oct 2009 12:00:00 +0000
Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-5.cisco.com (8.13.8/8.14.3) with ESMTP id n9MC00YQ011736; Thu, 22 Oct 2009 12:00:00 GMT
Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Thu, 22 Oct 2009 05:00:00 -0700
Received: from [10.32.254.210] ([10.32.254.210]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Thu, 22 Oct 2009 04:59:59 -0700
Message-Id: <F5EF53C3-2037-4EBC-B806-997035F9F14C@cisco.com>
From: David McGrew <mcgrew@cisco.com>
To: "Zooko Wilcox-O'Hearn" <zooko@zooko.com>
In-Reply-To: <46DFA920-54BF-4567-90AF-6742C8FAA5F2@zooko.com>
Content-Type: multipart/signed; boundary=Apple-Mail-94-880207828; micalg=sha1; protocol="application/pkcs7-signature"
Mime-Version: 1.0 (Apple Message framework v936)
Date: Thu, 22 Oct 2009 04:59:58 -0700
References: <e89b43830910211838x2e1ca67cgaf48d02cd4008710@mail.gmail.com> <46DFA920-54BF-4567-90AF-6742C8FAA5F2@zooko.com>
X-Mailer: Apple Mail (2.936)
X-OriginalArrivalTime: 22 Oct 2009 12:00:00.0208 (UTC) FILETIME=[2E6E5D00:01CA530F]
Cc: cfrg@irtf.org, Hugo Krawczyk <hugo@ee.technion.ac.il>
Subject: Re: [Cfrg] Answers to HKDF questions
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 11:59:52 -0000

--Apple-Mail-94-880207828
Content-Type: text/plain;
	charset=UTF-8;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: quoted-printable

Hi Zooko,

On Oct 21, 2009, at 8:01 PM, Zooko Wilcox-O'Hearn wrote:

> Dear Hugo Krawcyck:
>
> Thank you for the detailed answers.  I still have a question about =20
> HMAC as compared to other MACs.  Feel free to point me to existing =20
> documents if they answer my question.  Suppose I were to instantiate =20=

> HKDF with the keyed PRF being a cipher based MAC such as Poly1305 =20
> instead of HMAC.  Which of the arguments for HKDF's security would =20
> still apply?
>

HKDF has two stages, extract and expand.  Replacing HMAC in the =20
extract stage with Poly1305 is not going to work as well as you would =20=

like.   It will have provable security bounds given realistic =20
assumptions (because universal hash functions like that in Poly1305 =20
can be used as statistical extractors), but to get the security bound =20=

to be as high as you would like will force you to do things very =20
inefficiently.  To use this instantiation to extract keys from Diffie-=20=

Hellman, for example, would require you to double the size of the DH =20
keys in order to claim the benefit of the security bound.   Hugo's =20
paper points this out: "Statistical extractors require a signi=EF=AC=81can=
t =20
gap between the min-entropy m of the source and the required number m=20
=E2=80=B2 of extracted bits (no statistical extractor can achieve a =20
statistical distance, on arbitrary sources, better than 2^(=E2=88=92(m=E2=88=
=92m=20
=E2=80=B2)/2) [59])".

The use of CBC-MAC as a computational extractor has been studied, and =20=

its security bounds also do not match that we can achieve with hash-=20
based extractors.

David=

--Apple-Mail-94-880207828
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDnjCCA5ow
ggKCoAMCAQICAWQwCwYJKoZIhvcNAQEFMG0xFTATBgNVBAMMDERhdmlkIE1jR3JldzETMBEGA1UE
CAwKQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMxETAPBgNVBAcMCFNhbiBKb3NlMR8wHQYJKoZIhvcN
AQkBFhBtY2dyZXdAY2lzY28uY29tMB4XDTA4MTIwOTIyMDMzMFoXDTA5MTIwOTIyMDMzMFowbTEV
MBMGA1UEAwwMRGF2aWQgTWNHcmV3MRMwEQYDVQQIDApDYWxpZm9ybmlhMQswCQYDVQQGEwJVUzER
MA8GA1UEBwwIU2FuIEpvc2UxHzAdBgkqhkiG9w0BCQEWEG1jZ3Jld0BjaXNjby5jb20wggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDh5WR1gATRK4ubbWwmG2T/XTUeVc2FAxnmtoYy00fM
5jp3DYFXHkWj4Cl8RVVfAJxP/2PhKsTl0qx2b7N9pIZZa6BaODEyJ8yVMRHloHrpzHeU8DIrst/H
SFVkcJvl3p9LFD42BCvznzQ48VxnWX68OCk7GAwg6XoKMY8Z1F70PVvcZ0JcbnDuKx0efQ+P74uY
UdpjRYSXb2xJUziGs5k6b1kTr5754B3tnYCGkum49YAbONpsOL4R+e4HNNrkVTx254ggrcDb1GDr
IpZYCSPh6l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IhvcNAQkQAgsxdKByMG0x
FTATBgNVBAMMDERhdmlkIE1jR3JldzETMBEGA1UECAwKQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMx
ETAPBgNVBAcMCFNhbiBKb3NlMR8wHQYJKoZIhvcNAQkBFhBtY2dyZXdAY2lzY28uY29tAgFkMA0G
CSqGSIb3DQEBAQUABIIBAB9+tNrWKBo6GrNAf2b7CWt9w/53d8jF5N0PlTDgm8sgt9uvVOA0D79T
4e7dj8gRMS8iGxQi/CyzmZffx1rpAMJXf2Cn/7yqPZcSr5Mf9IqV5dbJ51alIBf8kgOlw1IMkdOX
owURDvDmIOKm4FgHC9WWuqwjavj+O1HYq2C12EnZWtfsGk6+YqcK9sJYzrCpoCERcHoxUSQHlAkt
X08fJz2NwfiE1MvS+fhj1cUouMRUw1igUgtc6WKMx4yECF+I6pqkwMi8bJZ7QtKlQlnC/DqvbFcM
AtvZ7vwz9CRaIZ2y6M+NxZPDZeWvmJhbaSv9ORyLHMj/uXQ5XcVgHrtUH4wAAAAAAAA=

--Apple-Mail-94-880207828--

From mcgrew@cisco.com  Thu Oct 22 08:08:51 2009
Return-Path: <mcgrew@cisco.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 06C8A28C165 for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 08:08:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.425
X-Spam-Level: 
X-Spam-Status: No, score=-6.425 tagged_above=-999 required=5 tests=[AWL=0.175,  BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nycNNJWIbrQQ for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 08:08:49 -0700 (PDT)
Received: from sj-iport-3.cisco.com (sj-iport-3.cisco.com [171.71.176.72]) by core3.amsl.com (Postfix) with ESMTP id A34E028C169 for <cfrg@irtf.org>; Thu, 22 Oct 2009 08:08:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=mcgrew@cisco.com; l=4987; q=dns/txt; s=sjiport03001; t=1256224139; x=1257433739; h=from:sender:reply-to:subject:date:message-id:to:cc: mime-version:content-transfer-encoding:content-id: content-description:resent-date:resent-from:resent-sender: resent-to:resent-cc:resent-message-id:in-reply-to: references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; z=From:=20David=20McGrew=20<mcgrew@cisco.com>|Subject:=20R e:=20[Cfrg]=20why=20HKDF?=20=20--=20Re:=20=20existing=20K DFs=20and=20their=20uses|Date:=20Thu,=2022=20Oct=202009 =2008:08:54=20-0700|Message-Id:=20<A652B6BC-1E5B-463F-BA5 C-E61E2B31E06C@cisco.com>|To:=20"Zooko=20Wilcox-O'Hearn" =20<zooko@zooko.com>|Cc:=20"Blumenthal,=20Uri"=20<uri@ll. mit.edu>,=0D=0A=20=20=20=20=20=20=20=20"'dbrown@certicom. com'"=20<dbrown@certicom.com>,=0D=0A=20=20=20=20=20=20=20 =20"'cfrg@irtf.org'"=20<cfrg@irtf.org>,=0D=0A=20=20=20=20 =20=20=20=20"'pgut001@cs.auckland.ac.nz'"=20<pgut001@cs.a uckland.ac.nz>|Mime-Version:=201.0=20(Apple=20Message=20f ramework=20v936)|In-Reply-To:=20<B418D21A-0BC0-4E6E-8063- 4D100B94B974@zooko.com>|References:=20<90E934FC4BBC1946B3 C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local>=20<B 418D21A-0BC0-4E6E-8063-4D100B94B974@zooko.com>; bh=J5e5v2mKnU4XWLXUXURPtM+UTpkGi08uvPTPYRwkMAA=; b=m6PfzIdT01iOQ9yiKwUvtu8KTILqVi1RTl5E726NfeTM+/JANGYJUkq8 zE3A5cBgQZZo757CWZxs/Zbx0MxZ/WDh5mIZFC0NqnK6OWKU5wANnWvz/ 4cP71IOxm0z8HB4Mu5watc4wzLnpAk1piMTHQuOnOxGpFdwBVXa+HWnnX k=;
Authentication-Results: sj-iport-3.cisco.com; dkim=neutral (message not signed) header.i=none
X-Files: smime.p7s : 1760
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApoEAKcS4EqrR7Hu/2dsb2JhbADDNJhYhD8EgV0
X-IronPort-AV: E=Sophos;i="4.44,605,1249257600";  d="p7s'?scan'208";a="198234432"
Received: from sj-core-5.cisco.com ([171.71.177.238]) by sj-iport-3.cisco.com with ESMTP; 22 Oct 2009 15:08:57 +0000
Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by sj-core-5.cisco.com (8.13.8/8.14.3) with ESMTP id n9MF8vOS005247; Thu, 22 Oct 2009 15:08:57 GMT
Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Thu, 22 Oct 2009 08:08:57 -0700
Received: from [10.32.254.210] ([10.32.254.210]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Thu, 22 Oct 2009 08:08:56 -0700
Message-Id: <A652B6BC-1E5B-463F-BA5C-E61E2B31E06C@cisco.com>
From: David McGrew <mcgrew@cisco.com>
To: "Zooko Wilcox-O'Hearn" <zooko@zooko.com>
In-Reply-To: <B418D21A-0BC0-4E6E-8063-4D100B94B974@zooko.com>
Content-Type: multipart/signed; boundary=Apple-Mail-107-891544619; micalg=sha1; protocol="application/pkcs7-signature"
Mime-Version: 1.0 (Apple Message framework v936)
Date: Thu, 22 Oct 2009 08:08:54 -0700
References: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BF4@LLE2K7-BE01.mitll.ad.local> <B418D21A-0BC0-4E6E-8063-4D100B94B974@zooko.com>
X-Mailer: Apple Mail (2.936)
X-OriginalArrivalTime: 22 Oct 2009 15:08:56.0993 (UTC) FILETIME=[93AE7910:01CA5329]
Cc: "'dbrown@certicom.com'" <dbrown@certicom.com>, "'cfrg@irtf.org'" <cfrg@irtf.org>, "'pgut001@cs.auckland.ac.nz'" <pgut001@cs.auckland.ac.nz>
Subject: Re: [Cfrg] why HKDF?  -- Re:  existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 15:08:51 -0000

--Apple-Mail-107-891544619
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

Hi Zooko,

On Oct 21, 2009, at 12:05 PM, Zooko Wilcox-O'Hearn wrote:

> I'm speaking as a consumer of such standards rather than as a  
> producer.  I have already invented my own KDF [1] because, as far as  
> I know, the existing specs don't spell out how to generate a random  
> key which isn't just a certain number of bytes or bits, but instead  
> a random element from a group.

check out example 9.10 of http://www.shoup.net/ntb/ntb-v2.pdf	

David

> (Fortunately I haven't yet deployed this KDF that I invented so I am  
> still free to change it.)
>
> At this time I would probably prefer to use HKDF over the other KDF  
> algorithms that I know of because the accompanying full paper [2]  
> comes with much more thorough arguments about its theoretical  
> security properties.  It isn't perfect for me!  As I mentioned in my  
> initial questions, HKDF has the same omission that the others do in  
> specifying how to generate keys which aren't just byte sequences,  
> and it isn't entirely clear to me whether the security arguments for  
> HKDF are predicated on the underlying primitive being HMAC, being a  
> MAC, being a PRF, or what.  (I am more comfortable relying on AES or  
> Salsa20 to be like an ideal cipher than relying on SHA-256 or  
> SHA-512 to be like an ideal hash function.)
>
> Also I don't know which of those same security arguments apply to  
> the other KDFs.
>
> Also it isn't clear whether I should skip the extract step when my  
> original key is already densely packed with nutritious entropy.
>
> However, as things stand I would much rather use HKDF since it is  
> apparent that someone (Hugo Krawczyck) has spent the effort to  
> analyze and write down a bunch of relevant security arguments.   
> HKDF's rigorous reductions (as far as I understand them) and its  
> heuristic design both look good to me.
>
> Regards,
>
> Zooko
>
> [1] http://allmydata.org/trac/pycryptopp/browser/pycryptopp/publickey/ecdsamodule.cpp?rev=672#L269
> [2] http://webee.technion.ac.il/~hugo/kdf/kdf.pdf
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> http://www.irtf.org/mailman/listinfo/cfrg


--Apple-Mail-107-891544619
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDnjCCA5ow
ggKCoAMCAQICAWQwCwYJKoZIhvcNAQEFMG0xFTATBgNVBAMMDERhdmlkIE1jR3JldzETMBEGA1UE
CAwKQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMxETAPBgNVBAcMCFNhbiBKb3NlMR8wHQYJKoZIhvcN
AQkBFhBtY2dyZXdAY2lzY28uY29tMB4XDTA4MTIwOTIyMDMzMFoXDTA5MTIwOTIyMDMzMFowbTEV
MBMGA1UEAwwMRGF2aWQgTWNHcmV3MRMwEQYDVQQIDApDYWxpZm9ybmlhMQswCQYDVQQGEwJVUzER
MA8GA1UEBwwIU2FuIEpvc2UxHzAdBgkqhkiG9w0BCQEWEG1jZ3Jld0BjaXNjby5jb20wggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDh5WR1gATRK4ubbWwmG2T/XTUeVc2FAxnmtoYy00fM
5jp3DY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SIb3DQEJBDEWBBTNa+aI
qPbwdC591uhZ4epwW1E+cTCBgQYJKwYBBAGCNxAEMXQwcjBtMRUwEwYDVQQDDAxEYXZpZCBNY0dy
ZXcxEzARBgNVBAgMCkNhbGlmb3JuaWExCzAJBgNVBAYTAlVTMREwDwYDVQQHDAhTYW4gSm9zZTEf
MB0GCSqGSIb3DQEJARYQbWNncmV3QGNpc2NvLmNvbQIBZDCBgwYLKoZIhvcNAQkQAgsxdKByMG0x
FTATBgNVBAMMDERhdmlkIE1jR3JldzETMBEGA1UECAwKQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMx
ETAPBgNVBAcMCFNhbiBKb3NlMR8wHQYJKoZIhvcNAQkBFhBtY2dyZXdAY2lzY28uY29tAgFkMA0G
CSqGSIb3DQEBAQUABIIBAN1IEOa4349GZrCIzbg5GCTtYL+tfcyJObLBZho10hPbOLbJTZ2DUKoX
lcbMvMPzSGzJNJ1owCpmEd9drvN6LnybYM5me7/itCIYWemlaOV9OvOTJan/MN6Mh0oB+0rEas0x
rCsJxPWUafXYhi1eTbmm4BnfAp31CNCZsnYI8Ujx6pjyuLZBPlHVlo2g58VD9Zk+MXifQ1VTTZbO
MZ96HxuzbqlAJJ9TTE3CyKWRflGLxHvU2aU2I/5L9nVsfGY/oWkfjzgtUlvSRWM9wkBvOp6KLpS5
LtBnfo0MinELP5sPN70lAJxr6rJ+dKghzhEhybKTU22zns4a0Ybk0wDbxn8AAAAAAAA=

--Apple-Mail-107-891544619--

From mcgrew@cisco.com  Thu Oct 22 13:54:51 2009
Return-Path: <mcgrew@cisco.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 3D27F3A692D for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 13:54:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level: 
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id axKzGPzbqEZq for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 13:54:50 -0700 (PDT)
Received: from rtp-iport-1.cisco.com (rtp-iport-1.cisco.com [64.102.122.148]) by core3.amsl.com (Postfix) with ESMTP id DF5733A68C3 for <cfrg@irtf.org>; Thu, 22 Oct 2009 13:54:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=mcgrew@cisco.com; l=5122; q=dns/txt; s=rtpiport01001; t=1256244900; x=1257454500; h=from:sender:reply-to:subject:date:message-id:to:cc: mime-version:content-transfer-encoding:content-id: content-description:resent-date:resent-from:resent-sender: resent-to:resent-cc:resent-message-id:in-reply-to: references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; z=From:=20David=20McGrew=20<mcgrew@cisco.com>|Subject:=20R e:=20[Cfrg]=20existing=20KDFs=20and=20their=20uses|Date: =20Thu,=2022=20Oct=202009=2013:54:55=20-0700|Message-Id: =20<3AB03D25-328B-4595-855C-A75B92C89295@cisco.com>|To: =20Peter=20Gutmann=20<pgut001@cs.auckland.ac.nz>|Cc:=20cf rg@irtf.org|Mime-Version:=201.0=20(Apple=20Message=20fram ework=20v936)|In-Reply-To:=20<E1N0qZk-0007a6-2O@wintermut e01.cs.auckland.ac.nz>|References:=20<E1N0qZk-0007a6-2O@w intermute01.cs.auckland.ac.nz>; bh=zhhEZTtxbBMQpCnqjBBaMSwfz2eIR04sWHO0+PcYkbE=; b=e/PGscT3kld+REVCDYOMN+L/yPDUXOEnbHspuopZlX3S/cfa+kC7S/w2 RBtTpBMz6xHYX8nPTv889QCRMZzuAY5Lacyyc8RjM4U0uZ6aBrdAHC0mo 6+6PzsPA6FrG+WGak3HsJKFjY2UDopECV6rCnAt131cmGfVpbQHH6+7Qd g=;
Authentication-Results: rtp-iport-1.cisco.com; dkim=neutral (message not signed) header.i=none
X-Files: smime.p7s : 1760
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApoEAL9j4EpAZnwM/2dsb2JhbADEPIkrjyqCWoFlBIFdiT0
X-IronPort-AV: E=Sophos;i="4.44,607,1249257600";  d="p7s'?scan'208";a="64418468"
Received: from rtp-core-1.cisco.com ([64.102.124.12]) by rtp-iport-1.cisco.com with ESMTP; 22 Oct 2009 20:54:56 +0000
Received: from xbh-rtp-201.amer.cisco.com (xbh-rtp-201.cisco.com [64.102.31.12]) by rtp-core-1.cisco.com (8.13.8/8.14.3) with ESMTP id n9MKstRa020038; Thu, 22 Oct 2009 20:54:55 GMT
Received: from xfe-rtp-201.amer.cisco.com ([64.102.31.38]) by xbh-rtp-201.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Thu, 22 Oct 2009 16:54:55 -0400
Received: from dhcp-clmm-64-100-193-60.cisco.com ([64.100.193.60]) by xfe-rtp-201.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Thu, 22 Oct 2009 16:54:55 -0400
Message-Id: <3AB03D25-328B-4595-855C-A75B92C89295@cisco.com>
From: David McGrew <mcgrew@cisco.com>
To: Peter Gutmann <pgut001@cs.auckland.ac.nz>
In-Reply-To: <E1N0qZk-0007a6-2O@wintermute01.cs.auckland.ac.nz>
Content-Type: multipart/signed; boundary=Apple-Mail-122-912304682; micalg=sha1; protocol="application/pkcs7-signature"
Mime-Version: 1.0 (Apple Message framework v936)
Date: Thu, 22 Oct 2009 13:54:55 -0700
References: <E1N0qZk-0007a6-2O@wintermute01.cs.auckland.ac.nz>
X-Mailer: Apple Mail (2.936)
X-OriginalArrivalTime: 22 Oct 2009 20:54:55.0331 (UTC) FILETIME=[E89D7B30:01CA5359]
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 20:54:51 -0000

--Apple-Mail-122-912304682
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

Hi Peter,

On Oct 21, 2009, at 10:51 PM, Peter Gutmann wrote:

> David McGrew <mcgrew@cisco.com> writes:
>
>> Uses:
>
> There's also a fifth use which I don't think is covered by any of  
> the other
> four, generate multiple sets of cryptovariables (keys, IVs, nonces  
> whatever)
> from a single block of something-or-other (key + nonce + other odds  
> and ends),
> which is what SSL/TLS and SSH do.

I was counting that as "generating one key from another"; this is the  
easy case cryptographically speaking, where we start with a  
(uniformly) random key.

>
>> S/MIME DH KDF.  Section 2.1.2 of RFC 2631.  (Hash function.)  (Is  
>> this really
>> the most up-to-date reference for SMIME DH?)
>
> Yes.  X9.42 was chosen for political reasons over RSA, so the spec  
> stipulated
> MUST X9.42, MAY RSA.  Implementors everywhere interpreted it as MUST  
> RSA,
> SHOULD NOT X9.42, and after awhile the spec stopped trying to  
> pretend it was a
> MUST as well, and then was allowed to fade into obscurity.
>
>> PBKDF2 (HMAC iterated, with all of the iterates XORed together.) from
>> RFC2898, PKCS #5: Password-Based Cryptography Specification Version  
>> 2.0.
>> Use #4.
>
> It's really all of them, since an iterated KDF is also a standard  
> KDF when
> iterations = 1.

I guess that I should be careful to distinguish between what a  
function is designed for and what it is used for.  Is PBKDF2 used with  
anything other than passwords as its "secret" input?

>
>> Additions and corrections are welcome.
>
> There's also the PKCS #12 PRF and the OpenPGP PRF.

Ah, I'd forgotten those.

>
> How obscure can the protocols get?  There's others I know of in  
> little-used or
> application-specific standards that probably don't carry much  
> weight, does
> anyone really care what (say) the CMP PRF looks like?

If it is specified for use on the Internet, and is actually used, it's  
worth cataloging.

thanks,

David

>
>> Also, pointers to security analyses would be good to have, wherever  
>> they
>> exist.
>
> Security analyses?  Do we do those?
>
> (The only ones I know of are for PBKDF2 and HKDF, although I haven't  
> looked at
> every available document on the PRFs.  For most that I've seen it's  
> just
> security by executive fiat).
>
> Peter.


--Apple-Mail-122-912304682
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDnjCCA5ow
ggKCoAMCAQICAWQwCwYJKoZIhvcNAQEFMG0xFTATBgNVBAMMDERhdmlkIE1jR3JldzETMBEGA1UE
CAwKQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMxETAPBgNVBAcMCFNhbiBKb3NlMR8wHQYJKoZIhvcN
AQkBFhBtY2dyZXdAY2lzY28uY29tMB4XDTA4MTIwOTIyMDMzMFoXDTA5MTIwOTIyMDMzMFowbTEV
MBMGA1UEAwwMRGF2aWQgTWNHcmV3MRMwEQYDVQQIDApDYWxpZm9ybmlhMQswCQYDVQQGEwJVUzER
MA8GA1UEBwwIU2FuIEpvc2UxHzAdBgkqhkiG9w0BCQEWEG1jZ3Jld0BjaXNjby5jb20wggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDh5WR1gATRK4ubbWwmG2T/XTUeVc2FAxnmtoYy00fM
5jp3DYFXHkWj4Cl8RVVfAJxP/2PhKsTl0qx2b7N9pIZZa6BaODEyJ8yVMRHloHrpzHeU8DIrst/H
SFVkcJvl3p9LFD42BCvznzQ48VxnWX68OCk7GAwg6XoKMY8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CkNhbGlmb3JuaWExCzAJBgNVBAYTAlVTMREwDwYDVQQHDAhTYW4gSm9zZTEf
MB0GCSqGSIb3DQEJARYQbWNncmV3QGNpc2NvLmNvbQIBZDCBgwYLKoZIhvcNAQkQAgsxdKByMG0x
FTATBgNVBAMMDERhdmlkIE1jR3JldzETMBEGA1UECAwKQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMx
ETAPBgNVBAcMCFNhbiBKb3NlMR8wHQYJKoZIhvcNAQkBFhBtY2dyZXdAY2lzY28uY29tAgFkMA0G
CSqGSIb3DQEBAQUABIIBAA88coEtpteWQcTGqZQw7UYRzyS3ujQEnb6IskWQUt8WEVuUQy7uiy1Y
3XMOeQzWCzXdO48LMuH49WGPoLNXT9LqzwdQl9cdgrXE98ULzzEdbynwb+e3fxo9QaogMrV2JGTK
j5ZF5UkXh3HNIwIDmOycXUzMLFM+BDzKAV1w1V48noRQGqhPE+rxWwv95iNu+J4DveWtyxqcIzPj
AAx6VZc5q3v3Jwn5kTVPpzYUQqYVH3qyNsjoJ+JJ9Rliekw2pFvJfq9GkKjsmQMr/mIVz7kdo8bn
mOKCgaBZw1uwCVRIBdF9iNX67ZTJJdm7wl7T4cRrUlMm8nwhKW31TFOuC2oAAAAAAAA=

--Apple-Mail-122-912304682--

From hugokraw@gmail.com  Thu Oct 22 16:03:12 2009
Return-Path: <hugokraw@gmail.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 605BD3A6911 for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:03:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.826
X-Spam-Level: 
X-Spam-Status: No, score=-1.826 tagged_above=-999 required=5 tests=[AWL=0.150,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lO2h+i8JUGq6 for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:03:11 -0700 (PDT)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by core3.amsl.com (Postfix) with ESMTP id 813E23A686A for <cfrg@irtf.org>; Thu, 22 Oct 2009 16:03:11 -0700 (PDT)
Received: by qw-out-2122.google.com with SMTP id 9so95508qwb.7 for <cfrg@irtf.org>; Thu, 22 Oct 2009 16:03:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=4G70wGPKLfxNgSLWVKHngZQIWBKdzzFr/cw3NPJYqPI=; b=fAiILugIPnrDSydQfIuwbj4XN5JVIYBAbMzI2slw+aKf9joSZuZIbRsQipiL9psLbG AxPLnRQNs8SqM2f31KyccBff3ecg9hbXv0PLqqVr7mSOuJwQYpfIwkl63IQK+pABQcaq ZxD+DvzQseUSISdpech27sqcKDMGnVNasp6z4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=xg6tfizQg2LHzdqZCE2fPLWXFQ6WsKeJbOLXvfn7jYcbzfsdk1XrrGvOJwLpzXWL5Z sejj9eQ8FKjUoOzwzool5jKPhkQUNouIYaJrf2LjxR1k8cvpi5PeKWemoI1R9QRBIInN 7Xd9SVI+6oUZJwyDannygS9Ch92vjmVvj5+5E=
MIME-Version: 1.0
Sender: hugokraw@gmail.com
Received: by 10.224.109.208 with SMTP id k16mr1442699qap.224.1256252598120;  Thu, 22 Oct 2009 16:03:18 -0700 (PDT)
In-Reply-To: <E1N0qZk-0007a6-2O@wintermute01.cs.auckland.ac.nz>
References: <89F9203E-440C-44A8-BA5D-31A1C4A6453D@cisco.com>  <E1N0qZk-0007a6-2O@wintermute01.cs.auckland.ac.nz>
From: Hugo Krawczyk <hugo@ee.technion.ac.il>
Date: Thu, 22 Oct 2009 19:02:58 -0400
X-Google-Sender-Auth: afc1350c57eda14d
Message-ID: <e89b43830910221602t265b45d4j90133f56971c1fe1@mail.gmail.com>
To: Peter Gutmann <pgut001@cs.auckland.ac.nz>
Content-Type: multipart/alternative; boundary=00c09f83a595dbf2f204768e19c8
Cc: dbrown@certicom.com, Pasi.Eronen@nokia.com, mcgrew@cisco.com, cfrg@irtf.org
Subject: Re: [Cfrg] existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 23:03:12 -0000

--00c09f83a595dbf2f204768e19c8
Content-Type: text/plain; charset=ISO-8859-1

Peter,


> >PBKDF2 (HMAC iterated, with all of the iterates XORed together.) from
> >RFC2898, PKCS #5: Password-Based Cryptography Specification Version 2.0.
> >Use #4.
>
> It's really all of them, since an iterated KDF is also a standard KDF when
> iterations = 1.
>

Correct. You can replace password with any initial keying material but then
you end keying the HMAC of PBKDF2 with this non-uniform keying material (say
a 160-bit entropy 2040 DH value or a very non-uniform string of 2Kbyes). Is
that good?
The mathematically correct way is to first apply the extractor to that key
material and then use it as a key.

I people think it would be useful we could add to the draft a section on
passwords, that will add a "slowing down" module to the KDF either between
the extract and expansion or as a replacement of the extract, but only for
the password case.

[....]


>
> Security analyses?  Do we do those?
>

Yes, we (sometimes) do!
(that is why we are having this discussion)


> (The only ones I know of are for PBKDF2 and HKDF, although I haven't looked
> at
> every available document on the PRFs.  For most that I've seen it's just
> security by executive fiat).
>

executive fiat is dead, long live formal analysis ;-)

Hugo


>
> Peter.
>

--00c09f83a595dbf2f204768e19c8
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Peter,<br><br>
<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"borde=
r-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-le=
ft: 1ex;"><div><br>
&gt;PBKDF2 (HMAC iterated, with all of the iterates XORed together.) from<b=
r>
&gt;RFC2898, PKCS #5: Password-Based Cryptography Specification Version 2.0=
.<br>
&gt;Use #4.<br>
<br>
</div>It&#39;s really all of them, since an iterated KDF is also a standard=
 KDF when<br>
iterations =3D 1.<br></blockquote><div><br>Correct. You can replace passwor=
d with any initial keying material but  then you end keying the HMAC of PBK=
DF2 with this non-uniform keying material (say a 160-bit entropy 2040 DH va=
lue or a very non-uniform string of 2Kbyes). Is that good? <br>


The mathematically correct way is to first apply the extractor to that key =
material and then use it as a key.<br><br>I people think it would be useful=
 we could add to the draft a section on passwords, that will add a &quot;sl=
owing down&quot; module to the KDF either between the extract and expansion=
 or as a replacement of the extract, but only for the password case.<br>


<br>[....]<br><br></div><blockquote class=3D"gmail_quote" style=3D"border-l=
eft: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:=
 1ex;"><div><br>
<br>
</div>Security analyses? =A0Do we do those?<br></blockquote><div><br>Yes, w=
e (sometimes) do! <br>(that is why we are having this discussion) <br><br><=
/div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(=
204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<br>
(The only ones I know of are for PBKDF2 and HKDF, although I haven&#39;t lo=
oked at<br>
every available document on the PRFs. =A0For most that I&#39;ve seen it&#39=
;s just<br>
security by executive fiat).<br></blockquote><div><br>executive fiat is dea=
d, long live formal analysis ;-)<br><br>Hugo<br>=A0<br></div><blockquote cl=
ass=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); mar=
gin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<font color=3D"#888888"><br>
Peter.<br>
</font></blockquote></div><br>

--00c09f83a595dbf2f204768e19c8--

From hugokraw@gmail.com  Thu Oct 22 16:06:53 2009
Return-Path: <hugokraw@gmail.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 33BFC3A686A for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:06:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.976
X-Spam-Level: 
X-Spam-Status: No, score=-1.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zjN2GYoXaM+W for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:06:52 -0700 (PDT)
Received: from mail-qy0-f192.google.com (mail-qy0-f192.google.com [209.85.221.192]) by core3.amsl.com (Postfix) with ESMTP id 67EF43A6830 for <cfrg@irtf.org>; Thu, 22 Oct 2009 16:06:52 -0700 (PDT)
Received: by qyk30 with SMTP id 30so5922343qyk.7 for <cfrg@irtf.org>; Thu, 22 Oct 2009 16:06:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=cTrWVvdr1TWRdpES48Ho59TfJgIpoLK1ojhxlGIEpH4=; b=QVwV3PQX4/kiHE+K1jALznlHlhrW3xmg2Wc5rF0yNZ9o3twLiF0Xxmo/PWaZTpTUa5 B/Cdq79kL+SkkD0JWGaWp7ZLTH0llDUTjU6XvPUcvOv6EqxzzBL0IVlnDDyy7VH6mHIv 1y2cTdjGJLTAtyCjCXXYSFW4tWJFOz6t8FTsk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=Ex6zPgyTQmRk1ukq6lbf+KzF3mtVTPzCA1k9qd+lQZQidL5cv4/qHTwfNHvZJKtiwL EPApy//4OffU5FVz86U78y2ke16Tw5qaex6p6VlPK8Ug35EI9QBezRiJRUqfI4npf/47 rv0z5TDeJq5MlCgU2kUN6FiGOgKxKAZOfpqTY=
MIME-Version: 1.0
Sender: hugokraw@gmail.com
Received: by 10.224.12.204 with SMTP id y12mr5034271qay.99.1256252817131; Thu,  22 Oct 2009 16:06:57 -0700 (PDT)
In-Reply-To: <3AB03D25-328B-4595-855C-A75B92C89295@cisco.com>
References: <E1N0qZk-0007a6-2O@wintermute01.cs.auckland.ac.nz>  <3AB03D25-328B-4595-855C-A75B92C89295@cisco.com>
From: Hugo Krawczyk <hugo@ee.technion.ac.il>
Date: Thu, 22 Oct 2009 19:06:37 -0400
X-Google-Sender-Auth: 6d4499e6bdeb7fc0
Message-ID: <e89b43830910221606q57074e56o41367c83e4769103@mail.gmail.com>
To: David McGrew <mcgrew@cisco.com>
Content-Type: multipart/alternative; boundary=000feaed62c9e9c8bf04768e26dc
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 23:06:53 -0000

--000feaed62c9e9c8bf04768e26dc
Content-Type: text/plain; charset=ISO-8859-1

David, this work that you are doing in compiling usage scenarios and
existing KDFs is VERY useful. Hopefully, you can put it as a separate
document. I am very interested to know if there is anything, except
passwords, for which plain HKDF is insufficient.

I am interested in applications that require the KDF to generate regular
random keys rather than some structured elements (such as group elements
that require dedicated group-specific  techniques).

Thanks!

Hugo

--000feaed62c9e9c8bf04768e26dc
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

David, this work that you are doing in compiling usage scenarios and existi=
ng KDFs is VERY useful. Hopefully, you can put it as a separate document. I=
 am very interested to know if there is anything, except passwords, for whi=
ch plain HKDF is insufficient.<br>

<br>I am interested in applications that require the KDF to generate regula=
r random keys rather than some structured elements (such as group elements =
that require dedicated group-specific=A0 techniques).<br><br>Thanks!<br>
<br>
Hugo<br>

--000feaed62c9e9c8bf04768e26dc--

From hugokraw@gmail.com  Thu Oct 22 16:09:44 2009
Return-Path: <hugokraw@gmail.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id D0F273A6830 for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:09:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.976
X-Spam-Level: 
X-Spam-Status: No, score=-1.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s5u--1tRKTuB for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:09:44 -0700 (PDT)
Received: from mail-qy0-f192.google.com (mail-qy0-f192.google.com [209.85.221.192]) by core3.amsl.com (Postfix) with ESMTP id E45373A67C0 for <cfrg@irtf.org>; Thu, 22 Oct 2009 16:09:43 -0700 (PDT)
Received: by qyk30 with SMTP id 30so5923238qyk.7 for <cfrg@irtf.org>; Thu, 22 Oct 2009 16:09:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=057r5y8EikBpHh95WXPg3Pef2hBWsqWO9GyS/vJqsZI=; b=SGVIrAb8UJrbnfD3jelGPJwYPoSkAURtydQTbaa7IlpnwM4lAude1/RCf1nETFtBbn g77xJqMK4ECyeDOypdqvDSTqL0dr0+qXK29Rvq2BC1c5UQvLiWIJrzvaxrfqp8Jv0fdJ kRDg5FuOlXH2QI3mLGxsx2PYnVp8zFHpoT25o=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=wbIDp21c2jvXRMa0wRfpfjDDDjQTp7OYx68rBR59Ig60KRi8QWXI/lWvbyjAKXmHQi 5j9B79KHX3Q23F/Ntt+trWoIP+6IYJWMUgAk/PEWfhFlBjnL7nRkJMssetjHd5Ah8Py9 GmyM+6KIw4xJHnRmFj5Gvun922TJvQMY1yo3c=
MIME-Version: 1.0
Sender: hugokraw@gmail.com
Received: by 10.224.12.141 with SMTP id x13mr5003377qax.337.1256252992149;  Thu, 22 Oct 2009 16:09:52 -0700 (PDT)
In-Reply-To: <46DFA920-54BF-4567-90AF-6742C8FAA5F2@zooko.com>
References: <e89b43830910211838x2e1ca67cgaf48d02cd4008710@mail.gmail.com>  <46DFA920-54BF-4567-90AF-6742C8FAA5F2@zooko.com>
From: Hugo Krawczyk <hugo@ee.technion.ac.il>
Date: Thu, 22 Oct 2009 19:09:32 -0400
X-Google-Sender-Auth: 8a0efe9d1d7fe45a
Message-ID: <e89b43830910221609y75514633m8064d5b19d8d54e4@mail.gmail.com>
To: "Zooko Wilcox-O'Hearn" <zooko@zooko.com>
Content-Type: multipart/alternative; boundary=000feaeb3e6958608404768e31b6
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] Answers to HKDF questions
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 23:09:44 -0000

--000feaeb3e6958608404768e31b6
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Oct 21, 2009 at 11:01 PM, Zooko Wilcox-O'Hearn <zooko@zooko.com>wrote:

> Dear Hugo Krawcyck:
>
> Thank you for the detailed answers.  I still have a question about HMAC as
> compared to other MACs.  Feel free to point me to existing documents if they
> answer my question.  Suppose I were to instantiate HKDF with the keyed PRF
> being a cipher based MAC such as Poly1305 instead of HMAC.  Which of the
> arguments for HKDF's security would still apply?
>
>
To answer these questions I need to ask you some questions myself:

Can you explain how do you plan to use poly1305 for KDF.
Is it as an extractor, or for key expansion or both? You say as a "keyed
PRF": how do you get a PRF out of your MAC and where does the key to the PRF
come from?
Are you going to use only the universal hash part of poly1305 or the whole
construction?
If the latter, where does the key for AES come from?

In general a MAC function does not imply a good KDF. Even a good PRF does
not.
(If that was the case it would have been much easier to argue that HMAC is a
good basis for KDF).

If you give me more details on what you mean by your "MAC-based KDF" I can
try to answer more specifically.

Hugo

--000feaeb3e6958608404768e31b6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Wed, Oct 21, 2009 at 11:01 PM, Zooko =
Wilcox-O&#39;Hearn <span dir=3D"ltr">&lt;<a href=3D"mailto:zooko@zooko.com"=
 target=3D"_blank">zooko@zooko.com</a>&gt;</span> wrote:<br><blockquote cla=
ss=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); marg=
in: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



Dear Hugo Krawcyck:<br>
<br>
Thank you for the detailed answers. =A0I still have a question about HMAC a=
s compared to other MACs. =A0Feel free to point me to existing documents if=
 they answer my question. =A0Suppose I were to instantiate HKDF with the ke=
yed PRF being a cipher based MAC such as Poly1305 instead of HMAC. =A0Which=
 of the arguments for HKDF&#39;s security would still apply?<br>



<br></blockquote><div><br>To answer these questions I need to ask you some =
questions myself:<br><br>Can you explain how do you plan to use poly1305 fo=
r KDF.<br>Is it as an extractor, or for key expansion or both? You say as a=
 &quot;keyed PRF&quot;: how do you get a PRF out of your MAC and where does=
 the key to the PRF come from?<br>



Are you going to use only the universal hash part of poly1305 or the whole =
construction?<br>If the latter, where does the key for AES come from?<br><b=
r>In general a MAC function does not imply a good KDF. Even a good PRF does=
 not.<br>



(If that was the case it would have been much easier to argue that HMAC is =
a good basis for KDF).<br><br>If you give me more details on what you mean =
by your &quot;MAC-based KDF&quot; I can try to answer more specifically.<br=
>



<br>Hugo<br><br></div></div>

--000feaeb3e6958608404768e31b6--

From uri@ll.mit.edu  Thu Oct 22 16:21:39 2009
Return-Path: <uri@ll.mit.edu>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 439AF28C11C for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:21:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.212
X-Spam-Level: 
X-Spam-Status: No, score=-6.212 tagged_above=-999 required=5 tests=[AWL=-0.115, BAYES_00=-2.599, HTML_MESSAGE=0.001, MIME_BAD_LINEBREAK=0.5, RCVD_IN_DNSWL_MED=-4, UNPARSEABLE_RELAY=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fC+qsc-Yopov for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:21:38 -0700 (PDT)
Received: from ll.mit.edu (LLMAIL1.LL.MIT.EDU [129.55.12.41]) by core3.amsl.com (Postfix) with ESMTP id 432D13A67EF for <cfrg@irtf.org>; Thu, 22 Oct 2009 16:21:38 -0700 (PDT)
Received: (from smtp@localhost) by ll.mit.edu (8.12.10/8.8.8) id n9MNLg7d003679; Thu, 22 Oct 2009 19:21:42 -0400 (EDT)
Received: from lle2k7-hub01.llan.ll.mit.edu(            ), claiming to be "LLE2K7-HUB01.mitll.ad.local" via SMTP by llpost, id smtpdAAASAaWCg; Thu Oct 22 19:20:17 2009
Received: from LLE2K7-BE01.mitll.ad.local ([            ]) by LLE2K7-HUB01.mitll.ad.local ([            ]) with mapi; Thu, 22 Oct 2009 19:20:17 -0400
From: "Blumenthal, Uri" <uri@ll.mit.edu>
To: "'hugo@ee.technion.ac.il'" <hugo@ee.technion.ac.il>
Date: Thu, 22 Oct 2009 19:19:49 -0400
Thread-Topic: [Cfrg] Answers to HKDF questions
Thread-Index: AcpTbapTFEfEotHCSJCudvdaO6+LbQAAIyiT
Message-ID: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BFE@LLE2K7-BE01.mitll.ad.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: multipart/alternative; boundary="_000_90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BFELLE2K7BE01mit_"
MIME-Version: 1.0
Cc: "'cfrg@irtf.org'" <cfrg@irtf.org>
Subject: Re: [Cfrg] Answers to HKDF questions
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 23:21:39 -0000

--_000_90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BFELLE2K7BE01mit_
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64

QWN0dWFsbHkgb25lIHRoaW5nIEkgZG9uJ3QgdGhpbmsgSSBmb3VuZCBpbiB0aGUgcGFwZXIgdGhh
dCBIdWdvIHJlZmVycmVkIHRvLCB3YXMgd2h5IEhNQUMtU0hBIGlzIGEgYmV0dGVyICpSYW5kb21p
emVyKiB0aGFuIFNIQS4gV2h5IEhNQUMgaXMgYmV0dGVyIHRoYW4gc2F5IGtleWVkIFNIQSBpcyBj
bGVhci4NCg0KV291bGQgeW91IGNhcmUgdG8gY2xhcmlmeSB0aGlzPw0KDQpfX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fXw0KRnJvbTogY2ZyZy1ib3VuY2VzQGlydGYub3JnIDxjZnJnLWJv
dW5jZXNAaXJ0Zi5vcmc+DQpUbzogWm9va28gV2lsY294LU8nSGVhcm4gPHpvb2tvQHpvb2tvLmNv
bT4NCkNjOiBjZnJnQGlydGYub3JnIDxjZnJnQGlydGYub3JnPg0KU2VudDogVGh1IE9jdCAyMiAx
OTowOTozMiAyMDA5DQpTdWJqZWN0OiBSZTogW0NmcmddIEFuc3dl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JZiB0aGUgbGF0dGVyLCB3aGVyZSBkb2VzIHRoZSBrZXkgZm9yIEFFUyBjb21lIGZy
b20/PGJyPjxicj5JbiBnZW5lcmFsIGEgTUFDIGZ1bmN0aW9uIGRvZXMgbm90IGltcGx5IGEgZ29v
ZCBLREYuIEV2ZW4gYSBnb29kIFBSRiBkb2VzIG5vdC48YnI+DQoNCg0KDQooSWYgdGhhdCB3YXMg
dGhlIGNhc2UgaXQgd291bGQgaGF2ZSBiZWVuIG11Y2ggZWFzaWVyIHRvIGFyZ3VlIHRoYXQgSE1B
QyBpcyBhIGdvb2QgYmFzaXMgZm9yIEtERikuPGJyPjxicj5JZiB5b3UgZ2l2ZSBtZSBtb3JlIGRl
dGFpbHMgb24gd2hhdCB5b3UgbWVhbiBieSB5b3VyICZxdW90O01BQy1iYXNlZCBLREYmcXVvdDsg
SSBjYW4gdHJ5IHRvIGFuc3dlciBtb3JlIHNwZWNpZmljYWxseS48YnI+DQoNCg0KDQo8YnI+SHVn
bzxicj48YnI+PC9kaXY+PC9kaXY+DQo=

--_000_90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BFELLE2K7BE01mit_--

From hugokraw@gmail.com  Thu Oct 22 16:49:05 2009
Return-Path: <hugokraw@gmail.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 9429C3A6870 for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:49:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.501
X-Spam-Level: 
X-Spam-Status: No, score=-1.501 tagged_above=-999 required=5 tests=[AWL=-0.275, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, SARE_OBFU_ALL=0.751]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FIl+YPuKa2NX for <cfrg@core3.amsl.com>; Thu, 22 Oct 2009 16:49:04 -0700 (PDT)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by core3.amsl.com (Postfix) with ESMTP id 770D83A686A for <cfrg@irtf.org>; Thu, 22 Oct 2009 16:49:04 -0700 (PDT)
Received: by qw-out-2122.google.com with SMTP id 9so101409qwb.7 for <cfrg@irtf.org>; Thu, 22 Oct 2009 16:49:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=GeLvQEtLWxqCpKAzlbvFQkr37cxhw/A+i/nQyFip+Zc=; b=tmTO7xE/gJiRKh6utjHLmUsJt7G25CuqEYlyGFB+ZblSx/M3d0UCcvSfC+3Niw77kX pBE+J+wUc5/RmPzQ6N5SzW6zJDFpSitaUSfFkvXMK2q1eOsH/HdoXZhNQRS20wLlAYF2 thrniTiQNStXuGcJfK6qyk+TzHiemwF8wE5Fs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=i1J059/9BBiqfWOPpg5fjyufMAkGQCgyxc8mQHPUgMWaurgQEbHhTbVQGMyMUftGpL UlI/u/PAbnHlMQvI5NSrUMLlKXIh91ZFxEriC+/uLOQk3CWiTQ46ZCWKgKqclVwZpJpX aYjSCdwAl0TB3nWJeQysk5sdmrQb9ZtjVtHjs=
MIME-Version: 1.0
Sender: hugokraw@gmail.com
Received: by 10.224.30.209 with SMTP id v17mr5031552qac.188.1256255351116;  Thu, 22 Oct 2009 16:49:11 -0700 (PDT)
In-Reply-To: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BFE@LLE2K7-BE01.mitll.ad.local>
References: <90E934FC4BBC1946B3C27E673B4DB0E4A7E75F6BFE@LLE2K7-BE01.mitll.ad.local>
From: Hugo Krawczyk <hugo@ee.technion.ac.il>
Date: Thu, 22 Oct 2009 19:48:51 -0400
X-Google-Sender-Auth: 9992f8f03b75192b
Message-ID: <e89b43830910221648w63bc7b38n7cc837fa2dff51b5@mail.gmail.com>
To: "Blumenthal, Uri" <uri@ll.mit.edu>
Content-Type: multipart/alternative; boundary=00c09f89928ff3556404768ebd3a
Cc: "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] Answers to HKDF questions
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Thu, 22 Oct 2009 23:49:05 -0000

--00c09f89928ff3556404768ebd3a
Content-Type: text/plain; charset=ISO-8859-1

I do not know what you mean by "better randomizer" so I cannot answer the
question.
I can answer why it is a better extractor which is what the whole paper is
about.

One result you may want to take a look at is Coron et al. Ref [17] in my
paper.
They show something that I use but is not specific to KDFs.

They prove that HMAC (think of it as a mode of operation acting on
Merkle-Damgard functions) is random-oracle-preserving, while Merkle-Damgard
alone is not (as clearly demonstrated by extension attacks).

You can think of it as an indication that HMAC is a better
randomness-preserving function than the plain hash.
Maybe that is what you mean by "better randomizer"?

Hugo

On Thu, Oct 22, 2009 at 7:19 PM, Blumenthal, Uri <uri@ll.mit.edu> wrote:

>  Actually one thing I don't think I found in the paper that Hugo referred
> to, was why HMAC-SHA is a better *Randomizer* than SHA. Why HMAC is better
> than say keyed SHA is clear.
>
> Would you care to clarify this?
>
> ------------------------------
>  *From*: cfrg-bounces@irtf.org <cfrg-bounces@irtf.org>
> *To*: Zooko Wilcox-O'Hearn <zooko@zooko.com>
> *Cc*: cfrg@irtf.org <cfrg@irtf.org>
> *Sent*: Thu Oct 22 19:09:32 2009
> *Subject*: Re: [Cfrg] Answers to HKDF questions
>
>
>
> On Wed, Oct 21, 2009 at 11:01 PM, Zooko Wilcox-O'Hearn <zooko@zooko.com>wrote:
>
>> Dear Hugo Krawcyck:
>>
>> Thank you for the detailed answers.  I still have a question about HMAC as
>> compared to other MACs.  Feel free to point me to existing documents if they
>> answer my question.  Suppose I were to instantiate HKDF with the keyed PRF
>> being a cipher based MAC such as Poly1305 instead of HMAC.  Which of the
>> arguments for HKDF's security would still apply?
>>
>>
> To answer these questions I need to ask you some questions myself:
>
> Can you explain how do you plan to use poly1305 for KDF.
> Is it as an extractor, or for key expansion or both? You say as a "keyed
> PRF": how do you get a PRF out of your MAC and where does the key to the PRF
> come from?
> Are you going to use only the universal hash part of poly1305 or the whole
> construction?
> If the latter, where does the key for AES come from?
>
> In general a MAC function does not imply a good KDF. Even a good PRF does
> not.
> (If that was the case it would have been much easier to argue that HMAC is
> a good basis for KDF).
>
> If you give me more details on what you mean by your "MAC-based KDF" I can
> try to answer more specifically.
>
> Hugo
>
>

--00c09f89928ff3556404768ebd3a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I do not know what you mean by &quot;better randomizer&quot; so I cannot an=
swer the question.<br>I can answer why it is a better extractor which is wh=
at the whole paper is about.<br><br>One result you may want to take a look =
at is Coron et al. Ref [17] in my paper.<br>

They show something that I use but is not specific to KDFs.<br><br>They pro=
ve that HMAC (think of it as a mode of operation acting on Merkle-Damgard f=
unctions) is random-oracle-preserving, while Merkle-Damgard alone is not (a=
s clearly demonstrated by extension attacks). <br>

<br>You can think of it as an indication that HMAC is a better randomness-p=
reserving function than the plain hash.<br>Maybe that is what you mean by &=
quot;better randomizer&quot;?<br><br>Hugo<br><br><div class=3D"gmail_quote"=
>

On Thu, Oct 22, 2009 at 7:19 PM, Blumenthal, Uri <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:uri@ll.mit.edu">uri@ll.mit.edu</a>&gt;</span> wrote:<br><bloc=
kquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, =
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><font size=3D"2" color=3D"navy" face=3D"Arial">
Actually one thing I don&#39;t think I found in the paper that Hugo referre=
d to, was why HMAC-SHA is a better *Randomizer* than SHA. Why HMAC is bette=
r than say keyed SHA is clear.<br><br>Would you care to clarify this?<br>

</font></div>
<br><div><hr align=3D"center" size=3D"2" width=3D"100%">
<font size=3D"2" face=3D"Tahoma">
<b>From</b>: <a href=3D"mailto:cfrg-bounces@irtf.org" target=3D"_blank">cfr=
g-bounces@irtf.org</a> &lt;<a href=3D"mailto:cfrg-bounces@irtf.org" target=
=3D"_blank">cfrg-bounces@irtf.org</a>&gt;
<br><b>To</b>: Zooko Wilcox-O&#39;Hearn &lt;<a href=3D"mailto:zooko@zooko.c=
om" target=3D"_blank">zooko@zooko.com</a>&gt;
<br><b>Cc</b>: <a href=3D"mailto:cfrg@irtf.org" target=3D"_blank">cfrg@irtf=
.org</a> &lt;<a href=3D"mailto:cfrg@irtf.org" target=3D"_blank">cfrg@irtf.o=
rg</a>&gt;
<br><b>Sent</b>: Thu Oct 22 19:09:32 2009<br><b>Subject</b>: Re: [Cfrg] Ans=
wers to HKDF questions
<br></font><br></div><div><div></div><div class=3D"h5">
<br><br><div class=3D"gmail_quote">On Wed, Oct 21, 2009 at 11:01 PM, Zooko =
Wilcox-O&#39;Hearn <span dir=3D"ltr">&lt;<a href=3D"mailto:zooko@zooko.com"=
 target=3D"_blank">zooko@zooko.com</a>&gt;</span> wrote:<br><blockquote cla=
ss=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); marg=
in: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





Dear Hugo Krawcyck:<br>
<br>
Thank you for the detailed answers. =A0I still have a question about HMAC a=
s compared to other MACs. =A0Feel free to point me to existing documents if=
 they answer my question. =A0Suppose I were to instantiate HKDF with the ke=
yed PRF being a cipher based MAC such as Poly1305 instead of HMAC. =A0Which=
 of the arguments for HKDF&#39;s security would still apply?<br>





<br></blockquote><div><br>To answer these questions I need to ask you some =
questions myself:<br><br>Can you explain how do you plan to use poly1305 fo=
r KDF.<br>Is it as an extractor, or for key expansion or both? You say as a=
 &quot;keyed PRF&quot;: how do you get a PRF out of your MAC and where does=
 the key to the PRF come from?<br>





Are you going to use only the universal hash part of poly1305 or the whole =
construction?<br>If the latter, where does the key for AES come from?<br><b=
r>In general a MAC function does not imply a good KDF. Even a good PRF does=
 not.<br>





(If that was the case it would have been much easier to argue that HMAC is =
a good basis for KDF).<br><br>If you give me more details on what you mean =
by your &quot;MAC-based KDF&quot; I can try to answer more specifically.<br=
>





<br>Hugo<br><br></div></div>
</div></div></blockquote></div><br>

--00c09f89928ff3556404768ebd3a--

From zooko@zooko.com  Sun Oct 25 16:06:16 2009
Return-Path: <zooko@zooko.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 00AEC3A6A02 for <cfrg@core3.amsl.com>; Sun, 25 Oct 2009 16:06:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.106
X-Spam-Level: 
X-Spam-Status: No, score=-1.106 tagged_above=-999 required=5 tests=[AWL=-1.196, BAYES_05=-1.11, J_CHICKENPOX_33=0.6, J_CHICKENPOX_43=0.6]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hWtCGP-A-nvs for <cfrg@core3.amsl.com>; Sun, 25 Oct 2009 16:06:15 -0700 (PDT)
Received: from nooxie.zooko.com (nooxie.zooko.com [207.7.145.200]) by core3.amsl.com (Postfix) with ESMTP id 49C163A69FE for <cfrg@irtf.org>; Sun, 25 Oct 2009 16:06:14 -0700 (PDT)
Received: from [192.168.1.118] (97-118-103-27.hlrn.qwest.net [97.118.103.27]) by nooxie.zooko.com (Postfix) with ESMTP id 5AE3019DC6 for <cfrg@irtf.org>; Sun, 25 Oct 2009 16:11:16 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v753.1)
In-Reply-To: <e89b43830910221609y75514633m8064d5b19d8d54e4@mail.gmail.com>
References: <e89b43830910211838x2e1ca67cgaf48d02cd4008710@mail.gmail.com> <46DFA920-54BF-4567-90AF-6742C8FAA5F2@zooko.com> <e89b43830910221609y75514633m8064d5b19d8d54e4@mail.gmail.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <823D9A4C-11AB-4CBE-A554-D8FF62AC6166@zooko.com>
Content-Transfer-Encoding: 7bit
From: Zooko Wilcox-O'Hearn <zooko@zooko.com>
Date: Sun, 25 Oct 2009 17:06:17 -0600
To: cfrg@irtf.org
X-Mailer: Apple Mail (2.753.1)
Subject: Re: [Cfrg] Answers to HKDF questions
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Sun, 25 Oct 2009 23:06:16 -0000

On Thursday,2009-10-22, at 17:09 , Hugo Krawczyk wrote:

> Can you explain how do you plan to use poly1305 for KDF.

I was thinking firstly of the expansion stage, but a similar question  
applies to the extraction stage.

Poly1305 and HMAC have the same "interface" -- that of a MAC which  
takes a key and a message and perhaps a nonce and generates a tag.   
In your paper you describe a general structure for the Extract then  
Expand ("XtX") KDF which uses in the expansion stage a function named  
"PRF".  Then you suggest to instantiate PRF(PRK, m) as HMAC(PRK, m)  
(section 2).

My question is, suppose I instead instantiated PRF(PRK, m) as  
Poly1305-AES(PRK, m).  HMAC and Poly1305 each have arguments for  
their security as MACs.  But are the arguments of the security of  
HKDF predicated on the assumption that the PRK is a secure MAC?  In  
other words: what property is required of the PRK function in order  
for HKDF to be a good KDF?

David McGrew wrote a nice note in answer to my question: http:// 
www.ietf.org/mail-archive/web/cfrg/current/msg02672.html

In the context of the extraction stage, he seemed to say that a  
Carter-Wegman MAC such as Poly1305 should be analyzed merely as a  
statistical extractor, not as a computational extractor.  Is that  
what you meant to say, David?  I don't see why that would be so.

Regards,

Zooko

From mcgrew@cisco.com  Mon Oct 26 04:07:40 2009
Return-Path: <mcgrew@cisco.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 3323E3A6968 for <cfrg@core3.amsl.com>; Mon, 26 Oct 2009 04:07:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.859
X-Spam-Level: 
X-Spam-Status: No, score=-5.859 tagged_above=-999 required=5 tests=[AWL=-0.460, BAYES_00=-2.599, J_CHICKENPOX_33=0.6, J_CHICKENPOX_43=0.6, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yPiZpeyHH2IE for <cfrg@core3.amsl.com>; Mon, 26 Oct 2009 04:07:39 -0700 (PDT)
Received: from sj-iport-2.cisco.com (sj-iport-2.cisco.com [171.71.176.71]) by core3.amsl.com (Postfix) with ESMTP id 1BEDE3A6945 for <cfrg@irtf.org>; Mon, 26 Oct 2009 04:07:39 -0700 (PDT)
Authentication-Results: sj-iport-2.cisco.com; dkim=neutral (message not signed) header.i=none
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApoEALIf5UqrR7H+/2dsb2JhbADARpZohD8E
X-IronPort-AV: E=Sophos;i="4.44,625,1249257600"; d="scan'208";a="217779671"
Received: from sj-core-2.cisco.com ([171.71.177.254]) by sj-iport-2.cisco.com with ESMTP; 26 Oct 2009 11:07:52 +0000
Received: from xbh-sjc-231.amer.cisco.com (xbh-sjc-231.cisco.com [128.107.191.100]) by sj-core-2.cisco.com (8.13.8/8.14.3) with ESMTP id n9QB7que018594; Mon, 26 Oct 2009 11:07:52 GMT
Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-231.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Mon, 26 Oct 2009 04:07:52 -0700
Received: from stealth-10-32-254-212.cisco.com ([10.32.254.212]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Mon, 26 Oct 2009 04:07:51 -0700
Message-Id: <1AA41B0A-F458-444A-BFC0-78A49FAB6F43@cisco.com>
From: David McGrew <mcgrew@cisco.com>
To: "Zooko Wilcox-O'Hearn" <zooko@zooko.com>
In-Reply-To: <823D9A4C-11AB-4CBE-A554-D8FF62AC6166@zooko.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Mon, 26 Oct 2009 04:07:50 -0700
References: <e89b43830910211838x2e1ca67cgaf48d02cd4008710@mail.gmail.com> <46DFA920-54BF-4567-90AF-6742C8FAA5F2@zooko.com> <e89b43830910221609y75514633m8064d5b19d8d54e4@mail.gmail.com> <823D9A4C-11AB-4CBE-A554-D8FF62AC6166@zooko.com>
X-Mailer: Apple Mail (2.936)
X-OriginalArrivalTime: 26 Oct 2009 11:07:52.0227 (UTC) FILETIME=[8FA95730:01CA562C]
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] Answers to HKDF questions
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Mon, 26 Oct 2009 11:07:40 -0000

Hi Zooko,

On Oct 25, 2009, at 4:06 PM, Zooko Wilcox-O'Hearn wrote:

> On Thursday,2009-10-22, at 17:09 , Hugo Krawczyk wrote:
>
>> Can you explain how do you plan to use poly1305 for KDF.
>
> I was thinking firstly of the expansion stage, but a similar  
> question applies to the extraction stage.
>
> Poly1305 and HMAC have the same "interface" -- that of a MAC which  
> takes a key and a message and perhaps a nonce and generates a tag.   
> In your paper you describe a general structure for the Extract then  
> Expand ("XtX") KDF which uses in the expansion stage a function  
> named "PRF".  Then you suggest to instantiate PRF(PRK, m) as  
> HMAC(PRK, m) (section 2).
>
> My question is, suppose I instead instantiated PRF(PRK, m) as  
> Poly1305-AES(PRK, m).  HMAC and Poly1305 each have arguments for  
> their security as MACs.  But are the arguments of the security of  
> HKDF predicated on the assumption that the PRK is a secure MAC?  In  
> other words: what property is required of the PRK function in order  
> for HKDF to be a good KDF?
>
> David McGrew wrote a nice note in answer to my question: http://www.ietf.org/mail-archive/web/cfrg/current/msg02672.html
>
> In the context of the extraction stage, he seemed to say that a  
> Carter-Wegman MAC such as Poly1305 should be analyzed merely as a  
> statistical extractor, not as a computational extractor.  Is that  
> what you meant to say, David?

Yes, that's right.

> I don't see why that would be so.

Check out S2.1 of http://cs.haifa.ac.il/~ronen/online_papers/survey.ps

David


>
> Regards,
>
> Zooko
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> http://www.irtf.org/mailman/listinfo/cfrg


From Pasi.Eronen@nokia.com  Tue Oct 27 04:19:16 2009
Return-Path: <Pasi.Eronen@nokia.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id A77FD3A682E for <cfrg@core3.amsl.com>; Tue, 27 Oct 2009 04:19:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.57
X-Spam-Level: 
X-Spam-Status: No, score=-6.57 tagged_above=-999 required=5 tests=[AWL=0.029,  BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5Z1Fuc46Vsi2 for <cfrg@core3.amsl.com>; Tue, 27 Oct 2009 04:19:15 -0700 (PDT)
Received: from mgw-mx06.nokia.com (smtp.nokia.com [192.100.122.233]) by core3.amsl.com (Postfix) with ESMTP id 4F77C3A681D for <cfrg@irtf.org>; Tue, 27 Oct 2009 04:19:15 -0700 (PDT)
Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9RBJ9SQ025724; Tue, 27 Oct 2009 13:19:20 +0200
Received: from vaebh102.NOE.Nokia.com ([10.160.244.23]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959);  Tue, 27 Oct 2009 13:19:04 +0200
Received: from smtp.mgd.nokia.com ([65.54.30.6]) by vaebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959);  Tue, 27 Oct 2009 13:18:55 +0200
Received: from NOK-EUMSG-01.mgdnok.nokia.com ([65.54.30.86]) by nok-am1mhub-02.mgdnok.nokia.com ([65.54.30.6]) with mapi; Tue, 27 Oct 2009 12:18:55 +0100
From: <Pasi.Eronen@nokia.com>
To: <mcgrew@cisco.com>, <hugo@ee.technion.ac.il>
Date: Tue, 27 Oct 2009 12:18:53 +0100
Thread-Topic: comments and questions on draft-krawczyk-hkdf and related work
Thread-Index: AcpRzmnbAmv9jozmScWXsXCeJ1Wb2QFJ058w
Message-ID: <808FD6E27AD4884E94820BC333B2DB774E7F5DFCE5@NOK-EUMSG-01.mgdnok.nokia.com>
References: <FF282486-6438-4E2E-97B5-0C4034D6BB3D@cisco.com>
In-Reply-To: <FF282486-6438-4E2E-97B5-0C4034D6BB3D@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginalArrivalTime: 27 Oct 2009 11:18:55.0145 (UTC) FILETIME=[45345990:01CA56F7]
X-Nokia-AV: Clean
Cc: cfrg@irtf.org
Subject: Re: [Cfrg] comments and questions on draft-krawczyk-hkdf and related work
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 27 Oct 2009 11:19:16 -0000

Hi David,

I'll try to answer the parts of spec-writing (since I'm definitely
not a cryptographer):

<snip>
> The draft is somewhat incomplete as a normative specification, in that
> it does not require the implementation of any particular hash (would
> it make sense to include the recommended instantiation from the
> paper?).  Also, it does not use any of the RFC 2119 keywords.  I would
> expect that, to be used in standards, it would be necessary to at
> least provide some recommended instantiations and the security levels
> that they target.

I don't think we need a mandatory instantiation in this document (it
would be defined in the protocol using this KDF -- the HMAC spec, RFC
2104, has the same approach).. so it's some sense intentionally
incomplete, as it can't be used alone, but always as part of some
protocol.

But perhaps some discussion about the security level (perhaps a
pointer to NIST's document about these, or copying the table from
there) would be good.

<snip>
> I wonder if we really want to target all of these disparate cases with
> a single KDF function.  Applications using just case #1 may reject
> adopting HKDF on the reasonable grounds that they don't need the
> extraction stage, and that adopting HKDF with the suggestion of
> Section 3.3 to skip that stage would amount to replacing a perfectly
> OK PRF with another PRF that offers no security advantage.

The document doesn't propose replacing PRFs in existing protocols with
HKDF -- that would be mostly unproductive work (and thus bad
engineering). It's more intended for new protocols (or perhaps to
situations where folks have already agreed that the existing PRF in
some protocol is definitely not OK -- but I don't have any=20
such situation in mind currently).

> IKE and TLS both use a PRF for applications #1 and #2, but are there
> other protocols that use a single PRF in multiple applications?  There
> is a listing of some IETF references to KDFs at
> http://www.mindspring.com/~dmcgrew/ic/internet-crypto.html#prfs and,
> besides IKE, these uses seem to belong to just a single case.  There
> are also some other protocols with built-in single-purpose KDFs that
> are not externally documented, such as SRTP's AES-CTR based KDF
> and EAP TLS key derivation.
>=20
> If IKE and TLS are the main intended applications, I suggest adding a
> discussion of these applications to the draft.  It would be valuable
> to compare HKDF to the existing KDF functions used in those protocols.

As noted above, this is mostly meant as a building block for writers
of new protocol specifications, not as change to existing protocols.
So TLS is definitely not an intended applications of this (it's already
used in IKE).

Best regards,
Pasi


From mcgrew@cisco.com  Tue Oct 27 11:20:11 2009
Return-Path: <mcgrew@cisco.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6743B3A67DD for <cfrg@core3.amsl.com>; Tue, 27 Oct 2009 11:20:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.414
X-Spam-Level: 
X-Spam-Status: No, score=-6.414 tagged_above=-999 required=5 tests=[AWL=0.185,  BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id azfC55KPFFo7 for <cfrg@core3.amsl.com>; Tue, 27 Oct 2009 11:20:10 -0700 (PDT)
Received: from sj-iport-3.cisco.com (sj-iport-3.cisco.com [171.71.176.72]) by core3.amsl.com (Postfix) with ESMTP id 5573B3A63EC for <cfrg@irtf.org>; Tue, 27 Oct 2009 11:20:10 -0700 (PDT)
Authentication-Results: sj-iport-3.cisco.com; dkim=neutral (message not signed) header.i=none
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApoEAPXW5kqrR7Ht/2dsb2JhbADBPIksjymCWoFlBIFf
X-IronPort-AV: E=Sophos;i="4.44,634,1249257600"; d="scan'208";a="199165069"
Received: from sj-core-1.cisco.com ([171.71.177.237]) by sj-iport-3.cisco.com with ESMTP; 27 Oct 2009 18:20:25 +0000
Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by sj-core-1.cisco.com (8.13.8/8.14.3) with ESMTP id n9RIKOmS012104 for <cfrg@irtf.org>; Tue, 27 Oct 2009 18:20:24 GMT
Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Tue, 27 Oct 2009 11:20:24 -0700
Received: from stealth-10-32-254-212.cisco.com ([10.32.254.212]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Tue, 27 Oct 2009 11:20:24 -0700
Message-Id: <12BAFA3C-AAFD-4830-9E3F-099A2E18163B@cisco.com>
From: David McGrew <mcgrew@cisco.com>
To: cfrg@irtf.org
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Tue, 27 Oct 2009 11:20:23 -0700
References: <E1N2oCF-0001Ge-BT@wintermute01.cs.auckland.ac.nz>
X-Mailer: Apple Mail (2.936)
X-OriginalArrivalTime: 27 Oct 2009 18:20:24.0426 (UTC) FILETIME=[26CA64A0:01CA5732]
Subject: [Cfrg] Fwd:  existing KDFs and their uses
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: Peter Gutmann <pgut001@cs.auckland.ac.nz>
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 27 Oct 2009 18:20:11 -0000

Forwarding Peter's message to the list, because the mailman system  
isn't processing his mails correctly.

Begin forwarded message:

> From: Peter Gutmann <pgut001@cs.auckland.ac.nz>
> Date: October 27, 2009 8:42:55 AM PDT
> To: cfrg@irtf.org
> Cc: mcgrew@cisco.com
> Subject: Re: [Cfrg] existing KDFs and their uses
>
> [This is a re-post of two earlier attempted posts combined into one,
> apparently my earlier attempts didn't get through to the list.  Bits  
> of this
> have been replied to via CC'd copies to other people on the list,  
> sorry about
> the confusion]
>
> David McGrew <mcgrew@cisco.com> writes:
>
>> Uses:
>
> There's also a fifth use which I don't think is covered by any of  
> the other
> four, generate multiple sets of cryptovariables (keys, IVs, nonces  
> whatever)
> from a single block of something-or-other (key + nonce + other odds  
> and ends),
> which is what SSL/TLS and SSH do.
>
>> S/MIME DH KDF.  Section 2.1.2 of RFC 2631.  (Hash function.)  (Is  
>> this really
>> the most up-to-date reference for SMIME DH?)
>
> Yes.  X9.42 was chosen for political reasons over RSA, so the spec  
> stipulated
> MUST X9.42, MAY RSA.  Implementors everywhere interpreted it as MUST  
> RSA,
> SHOULD NOT X9.42, and after awhile the spec stopped trying to  
> pretend it was a
> MUST as well, and then was allowed to fade into obscurity.
>
>> PBKDF2 (HMAC iterated, with all of the iterates XORed together.) from
>> RFC2898, PKCS #5: Password-Based Cryptography Specification Version  
>> 2.0.
>> Use #4.
>
> It's really all of them, since an iterated KDF is also a standard  
> KDF when
> iterations = 1.
>
>> Additions and corrections are welcome.
>
> There's also the PKCS #12 PRF and the OpenPGP PRF.
>
> How obscure can the protocols get?  There's others I know of in  
> little-used or
> application-specific standards that probably don't carry much  
> weight, does
> anyone really care what (say) the CMP PRF looks like?
>
>> Also, pointers to security analyses would be good to have, wherever  
>> they
>> exist.
>
> Security analyses?  Do we do those?
>
> The only ones I know of are for PBKDF2 and HKDF, although I haven't  
> looked at
> every available document on PRFs.  For most that I've seen it's just  
> security
> by executive fiat.
>
> The rationale and analysis document for HKDF is providing a very  
> valuable
> service, something I've been waiting for for a *long* time, my "Crypto
> Gardening Guide" has listed this as its primary crypto-problem-in-  
> need-of-
> solving since early 2003.  It's really good to finally see this  
> discussed and
> analysed in depth.
>
>> I guess that I should be careful to distinguish between what a  
>> function is
>> designed for and what it is used for.  Is PBKDF2 used with anything  
>> other
>> than passwords as its "secret" input?
>
> Yes.  The "PB" part of its name is a bit misleading, it's meant as  
> an update
> to what then became "PNKDF1" (i.e. "hash it with MD5"), but it's  
> really a
> general-purpose impedance-matcher for cryptovariables.
>
>> If it is specified for use on the Internet, and is actually used,  
>> it's worth
>> cataloging.
>
> This could be a big task... so off the top of my head there's the  
> Unix DES
> crypt, OpenBSD's bcrypt ("A Future-Adaptable Password Scheme"),  
> FreeBSD's
> scrypt ("Stronger Key Derivation via Sequential Memory-Hard  
> Functions"), Poul-
> Henning Kamp's iterated MD5 password hashing, OpenSSH's MD5 password  
> hash, ...
> once you get down to this level it may be better to just say that  
> there's a
> large number of further ones, with maybe a few of the above as  
> examples,
> rather than trying to enumerate them all.
>
> Peter.


From mcgrew@cisco.com  Tue Oct 27 12:31:38 2009
Return-Path: <mcgrew@cisco.com>
X-Original-To: cfrg@core3.amsl.com
Delivered-To: cfrg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id B4B2228C14D for <cfrg@core3.amsl.com>; Tue, 27 Oct 2009 12:31:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.437
X-Spam-Level: 
X-Spam-Status: No, score=-6.437 tagged_above=-999 required=5 tests=[AWL=0.162,  BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u10Xvc-GPdCS for <cfrg@core3.amsl.com>; Tue, 27 Oct 2009 12:31:37 -0700 (PDT)
Received: from sj-iport-2.cisco.com (sj-iport-2.cisco.com [171.71.176.71]) by core3.amsl.com (Postfix) with ESMTP id 882EC3A6A5E for <cfrg@irtf.org>; Tue, 27 Oct 2009 12:31:37 -0700 (PDT)
Authentication-Results: sj-iport-2.cisco.com; dkim=neutral (message not signed) header.i=none
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApoEAMvn5kqrR7H+/2dsb2JhbADBVZhVhD8E
X-IronPort-AV: E=Sophos;i="4.44,634,1249257600"; d="scan'208";a="218445286"
Received: from sj-core-2.cisco.com ([171.71.177.254]) by sj-iport-2.cisco.com with ESMTP; 27 Oct 2009 19:31:52 +0000
Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-2.cisco.com (8.13.8/8.14.3) with ESMTP id n9RJVnUx006954; Tue, 27 Oct 2009 19:31:52 GMT
Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Tue, 27 Oct 2009 12:31:51 -0700
Received: from stealth-10-32-254-212.cisco.com ([10.32.254.212]) by xfe-sjc-212.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959);  Tue, 27 Oct 2009 12:31:50 -0700
Message-Id: <9854ED1B-D5BE-4879-8216-EAD889FDD54D@cisco.com>
From: David McGrew <mcgrew@cisco.com>
To: <Pasi.Eronen@nokia.com>
In-Reply-To: <808FD6E27AD4884E94820BC333B2DB774E7F5DFCE5@NOK-EUMSG-01.mgdnok.nokia.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Tue, 27 Oct 2009 12:31:49 -0700
References: <FF282486-6438-4E2E-97B5-0C4034D6BB3D@cisco.com> <808FD6E27AD4884E94820BC333B2DB774E7F5DFCE5@NOK-EUMSG-01.mgdnok.nokia.com>
X-Mailer: Apple Mail (2.936)
X-OriginalArrivalTime: 27 Oct 2009 19:31:51.0147 (UTC) FILETIME=[21E01BB0:01CA573C]
Cc: cfrg@irtf.org, hugo@ee.technion.ac.il
Subject: Re: [Cfrg] comments and questions on draft-krawczyk-hkdf and related work
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <http://www.irtf.org/mailman/listinfo/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: Tue, 27 Oct 2009 19:31:38 -0000

Hi Pasi,

thanks for the explanations, that makes sense.   I agree that it seems  
better to have a few instantiations along with the security levels  
that they target, rather than to have a mandatory instantiation.

David

On Oct 27, 2009, at 4:18 AM, <Pasi.Eronen@nokia.com> wrote:

>
> Hi David,
>
> I'll try to answer the parts of spec-writing (since I'm definitely
> not a cryptographer):
>
> <snip>
>> The draft is somewhat incomplete as a normative specification, in  
>> that
>> it does not require the implementation of any particular hash (would
>> it make sense to include the recommended instantiation from the
>> paper?).  Also, it does not use any of the RFC 2119 keywords.  I  
>> would
>> expect that, to be used in standards, it would be necessary to at
>> least provide some recommended instantiations and the security levels
>> that they target.
>
> I don't think we need a mandatory instantiation in this document (it
> would be defined in the protocol using this KDF -- the HMAC spec, RFC
> 2104, has the same approach).. so it's some sense intentionally
> incomplete, as it can't be used alone, but always as part of some
> protocol.
>
> But perhaps some discussion about the security level (perhaps a
> pointer to NIST's document about these, or copying the table from
> there) would be good.
>
> <snip>
>> I wonder if we really want to target all of these disparate cases  
>> with
>> a single KDF function.  Applications using just case #1 may reject
>> adopting HKDF on the reasonable grounds that they don't need the
>> extraction stage, and that adopting HKDF with the suggestion of
>> Section 3.3 to skip that stage would amount to replacing a perfectly
>> OK PRF with another PRF that offers no security advantage.
>
> The document doesn't propose replacing PRFs in existing protocols with
> HKDF -- that would be mostly unproductive work (and thus bad
> engineering). It's more intended for new protocols (or perhaps to
> situations where folks have already agreed that the existing PRF in
> some protocol is definitely not OK -- but I don't have any
> such situation in mind currently).
>
>> IKE and TLS both use a PRF for applications #1 and #2, but are there
>> other protocols that use a single PRF in multiple applications?   
>> There
>> is a listing of some IETF references to KDFs at
>> http://www.mindspring.com/~dmcgrew/ic/internet-crypto.html#prfs and,
>> besides IKE, these uses seem to belong to just a single case.  There
>> are also some other protocols with built-in single-purpose KDFs that
>> are not externally documented, such as SRTP's AES-CTR based KDF
>> and EAP TLS key derivation.
>>
>> If IKE and TLS are the main intended applications, I suggest adding a
>> discussion of these applications to the draft.  It would be valuable
>> to compare HKDF to the existing KDF functions used in those  
>> protocols.
>
> As noted above, this is mostly meant as a building block for writers
> of new protocol specifications, not as change to existing protocols.
> So TLS is definitely not an intended applications of this (it's  
> already
> used in IKE).
>
> Best regards,
> Pasi
>

