Rense Buijen | 8 Jul 13:01

LUKS Question

Hi,

I have encrypted my drive with dm-crypt and Luks.
Now what I would like to have is that the volume can only be unlocked with
both a password AND a key.
So far I have only been able to use a passphrase or just a key, I wonder if
it is possible to use both.

Kind regards,

Rens
Jonas Meurer | 8 Jul 13:28

Re: LUKS Question

Hey Rense,

On 08/07/2008 Rense Buijen wrote:
> I have encrypted my drive with dm-crypt and Luks.
> Now what I would like to have is that the volume can only be unlocked with
> both a password AND a key.
> So far I have only been able to use a passphrase or just a key, I wonder if
> it is possible to use both.

The simple answer is: encrypt your key with some other encryption
software, like openssl or gnupg.

cryptsetup has no built-in feature to combine password and keyfile.
You'll have to implement it on your own by using a keyfile for the LUKS
encryption, and encrypting that keyfile for additional security with
something else, for example openssl or gnupg.

Which distribution do you use? In debian we do have a wrapper around
cryptsetup (cryptdisks) which supports keyscripts to be executed to
make the keyfile for your LUKS/dm-crypt device available.

greetings,
 jonas

Rense Buijen | 8 Jul 13:36

Re: LUKS Question

Hi Jonas,

Ah, I think I get it, I will make a keyfile with (dd if=/dev/random
of=/tmp/keyfile bs=1M count=4) and then encrypt it
http://ncrypt.sourceforge.net/ for instance?
Then I decrypt the keyfile first using my passphrase and afterwards I will
open the dm-crypt device with the decrypted key, right? ... I am using
Ubuntu 8.04 so I guess I can use the wrapper for it?

Thanks a lot for the help!

Kind regards,

Rense

On Tue, Jul 8, 2008 at 1:28 PM, Jonas Meurer <jonas@...> wrote:

> Hey Rense,
>
> On 08/07/2008 Rense Buijen wrote:
> > I have encrypted my drive with dm-crypt and Luks.
> > Now what I would like to have is that the volume can only be unlocked
> with
> > both a password AND a key.
> > So far I have only been able to use a passphrase or just a key, I wonder
> if
> > it is possible to use both.
>
> The simple answer is: encrypt your key with some other encryption
> software, like openssl or gnupg.
(Continue reading)

Ma Begaj | 8 Jul 13:54

Re: LUKS Question

2008/7/8 Rense Buijen <rense.buijen@...>:
> Hi Jonas,
>
> Ah, I think I get it, I will make a keyfile with (dd if=/dev/random
> of=/tmp/keyfile bs=1M count=4) and then encrypt it
> http://ncrypt.sourceforge.net/ for instance?
> Then I decrypt the keyfile first using my passphrase and afterwards I will
> open the dm-crypt device with the decrypted key, right? ... I am using
> Ubuntu 8.04 so I guess I can use the wrapper for it?

you don't need ncrypt. gpg and/or openssl are absolutely great for this.

you can put the encrypted file on the usb-stick and use udev to ask you for
password when you insert it.

Rense Buijen | 8 Jul 14:23

RE: LUKS Question

Great, thanks,

I could just as well leave it on the filesystem right? Since it is encrypted
.. when decrypting I will move it to a ramdrive because I think journaling
filesystems will still give up data, even if wiped fairly secure...

Greets,

Rense

Ps. One a sidenote, what is the strongest symmetric blockcipher? I am using
twofish now because I don't want to use AES and it is supposed to be pretty
fast and fairly secure but if speed would not matter is there anything
stronger then the known stuff like SERPENT? 

-----Original Message-----
From: Ma Begaj [mailto:derliebegott@...] 
Sent: Tuesday, July 08, 2008 1:55 PM
To: dm-crypt@...
Cc: Rense Buijen
Subject: Re: [dm-crypt] LUKS Question

2008/7/8 Rense Buijen <rense.buijen@...>:
> Hi Jonas,
>
> Ah, I think I get it, I will make a keyfile with (dd if=/dev/random
> of=/tmp/keyfile bs=1M count=4) and then encrypt it
> http://ncrypt.sourceforge.net/ for instance?
> Then I decrypt the keyfile first using my passphrase and afterwards I will
> open the dm-crypt device with the decrypted key, right? ... I am using
(Continue reading)

Dirk Heinrichs | 8 Jul 14:39

Re: LUKS Question

Am Dienstag, 8. Juli 2008 schrieb ext Rense Buijen:
> I don't want to use AES

Just curious: Why?

Bye...

	Dirk
--

-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@...
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
Rense Buijen | 8 Jul 15:10

RE: LUKS Question

Because if the NSA selects an encryption scheme (that is weaker then twofish and serpent) ... I have reason
to believe that they can break it. With modern cpu's I don’t really believe in the "the other one is
faster" for these kind of purposes too. But then again, encryption is not my strongest point so I might be
wrong here. And besides ... I'm a big fan of Bruce Schneier ... so if you're out there Bruce, big it up bro! :D

-----Original Message-----
From: Dirk Heinrichs [mailto:dirk.heinrichs.ext@...] 
Sent: Tuesday, July 08, 2008 2:39 PM
To: dm-crypt@...
Subject: Re: [dm-crypt] LUKS Question

Am Dienstag, 8. Juli 2008 schrieb ext Rense Buijen:
> I don't want to use AES

Just curious: Why?

Bye...

	Dirk
--

-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@...
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net

Dirk Heinrichs | 8 Jul 15:14

Re: LUKS Question

Am Dienstag, 8. Juli 2008 schrieb ext Rense Buijen:
> Because if the NSA selects an encryption scheme (that is weaker then
> twofish and serpent)

Is it? Links?

Thanks...

	Dirk
--

-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@...
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
Mathieu SEGAUD | 8 Jul 15:10

Re: LUKS Question

Vous m'avez dit récemment :

> Great, thanks,
>
> I could just as well leave it on the filesystem right? Since it is encrypted
> .. when decrypting I will move it to a ramdrive because I think journaling
> filesystems will still give up data, even if wiped fairly secure...
>
> Greets,
>
> Rense
>
> Ps. One a sidenote, what is the strongest symmetric blockcipher? I am using
> twofish now because I don't want to use AES and it is supposed to be pretty
> fast and fairly secure but if speed would not matter is there anything
> stronger then the known stuff like SERPENT? 

unless you want to protect it against an alien and far more advanced
civilisation, I just don't see the point of not using AES to encrypt
ypur data.
AES is the strongest, and the standard.

--

-- 
Mathieu

Rense Buijen | 8 Jul 15:36

Re: LUKS Question

Without getting into a "Yes, No!" kind of discussion I would like to mention
that AES is both not the strongest (it is serpent to my knowledge) and the
fastest (it is twofish to my knowledge).

Or maybe my sources are wrong or I dont understand it well enough :)

"Serpent was widely viewed as taking a more conservative approach to
security than the other
AES<http://en.wikipedia.org/wiki/Advanced_Encryption_Standard>finalists,
opting for a larger security margin: the designers deemed 16
rounds to be sufficient against known types of attack, but specified 32
rounds as insurance against future discoveries in cryptanalysis."
Source: http://en.wikipedia.org/wiki/Serpent_(cipher)

"Counterpane Labs has spent over one thousand hours cryptanalyzing Twofish,
and has found no attacks that can break the full 16 round version of the
algorithm. Attacks have been found against a weaker 5 round Twofish, but the
algorithm is very secure when the full 16 rounds are used. It is also the
fastest AES candidate, and one of the most compact. Its conservative design
allows the ability to trade off key setup time for encryption speed, as well
as sacrificing smaller memory requirements to obtain greater encryption
speed."
Source: http://www.tropsoft.com/strongenc/twofish.htm

But anyways, you guys have been very helpful, so thanks a lot.
I guess in the end it doesnt really matter if I choose twofish or AES to
encrypt a frigg'n file anyways :)

Take care!

(Continue reading)

Dirk Heinrichs | 8 Jul 15:43

Re: LUKS Question

Am Dienstag, 8. Juli 2008 schrieb ext Rense Buijen:

> But anyways, you guys have been very helpful, so thanks a lot.
> I guess in the end it doesnt really matter if I choose twofish or AES to
> encrypt a frigg'n file anyways

Only if speed is not an issue, see my other response.

Bye...

	Dirk
--

-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@...
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
Dirk Heinrichs | 8 Jul 15:41

Re: LUKS Question

Am Dienstag, 8. Juli 2008 schrieb ext Rense Buijen:

> Without getting into a "Yes, No!" kind of discussion I would like to
> mention that AES is both not the strongest (it is serpent to my
> knowledge) and the fastest (it is twofish to my knowledge).

Regarding speed: For some architectures, the kernel has AES implementations 
written in assembly language. Those are usually faster than everything 
else.

Bye...

	Dirk
--

-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@...
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net

Gmane