Gentoo Archives: gentoo-user

From: Daniel Troeder <daniel@×××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Kernel upgrade and now LUKS failure
Date: Fri, 21 May 2010 15:24:29
Message-Id: 4BF6EBE5.8090908@admin-box.com
In Reply to: [gentoo-user] Re: Kernel upgrade and now LUKS failure by Jan Engelhardt
1 On 05/18/2010 07:57 PM, Jan Engelhardt wrote:
2 >
3 > On Tuesday 2010-05-18 18:56, Stefan G. Weichinger wrote:
4 >>
5 >>>> Do you know any howto where it is done "the right way"?
6 >>>
7 >>> The right and easy way is to just use the supplied pmt-ehd(8) tool,
8 >>> which works both interactively and non-interactively, depending on
9 >>> whether it's called with enough arguments or not, so there's something
10 >>> for everybody's flavor.
11 >>> It does not do LUKS yet as of pam_mount 2.2, though. Guess my
12 >>> todo list gets longer..
13 >>
14 >> :-)
15 >>
16 >> But given the fact that I store the key on the same hard-disk with the
17 >> shadowed user-pw I could also leave that openssl-part straight away,
18 >> correct?? seems the same level of (in)security to me ...
19 >
20 > Yes. The point of keyfiles is to be able to change the password on
21 > a volume.
22 >
23 > Without a keyfile, a crypto program would take the password, hash it
24 > somehow, and you get your AES key. Changing the password means having
25 > a different AES key, meaning decrypting the disk will yield a
26 > different result. In other words, changing the password would require
27 > at least reading the old data, reencrypting it and writing it again.
28 > Takes time.
29 >
30 > With a keyfile, you retain the same AES key all the time, and encrypt
31 > the AES key itself - reencrypting the AES key is quick, as it's
32 > only some xyz bits, not terabytes.
33
34 That's not true for LUKS. This is one of the nice things about it:
35 Multiple keys can be used on a volume, and it is possible to change the
36 passwords in a safe way. (You have 8 "key slots", each can be used to
37 decrypt the volume. To change a PW use a new slot, then remove the old
38 one.) The trick here is that LUKS does by itself safely, what you are
39 trying to do with the SSL-key in a hackish way (no offense). The key
40 setup scheme is a modified TKS1 (nice Paper:
41 http://clemens.endorphin.org/TKS1-draft.pdf - read section 2 "Two Level
42 Encryption") which uses the keys in the key slots to encrypt a master
43 key which is used to encrypt the volume. So the only key(s) you ever
44 change is the key(s) encrypting the master key.
45
46 LUKS really does by itself already, what you are doing :)
47
48 So I'm pretty sure, that it is safer to use the LUKS key setup (that has
49 been peer-reviewed by security experts), than a self written shell script.
50
51 Bye,
52 Daniel
53
54
55 --
56 PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get
57 # gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887

Attachments

File name MIME type
signature.asc application/pgp-signature