public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Daniel Troeder <daniel@admin-box.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Kernel upgrade and now LUKS failure
Date: Fri, 21 May 2010 22:24:05 +0200	[thread overview]
Message-ID: <4BF6EBE5.8090908@admin-box.com> (raw)
In-Reply-To: <alpine.LSU.2.01.1005181949290.23953@obet.zrqbmnf.qr>

[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]

On 05/18/2010 07:57 PM, Jan Engelhardt wrote:
> 
> On Tuesday 2010-05-18 18:56, Stefan G. Weichinger wrote:
>>
>>>> Do you know any howto where it is done "the right way"?
>>>
>>> The right and easy way is to just use the supplied pmt-ehd(8) tool,
>>> which works both interactively and non-interactively, depending on
>>> whether it's called with enough arguments or not, so there's something
>>> for everybody's flavor.
>>> It does not do LUKS yet as of pam_mount 2.2, though. Guess my
>>> todo list gets longer..
>>
>> :-)
>>
>> But given the fact that I store the key on the same hard-disk with the
>> shadowed user-pw I could also leave that openssl-part straight away,
>> correct?? seems the same level of (in)security to me ...
> 
> Yes. The point of keyfiles is to be able to change the password on
> a volume.
> 
> Without a keyfile, a crypto program would take the password, hash it
> somehow, and you get your AES key. Changing the password means having
> a different AES key, meaning decrypting the disk will yield a
> different result. In other words, changing the password would require
> at least reading the old data, reencrypting it and writing it again.
> Takes time.
> 
> With a keyfile, you retain the same AES key all the time, and encrypt
> the AES key itself - reencrypting the AES key is quick, as it's
> only some xyz bits, not terabytes.

That's not true for LUKS. This is one of the nice things about it:
Multiple keys can be used on a volume, and it is possible to change the
passwords in a safe way. (You have 8 "key slots", each can be used to
decrypt the volume. To change a PW use a new slot, then remove the old
one.) The trick here is that LUKS does by itself safely, what you are
trying to do with the SSL-key in a hackish way (no offense). The key
setup scheme is a modified TKS1 (nice Paper:
http://clemens.endorphin.org/TKS1-draft.pdf - read section 2 "Two Level
Encryption") which uses the keys in the key slots to encrypt a master
key which is used to encrypt the volume. So the only key(s) you ever
change is the key(s) encrypting the master key.

LUKS really does by itself already, what you are doing :)

So I'm pretty sure, that it is safer to use the LUKS key setup (that has
been peer-reviewed by security experts), than a self written shell script.

Bye,
Daniel


-- 
PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get
# gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  parent reply	other threads:[~2010-05-21 15:24 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-16 12:36 [gentoo-user] Re: Kernel upgrade and now LUKS failure Jan Engelhardt
2010-05-17  9:14 ` Stefan G. Weichinger
2010-05-17 21:01   ` Daniel Troeder
2010-05-18 13:05   ` Jan Engelhardt
2010-05-18 13:44     ` Stefan G. Weichinger
2010-05-18 16:04       ` Jan Engelhardt
2010-05-18 16:56         ` Stefan G. Weichinger
2010-05-18 17:57           ` Jan Engelhardt
2010-05-18 18:57             ` Stefan G. Weichinger
2010-05-18 19:33               ` Stefan G. Weichinger
2010-05-18 20:06                 ` Jan Engelhardt
2010-05-18 20:17                   ` Stefan G. Weichinger
2010-05-18 21:16                     ` Jan Engelhardt
2010-05-18 21:49                       ` Stefan G. Weichinger
2010-05-18 22:23                         ` Jan Engelhardt
2010-05-20 10:25                           ` Stefan G. Weichinger
2010-05-20 13:40                             ` Stefan G. Weichinger
2010-05-23 20:37                               ` [gentoo-user] SOLVED: " Stefan G. Weichinger
2010-05-23 21:57                                 ` Mick
2010-05-25 18:44                                   ` Stefan G. Weichinger
2010-05-18 19:38               ` [gentoo-user] " Eray Aslan
2010-05-21 20:24             ` Daniel Troeder [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-03 16:56 [gentoo-user] " Jason Dusek
2010-05-04 10:06 ` Stefan G. Weichinger
2010-05-04 16:54   ` [gentoo-user] " walt
2010-05-04 17:38     ` Stefan G. Weichinger
2010-05-04 19:28       ` Stefan G. Weichinger
2010-05-04 21:24         ` Daniel Troeder
2010-05-05  4:42           ` Stefan G. Weichinger
2010-05-05  8:00             ` Daniel Troeder
2010-05-05  8:42               ` Stefan G. Weichinger
2010-05-05 19:39                 ` Daniel Troeder
2010-05-05 20:17                   ` Stefan G. Weichinger
2010-05-05 20:23                     ` Stefan G. Weichinger
2010-05-06 16:24                       ` Daniel Troeder
2010-05-06 18:38                         ` Stefan G. Weichinger
2010-05-07  8:53                           ` Stefan G. Weichinger
2010-05-07 14:24                             ` Stefan G. Weichinger
2010-05-07 21:14                               ` Stefan G. Weichinger
2010-05-10 16:48                                 ` Daniel Troeder
2010-05-04 23:51       ` walt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BF6EBE5.8090908@admin-box.com \
    --to=daniel@admin-box.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox