Return-Path: Received: from mxout-07.mxes.net (mxout-07.mxes.net [216.86.168.182]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Fri, 18 Sep 2009 19:42:50 +0200 (CEST) Received: from rotta.lnet.fi (unknown [86.50.38.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 7C18522E255 for ; Fri, 18 Sep 2009 13:42:49 -0400 (EDT) From: Tero Pesonen Date: Fri, 18 Sep 2009 20:39:44 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200909182039.44953.dmcrypt-list@tpesonen.net> Subject: [dm-crypt] Question on LUKS master key digest and its effect on security List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Hi! I've been using LUKS with dm-crypt for a while now and have recently=20 been trying to learn more about how it works. There's still one aspect=20 in LUKS I have not found a simple answer to. That is, is the security=20 of my data dependent on the public (visible in the headers) master key=20 digest? I've understood that it is derived by PBKDF2 where in LUKS's=20 case SHA-1 is the hash used. LuksDump accordingly shows the 160-bit=20 digest which, if I again understand correctly, is used to check if the=20 supplied key and the master key match.=20 Now, the impression I've gathered is that in this case if I were able to=20 derive from this digest the original input, I could recover the master=20 key and hence decrypt the encrypted data. In other words, the master=20 key is secured by the strength of the PBKDF2 procedure, which in this=20 case relies on SHA-1. I've been told that SHA-1 is now considered=20 broken for all uses except generating pseudo random data, i.e. hashing=20 password strings to key bits in cases where the digest is not made=20 availabe, i.e. the GnuPG S2K scheme and many similar. I've also gathered=20 that even if SHA-1 were not broken, it would provide at max. 80 bits of=20 security (due to the birthday paradox) against recovering the input=20 from the digest output. Now if it is true that the LUKS master key=20 digest is truly the SHA-1 derived digest of the master key, then to me=20 it seems the LUKS-dm-crypt security relies on this weak point, not on=20 the AES-128, for example. I guess I must be wrong here? I tried, nevertheless, to create a new LUKS partition with a different=20 hash spec, but despite what I provided for the --hash=3DHASH (e.g.=20 SHA256) it always created a partition with hash spec SHA1 (and hence a=20 20 HEX chars long digest.) So my question is, why is having the digest generated by SHA-1 not a=20 security concern, i.e. this will not make recovering the key easier=20 than brute forcing a high-entropy, user-specified password string or =C2=A0 AES-128 directly (in case that was used)? If there are actual security=20 implications, is it possible to change the hash spec by the user? Thank you for any comments on this, and kind regards, Tero Pesonen