From cfrg-bounces@ietf.org Wed Jul 11 20:40:17 2007
Return-path: <cfrg-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1I8mih-0007Bv-99; Wed, 11 Jul 2007 20:39:47 -0400
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43) id 1I8mif-0007Bp-Rp
	for cfrg@ietf.org; Wed, 11 Jul 2007 20:39:45 -0400
Received: from ithilien.qualcomm.com ([129.46.51.59])
	by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1I8miQ-0005oo-HE
	for cfrg@ietf.org; Wed, 11 Jul 2007 20:39:45 -0400
Received: from sabrina.qualcomm.com (sabrina.qualcomm.com [129.46.61.150])
	by ithilien.qualcomm.com (8.13.6/8.12.5/1.0) with ESMTP id
	l6C0cHlF023713
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL)
	for <cfrg@ietf.org>; Wed, 11 Jul 2007 17:38:17 -0700
Received: from sanexcas01.na.qualcomm.com (sanexcas01.qualcomm.com
	[172.30.36.175])
	by sabrina.qualcomm.com (8.13.6/8.13.6/1.0) with ESMTP id
	l6C0cGCb012017 for <cfrg@ietf.org>; Wed, 11 Jul 2007 17:38:16 -0700
Received: from NAEX13.na.qualcomm.com ([129.46.51.248]) by
	sanexcas01.na.qualcomm.com with Microsoft SMTPSVC(6.0.3790.1830); 
	Wed, 11 Jul 2007 17:38:16 -0700
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: Wed, 11 Jul 2007 17:38:12 -0700
Message-ID: <C24CB51D5AA800449982D9BCB90325137986B8@NAEX13.na.qualcomm.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Question on key size reduction for Cipher-based PRFs and MACs
Thread-Index: AcfEHO2WodqhPJBISPeau3aiP61RdA==
From: "Narayanan, Vidya" <vidyan@qualcomm.com>
To: <cfrg@ietf.org>
X-OriginalArrivalTime: 12 Jul 2007 00:38:16.0423 (UTC)
	FILETIME=[EFC65770:01C7C41C]
X-Spam-Score: 0.0 (/)
X-Scan-Signature: d6b246023072368de71562c0ab503126
Subject: [Cfrg] Question on key size reduction for Cipher-based PRFs and MACs
X-BeenThere: cfrg@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:cfrg@ietf.org>
List-Help: <mailto:cfrg-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=subscribe>
Errors-To: cfrg-bounces@ietf.org

Hi,
RFC4615 defines a mechanism to construct a key for AES-CMAC-PRF-128 from
a smaller or bigger key using the following mechanism:=20

K :=3D AES-CMAC(0^128, VK, VKlen)=20

Can that approach be generalized for all cipher-based PRFs in the
following manner:

K :=3D Cipher-based-PRF(0^block-size, VK, VKlen)?=20

If not, what are the issues with doing so and how else could we handle
key size reductions for cipher-based PRFs?=20

Also, does this approach equally apply to Cipher-based MACs as well
(i.e., K :=3D Cipher-based-MAC(0^block-size, VK, VKlen))?=20

Thanks,
Vidya

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



From cfrg-bounces@ietf.org Thu Jul 12 16:18:26 2007
Return-path: <cfrg-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1I957H-0000mN-DI; Thu, 12 Jul 2007 16:18:23 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43) id 1I957F-0000gP-Fo
	for cfrg@ietf.org; Thu, 12 Jul 2007 16:18:21 -0400
Received: from ithilien.qualcomm.com ([129.46.51.59])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1I957B-00049b-00
	for cfrg@ietf.org; Thu, 12 Jul 2007 16:18:21 -0400
Received: from neophyte.qualcomm.com (neophyte.qualcomm.com [129.46.61.149])
	by ithilien.qualcomm.com (8.13.6/8.12.5/1.0) with ESMTP id
	l6CKHxuZ026210
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
	Thu, 12 Jul 2007 13:18:00 -0700
Received: from SANEXCAS03.na.qualcomm.com (sanexcas03.qualcomm.com
	[172.30.32.65])
	by neophyte.qualcomm.com (8.13.6/8.13.6/1.0) with ESMTP id
	l6CKHxHT029523; Thu, 12 Jul 2007 13:17:59 -0700
Received: from NAEX13.na.qualcomm.com ([129.46.51.248]) by
	SANEXCAS03.na.qualcomm.com with Microsoft SMTPSVC(6.0.3790.1830); 
	Thu, 12 Jul 2007 13:17:58 -0700
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
Subject: RE: [Cfrg] Question on key size reduction for Cipher-based PRFs and
	MACs
Date: Thu, 12 Jul 2007 13:17:55 -0700
Message-ID: <C24CB51D5AA800449982D9BCB9032513798762@NAEX13.na.qualcomm.com>
In-Reply-To: <200707120044.l6C0inUh022916@taverner.cs.berkeley.edu>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Cfrg] Question on key size reduction for Cipher-based PRFs and
	MACs
Thread-Index: AcfEJ28QBHNaP54NQWeZt97Y8TuUzwAl5Ysw
References: <200707120044.l6C0inUh022916@taverner.cs.berkeley.edu>
From: "Narayanan, Vidya" <vidyan@qualcomm.com>
To: "David Wagner" <daw@cs.berkeley.edu>
X-OriginalArrivalTime: 12 Jul 2007 20:17:58.0721 (UTC)
	FILETIME=[BD4FE310:01C7C4C1]
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 082a9cbf4d599f360ac7f815372a6a15
Cc: cfrg@ietf.org
X-BeenThere: cfrg@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:cfrg@ietf.org>
List-Help: <mailto:cfrg-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=subscribe>
Errors-To: cfrg-bounces@ietf.org

Sorry, I didn't clarify correctly in my previous email.  Please see
additional clarification below.=20

> -----Original Message-----
> From: David Wagner [mailto:daw@cs.berkeley.edu]=20
> Sent: Wednesday, July 11, 2007 5:45 PM
> To: Narayanan, Vidya
> Subject: [Cfrg] Question on key size reduction for=20
> Cipher-based PRFs and MACs
>=20
>=20
> In article=20
> <C24CB51D5AA800449982D9BCB90325137986B8@NAEX13.na.qualcomm.com
> you write:
> >Can that approach be generalized for all cipher-based PRFs in the=20
> >following manner:
> >
> >K :=3D Cipher-based-PRF(0^block-size, VK, VKlen)?=20
>=20
> I don't understand your notation.  If VK is the key to the=20
> PRF and 0^block-size (and possibly VKlen) is the input to the=20
> PRF, then yes, that works.  You can use any secure PRF,=20
> cipher-based or not.
>=20

In accordance with RFC4615, if the original key (VK) is longer or
shorter than 128 bits, then the key, K, is derived by "applying the
AES-CMAC algorithm using the 128-bit all-zero string as the key and VK
as the input message".  I was using the same notation as that in the RFC
for generalizing it.  Basically, I was wondering if there is a problem
with using all-zero string equal to the block size of the cipher as the
key and the original key (VK) as input to the PRF to derive a shorter
key, K. =20

> I don't quite understand what VKlen is doing there or why you have
> 3 arguments to the PRF or what that ordering of arguments=20
> implies, so if I have misunderstood your notation, you'll=20
> need to post again.
>=20

I'm actually not sure why the key length is part of the input to the PRF
even in RFC4615.  Is it necessary?  The RFC doesn't provide any
explanation for it.=20

> >Also, does this approach equally apply to Cipher-based MACs as well=20
> >(i.e., K :=3D Cipher-based-MAC(0^block-size, VK, VKlen))?
>=20
> Under the same assumptions as above, no.  However, most MACs=20
> are also believed to be PRFs as well, so the distinction may=20
> be mostly of theoretical interest.
>=20

In the revised notation with the all-zero key and VK as input, can we
derive a shorter key using the notation above?=20

Thanks much for your input.=20

Regards,
Vidya

> -- David
>=20

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



From cfrg-bounces@ietf.org Thu Jul 12 16:38:44 2007
Return-path: <cfrg-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1I95Qw-0003YP-NC; Thu, 12 Jul 2007 16:38:42 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43) id 1I95Qv-0003Wa-6F
	for cfrg@ietf.org; Thu, 12 Jul 2007 16:38:41 -0400
Received: from balder-227.proper.com ([192.245.12.227])
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1I95Qq-0005LE-Pg
	for cfrg@ietf.org; Thu, 12 Jul 2007 16:38:41 -0400
Received: from [10.20.30.108] (dsl-63-249-108-169.cruzio.com [63.249.108.169])
	(authenticated bits=0)
	by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l6CKcYkA071884
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 12 Jul 2007 13:38:35 -0700 (MST)
	(envelope-from paul.hoffman@vpnc.org)
Mime-Version: 1.0
Message-Id: <p06240800c2bc418330e7@[10.20.30.249]>
In-Reply-To: <C24CB51D5AA800449982D9BCB9032513798762@NAEX13.na.qualcomm.com>
References: <200707120044.l6C0inUh022916@taverner.cs.berkeley.edu>
	<C24CB51D5AA800449982D9BCB9032513798762@NAEX13.na.qualcomm.com>
Date: Thu, 12 Jul 2007 13:38:32 -0700
To: "Narayanan, Vidya" <vidyan@qualcomm.com>
From: Paul Hoffman <paul.hoffman@vpnc.org>
Subject: RE: [Cfrg] Question on key size reduction for Cipher-based PRFs
	and 	MACs
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
X-Spam-Score: 0.6 (/)
X-Scan-Signature: 8ac499381112328dd60aea5b1ff596ea
Cc: cfrg@ietf.org
X-BeenThere: cfrg@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:cfrg@ietf.org>
List-Help: <mailto:cfrg-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=subscribe>
Errors-To: cfrg-bounces@ietf.org

The explanation of variable key lengths in RFC 4434 may be clearer. 
Or, it may not be; I adopted it because of oversights we made in 
IKEv2, not for a good cryptographic reason.

--Paul Hoffman, Director
--VPN Consortium

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



From cfrg-bounces@ietf.org Thu Jul 12 16:53:54 2007
Return-path: <cfrg-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1I95fQ-0003UV-BO; Thu, 12 Jul 2007 16:53:40 -0400
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43) id 1I95fO-0003RK-1t
	for cfrg@ietf.org; Thu, 12 Jul 2007 16:53:38 -0400
Received: from taverner.cs.berkeley.edu ([128.32.168.222])
	by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1I95f8-00014P-M4
	for cfrg@ietf.org; Thu, 12 Jul 2007 16:53:37 -0400
Received: from taverner.cs.berkeley.edu (localhost.localdomain [127.0.0.1])
	by taverner.cs.berkeley.edu (8.13.8/8.13.7) with ESMTP id
	l6CKiKhj032164
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 12 Jul 2007 13:44:20 -0700
Received: (from daw@localhost)
	by taverner.cs.berkeley.edu (8.13.8/8.13.8/Submit) id l6CKiA4P032144;
	Thu, 12 Jul 2007 13:44:10 -0700
From: David Wagner <daw@cs.berkeley.edu>
Message-Id: <200707122044.l6CKiA4P032144@taverner.cs.berkeley.edu>
Subject: Re: [Cfrg] Question on key size reduction for Cipher-based PRFs and
	MACs
To: vidyan@qualcomm.com (Narayanan, Vidya)
Date: Thu, 12 Jul 2007 13:44:10 -0700 (PDT)
In-Reply-To: <C24CB51D5AA800449982D9BCB9032513798762@NAEX13.na.qualcomm.com>
	from "Narayanan, Vidya" at Jul 12, 2007 01:17:55 PM
Secret-Bounce-Tag: 9a029cbee41caf2ca77a77efa3c13981
X-Mailer: ELM [version 2.5 PL6]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 52e1467c2184c31006318542db5614d5
Cc: cfrg@ietf.org, David Wagner <daw@cs.berkeley.edu>
X-BeenThere: cfrg@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:cfrg@ietf.org>
List-Help: <mailto:cfrg-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=subscribe>
Errors-To: cfrg-bounces@ietf.org

> In accordance with RFC4615, if the original key (VK) is longer or
> shorter than 128 bits, then the key, K, is derived by "applying the
> AES-CMAC algorithm using the 128-bit all-zero string as the key and VK
> as the input message".

Oh.  Well, I don't know of any theoretical basis for thinking
that this will work.  One standard way for expanding a key or deriving
session keys from a master key MK is that you use a PRF with MK as the
key and some constant string (e.g., all zeros) as the input, and then
you take as many bits from the output of the PRF as you need.  This way
you can derive many subkeys from the master key MK as you want just by
changing that constant string.  Note that this is the reverse of
what you quote from RFC4615.

If you really want to derive only one key from MK, then another
strategy is to hash MK using a secure hash function (e.g., SHA256).
If the key is too short, that's what I'd recommend.

Perhaps RFC4615 is trying to do something clever for the case where
(a) the key VK is too short, and (b) they already have a block cipher
implemented in hardware and they don't want to take up the extra die
space to implement a hash function, too.  In that case, well, all I can
say is that what they are recommending seems likely to work but it is
not guaranteed or justified by any theory or by any standard assumptions
on AES, so it is mildly dubious.  In practice it is highly unlikely that
this crypto scheme will be the weakest link in your system overall, so I
may be arguing about the number of angels that can fit on the head of a
pin -- but at the same time this is not the best possible practice and
so I would probably not use this scheme except where necessary (e.g.,
applications where I really cannot use a hash function and I cannot
get a longer key).  For instance, I don't think this trick is likely
to be justified in most software applications, because it's easy enough
to just use some standard library implementation of SHA256 and there's
usually little cost in doing so.

-- David

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



From cfrg-bounces@ietf.org Thu Jul 12 17:35:48 2007
Return-path: <cfrg-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1I96KA-0000at-LX; Thu, 12 Jul 2007 17:35:46 -0400
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43) id 1I96K9-0000X1-Ry
	for cfrg@ietf.org; Thu, 12 Jul 2007 17:35:45 -0400
Received: from numenor.qualcomm.com ([129.46.51.58])
	by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1I96K9-00027m-Eh
	for cfrg@ietf.org; Thu, 12 Jul 2007 17:35:45 -0400
Received: from sabrina.qualcomm.com (sabrina.qualcomm.com [129.46.61.150])
	by numenor.qualcomm.com (8.13.6/8.12.5/1.0) with ESMTP id
	l6CLYdLo018096
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
	Thu, 12 Jul 2007 14:34:39 -0700
Received: from SANEXCAS02.na.qualcomm.com (sanexcas02.qualcomm.com
	[172.30.36.176])
	by sabrina.qualcomm.com (8.13.6/8.13.6/1.0) with ESMTP id
	l6CLYc9b030562; Thu, 12 Jul 2007 14:34:38 -0700
Received: from NAEX13.na.qualcomm.com ([129.46.51.248]) by
	SANEXCAS02.na.qualcomm.com with Microsoft SMTPSVC(6.0.3790.1830); 
	Thu, 12 Jul 2007 14:34:00 -0700
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
Subject: RE: [Cfrg] Question on key size reduction for Cipher-based PRFs and
	MACs
Date: Thu, 12 Jul 2007 14:34:08 -0700
Message-ID: <C24CB51D5AA800449982D9BCB903251379877E@NAEX13.na.qualcomm.com>
In-Reply-To: <200707122044.l6CKiA4P032144@taverner.cs.berkeley.edu>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Cfrg] Question on key size reduction for Cipher-based PRFs and
	MACs
Thread-Index: AcfExr4q8Rvj2TgDQzW6lAG7euVD9QAAUB5g
References: <C24CB51D5AA800449982D9BCB9032513798762@NAEX13.na.qualcomm.com>
	from "Narayanan, Vidya" at Jul 12,
	2007 01:17:55 PM <200707122044.l6CKiA4P032144@taverner.cs.berkeley.edu>
From: "Narayanan, Vidya" <vidyan@qualcomm.com>
To: "David Wagner" <daw@cs.berkeley.edu>
X-OriginalArrivalTime: 12 Jul 2007 21:34:00.0501 (UTC)
	FILETIME=[5C584650:01C7C4CC]
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 92df29fa99cf13e554b84c8374345c17
Cc: cfrg@ietf.org
X-BeenThere: cfrg@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:cfrg@ietf.org>
List-Help: <mailto:cfrg-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=subscribe>
Errors-To: cfrg-bounces@ietf.org

Thanks, David.=20

In the case under consideration, we don't have an issue of shorter than
needed keys.  We have a 64 octet (or longer) key that may be used with a
variety of integrity algorithms for generating a MAC.  For hash-based
integrity algorithms, we recommend that the key be first hashed to
reduce the size of the key before generating the MAC. =20

For cipher-based integrity algorithms, in order to allow cases where the
device does not have a hash-based algorithm, we were considering an
approach using the cipher-based algorithm itself.  But, I agree with you
that requiring the availability of SHA-256 is not really restrictive.
So, we will stick to recommending reducing the key size by hashing the
key in all cases.=20

Thanks again. =20

Regards,
Vidya

> -----Original Message-----
> From: David Wagner [mailto:daw@cs.berkeley.edu]=20
> Sent: Thursday, July 12, 2007 1:44 PM
> To: Narayanan, Vidya
> Cc: David Wagner; cfrg@ietf.org
> Subject: Re: [Cfrg] Question on key size reduction for=20
> Cipher-based PRFs and MACs
>=20
> > In accordance with RFC4615, if the original key (VK) is longer or=20
> > shorter than 128 bits, then the key, K, is derived by "applying the=20
> > AES-CMAC algorithm using the 128-bit all-zero string as the=20
> key and VK=20
> > as the input message".
>=20
> Oh.  Well, I don't know of any theoretical basis for thinking=20
> that this will work.  One standard way for expanding a key or=20
> deriving session keys from a master key MK is that you use a=20
> PRF with MK as the key and some constant string (e.g., all=20
> zeros) as the input, and then you take as many bits from the=20
> output of the PRF as you need.  This way you can derive many=20
> subkeys from the master key MK as you want just by changing=20
> that constant string.  Note that this is the reverse of what=20
> you quote from RFC4615.
>=20
> If you really want to derive only one key from MK, then=20
> another strategy is to hash MK using a secure hash function=20
> (e.g., SHA256).
> If the key is too short, that's what I'd recommend.
>=20
> Perhaps RFC4615 is trying to do something clever for the case where
> (a) the key VK is too short, and (b) they already have a=20
> block cipher implemented in hardware and they don't want to=20
> take up the extra die space to implement a hash function,=20
> too.  In that case, well, all I can say is that what they are=20
> recommending seems likely to work but it is not guaranteed or=20
> justified by any theory or by any standard assumptions on=20
> AES, so it is mildly dubious.  In practice it is highly=20
> unlikely that this crypto scheme will be the weakest link in=20
> your system overall, so I may be arguing about the number of=20
> angels that can fit on the head of a pin -- but at the same=20
> time this is not the best possible practice and so I would=20
> probably not use this scheme except where necessary (e.g.,=20
> applications where I really cannot use a hash function and I=20
> cannot get a longer key).  For instance, I don't think this=20
> trick is likely to be justified in most software=20
> applications, because it's easy enough to just use some=20
> standard library implementation of SHA256 and there's usually=20
> little cost in doing so.
>=20
> -- David
>=20

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



From cfrg-bounces@ietf.org Thu Jul 12 17:40:22 2007
Return-path: <cfrg-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1I96Ob-0001pM-Gz; Thu, 12 Jul 2007 17:40:21 -0400
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43) id 1I96OZ-0001j3-V8
	for cfrg@ietf.org; Thu, 12 Jul 2007 17:40:19 -0400
Received: from numenor.qualcomm.com ([129.46.51.58])
	by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1I96OZ-0002FG-KP
	for cfrg@ietf.org; Thu, 12 Jul 2007 17:40:19 -0400
Received: from hamtaro.qualcomm.com (hamtaro.qualcomm.com [129.46.61.157])
	by numenor.qualcomm.com (8.13.6/8.12.5/1.0) with ESMTP id
	l6CLeAro018594
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
	Thu, 12 Jul 2007 14:40:10 -0700
Received: from SANEXCAS02.na.qualcomm.com (sanexcas02.qualcomm.com
	[172.30.36.176])
	by hamtaro.qualcomm.com (8.13.6/8.13.6/1.0) with ESMTP id
	l6CLe7VP002062; Thu, 12 Jul 2007 14:40:08 -0700 (PDT)
Received: from NAEX13.na.qualcomm.com ([129.46.51.248]) by
	SANEXCAS02.na.qualcomm.com with Microsoft SMTPSVC(6.0.3790.1830); 
	Thu, 12 Jul 2007 14:39:53 -0700
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
Subject: RE: [Cfrg] Question on key size reduction for Cipher-based PRFs and
	MACs
Date: Thu, 12 Jul 2007 14:40:02 -0700
Message-ID: <C24CB51D5AA800449982D9BCB9032513798783@NAEX13.na.qualcomm.com>
In-Reply-To: <p06240800c2bc418330e7@[10.20.30.249]>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Cfrg] Question on key size reduction for Cipher-based PRFs and
	MACs
Thread-Index: AcfExK3wC1eDrB6iQT6Bh4XUKnADugAB/NEg
References: <200707120044.l6C0inUh022916@taverner.cs.berkeley.edu>
	<C24CB51D5AA800449982D9BCB9032513798762@NAEX13.na.qualcomm.com>
	<p06240800c2bc418330e7@[10.20.30.249]>
From: "Narayanan, Vidya" <vidyan@qualcomm.com>
To: "Paul Hoffman" <paul.hoffman@vpnc.org>
X-OriginalArrivalTime: 12 Jul 2007 21:39:53.0997 (UTC)
	FILETIME=[2F0B7BD0:01C7C4CD]
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 7d33c50f3756db14428398e2bdedd581
Cc: cfrg@ietf.org
X-BeenThere: cfrg@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:cfrg@ietf.org>
List-Help: <mailto:cfrg-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=subscribe>
Errors-To: cfrg-bounces@ietf.org

I'm not sure how RFC4434 differs from RFC4615 in the case of longer
keys.  It also seems to talking about using a PRF with an all-zero key
and the longer current key as the input to the PRF.  What did I miss?=20

Vidya=20

> -----Original Message-----
> From: Paul Hoffman [mailto:paul.hoffman@vpnc.org]=20
> Sent: Thursday, July 12, 2007 1:39 PM
> To: Narayanan, Vidya
> Cc: cfrg@ietf.org
> Subject: RE: [Cfrg] Question on key size reduction for=20
> Cipher-based PRFs and MACs
>=20
> The explanation of variable key lengths in RFC 4434 may be clearer.=20
> Or, it may not be; I adopted it because of oversights we made=20
> in IKEv2, not for a good cryptographic reason.
>=20
> --Paul Hoffman, Director
> --VPN Consortium
>=20

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



From cfrg-bounces@ietf.org Thu Jul 12 18:04:50 2007
Return-path: <cfrg-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1I96mD-00079k-5P; Thu, 12 Jul 2007 18:04:45 -0400
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43) id 1I96mB-00079e-GY
	for cfrg@ietf.org; Thu, 12 Jul 2007 18:04:43 -0400
Received: from balder-227.proper.com ([192.245.12.227])
	by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1I96lw-0002k8-5A
	for cfrg@ietf.org; Thu, 12 Jul 2007 18:04:43 -0400
Received: from [10.20.30.108] (dsl-63-249-108-169.cruzio.com [63.249.108.169])
	(authenticated bits=0)
	by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l6CM41nJ079778
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 12 Jul 2007 15:04:03 -0700 (MST)
	(envelope-from paul.hoffman@vpnc.org)
Mime-Version: 1.0
Message-Id: <p06240804c2bc54f3bf1d@[10.20.30.108]>
In-Reply-To: <C24CB51D5AA800449982D9BCB9032513798783@NAEX13.na.qualcomm.com>
References: <200707120044.l6C0inUh022916@taverner.cs.berkeley.edu>
	<C24CB51D5AA800449982D9BCB9032513798762@NAEX13.na.qualcomm.com>
	<p06240800c2bc418330e7@[10.20.30.249]>
	<C24CB51D5AA800449982D9BCB9032513798783@NAEX13.na.qualcomm.com>
Date: Thu, 12 Jul 2007 15:04:00 -0700
To: "Narayanan, Vidya" <vidyan@qualcomm.com>
From: Paul Hoffman <paul.hoffman@vpnc.org>
Subject: RE: [Cfrg] Question on key size reduction for Cipher-based PRFs
	and 	MACs
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 856eb5f76e7a34990d1d457d8e8e5b7f
Cc: cfrg@ietf.org
X-BeenThere: cfrg@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:cfrg@ietf.org>
List-Help: <mailto:cfrg-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=subscribe>
Errors-To: cfrg-bounces@ietf.org

At 2:40 PM -0700 7/12/07, Narayanan, Vidya wrote:
>I'm not sure how RFC4434 differs from RFC4615 in the case of longer
>keys.

RFC 4434 does not explicitly mix the key length into the calculation.

>It also seems to talking about using a PRF with an all-zero key
>and the longer current key as the input to the PRF.  What did I miss?

Nothing, it seems.

Basically, if you have a too-long key and you want to shorten it and 
you don't want to use a hash function and you want to use AES, this 
is a simple way of doing that. As David says, there is no proof (or 
even suggestion of a proof) based on properties of AES behind it.

--Paul Hoffman, Director
--VPN Consortium

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



From cfrg-bounces@ietf.org Mon Jul 23 10:44:15 2007
Return-path: <cfrg-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1ICz8t-0000L3-BR; Mon, 23 Jul 2007 10:44:11 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43) id 1ICz8r-0000J3-Rg
	for cfrg@ietf.org; Mon, 23 Jul 2007 10:44:09 -0400
Received: from rimp1.nist.gov ([129.6.16.226] helo=smtp.nist.gov)
	by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1ICz8p-0008Hk-U7
	for cfrg@ietf.org; Mon, 23 Jul 2007 10:44:09 -0400
Received: from [129.6.222.154] ([129.6.222.154])
	by smtp.nist.gov (8.13.1/8.13.1) with ESMTP id l6NEhqtZ001626;
	Mon, 23 Jul 2007 10:43:54 -0400
Mime-Version: 1.0 (Apple Message framework v752.2)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <038B6EC4-B2C8-4D44-818A-8676564CB389@nist.gov>
Content-Transfer-Encoding: 7bit
From: Tim Polk <tim.polk@nist.gov>
Date: Mon, 23 Jul 2007 09:43:52 -0500
To: saag@mit.edu
X-Mailer: Apple Mail (2.752.2)
X-NIST-MailScanner: Found to be clean
X-NIST-MailScanner-From: tim.polk@nist.gov
X-Spam-Score: 0.0 (/)
X-Scan-Signature: c3a18ef96977fc9bcc21a621cbf1174b
Cc: cfrg@ietf.org
Subject: [Cfrg] background for SAAG presentation for on variant of GCM
X-BeenThere: cfrg@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:cfrg@ietf.org>
List-Help: <mailto:cfrg-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cfrg>,
	<mailto:cfrg-request@ietf.org?subject=subscribe>
Errors-To: cfrg-bounces@ietf.org

Folks,

Here is some background on the GCM variant under consideration by  
NIST which will be discussed at SAAG this week.  (I have CC'ed the  
cfrg in case their participants find this interesting as well...)

NIST Special Publication 800-38D specifies the Galois/Counter Mode  
(GCM) of the AES algorithm, restricted to large tag sizes. GCM  
combines the counter mode for confidentiality with authentication  
that is based on a universal hash function. GCM is intended for high- 
throughput applications that can take advantage of its  
parallelizability while tolerating its tag size restrictions.  GCM  
was proposed to NIST for considerations by David McGrew and John Viega.

Anton Joux submitted public comments on the first draft of the  
document.  The complete comment submission is available at
   http://csrc.nist.gov/CryptoToolkit/modes/comments/800-38_Series- 
Drafts/GCM/Joux_comments.pdf
To quote the conclusions section:


> In this paper, we have shown an important attack of the NIST version
> GCM mode. This stems from the fact that GCM excessively relies on
> the hypothesis that IVs are never repeating. Moreover, the  
> modification
> introduced by NIST turns this fact into a effective attack when  
> variable
> length IVs are used.
>
>

Joux made some concrete suggestions for changing GCM at the end of   
Section 5:

1.  replace the counter encryption for MACs by the classical   
encryption with the block cipher usually used with Wegman-Carter MACs.
2.  use a strong key derivation at the beginning of the algorithm  
and  computing a different key for each different purpose (one for   
encryption, one for intiializing J, one for the keyed hash and one   
for the MAC encryption).

The current draft of SP 800-38D did not accept Joux's modifications  
to the algorithm, but responded to the Joux comments in several  
concrete ways:
(a) the provision for variable-length IVs is omitted from the new  
draft, and
(b) the draft elaborates on the requirement that initialization  
vectors (IVs) must be unique across all implementations with a given  
key:
        (i) The critical importance of this requirement is indicated.
        (ii) For validation of a module to the requirements of FIPS  
140-2, an IV "generation unit" is required to be within the  
cryptographic boundary of the module.
        (iii) Two IV constructions are outlined: one that relies on  
deterministic elements to meet the uniqueness requirement, and one  
that relies on an output string from a random bit generator.
        (iv) Some design and implementation considerations with  
respect to IVs are discussed.

The current draft of SP 800-38D is available at
     http://csrc.nist.gov/CryptoToolkit/modes/ 
800-38_Series_Publications/ 
NIST_SP_800-38D_June_2007_for_public_comment.pdf

One important note:  I expect to see one additional change in this  
publication when it is officially published.  NIST will be adding a  
section 8.3 that permits use of a KDF to generate both the key and  
the IV to support RFC 4106 and some other AES-based protocols.  These  
protocols ensure that IVs are (statistically) unique across all  
implementations with a given key by generating a new key-IV pair for  
every protocol run.  (It was my assertion that these protocols  
already met the requirements in Section 8 of SP 800-38D, but it was  
decided that an explicit statement was preferable.)

While NIST determined that the GCM mode should be added to the "NIST  
Crypto Standards Toolkit", there have been extensive discussions with  
respect to the utility of the Joux submission.  There is a  
possibility that NIST might recognize the Joux variant as well.  I  
suggested that the needs of protocol developers be considered as a  
primary driver for this decision.  As a result, Morrie Dworkin (the  
author of 800-38D) will be presenting at SAAG to get a feel for the  
level of interest in such a mode.

Thanks,

Tim Polk

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



