dm-crypt Digest, Vol 5, Issue 5
A message that is not in the archive (sent off-list or not yet received): [email protected]
Dear all,
I have succeed in encrypting hard disk with cryptsetup. Now, I want to modify mkinitrd with automatically passphrase. I found this line in /sbin/mkinitrd:
echo Setting up disk encryption: /dev/sda4
plymouth ask-for-password --command "cryptsetup luksOpen /dev/sda4 luks-sda4"
the second line ask me to type the passphrase,
is there anybody know how to make it automatically ? like:
echo "passphrase" | cryptsetup luksOpen /dev/sda4 root ? I have tried this command and make new initrd but it did not work. It sound weird but, that is what I am asked to do.
Thank you for your help.
Regards,
Hans
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Thursday, November 05, 2009 6:00 PM
To: [email protected]
Subject: dm-crypt Digest, Vol 5, Issue 5
Send dm-crypt mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.saout.de/mailman/listinfo/dm-crypt
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific than "Re: Contents of dm-crypt digest..."
Today's Topics:
1. Re: [PATCH] print warning when adding a key that contains non-ASCII characters (Heinz Diehl)
2. Crack a dm-LUKS partition or harddisk (Si St)
3. Re: Crack a dm-LUKS partition or harddisk (Sven Eschenberg)
4. Re: Crack a dm-LUKS partition or harddisk (Heinz Diehl)
5. Re: Crack a dm-LUKS partition or harddisk (Arno Wagner)
----------------------------------------------------------------------
Message: 1
Date: Wed, 4 Nov 2009 16:46:42 +0100
From: Heinz Diehl <[email protected]>
To: [email protected]
Subject: Re: [dm-crypt] [PATCH] print warning when adding a key that
contains non-ASCII characters
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Quoted 5 lines · Uwe Menges
Your patch uses the
isascii()call, but the problem "different keymap at different password entering times" is IMHO not really related to the question "is the character ascii or not". It's all too easy to run into exact the same situation you want to prevent, with just plain ascii chars in the password.
Yes, of course, it can be quite a little bit of a problem if the charset of a let's say
Norwegian keyboard (in my case) is turned into an US mapped one at booting time.
------------------------------
Message: 2
Date: Wed, 4 Nov 2009 17:51:59 +0100
From: "Si St" <[email protected]>
To: [email protected]
Subject: [dm-crypt] Crack a dm-LUKS partition or harddisk
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Question:
Say we have a dm/LUKS encrypted partition or harddisk. - Do we have a crack-password-delay-mechanism as a part of the encryption, or is this a feature of the software of the OS?
I I have understood that with the very rapid crackingspeed (brute-force) we have nowadays, the new approach to this is to force in a delay for each password enter, as a tool of increased security. Is this feature a block independent software, or is it only a software program of the booted OS?
If so, attacking the harddisk directly independent of the booted OS will pass this feature.
(Have I made myself clear?)
Signature · 35 lines
_______________________________________________ Surf the Web in a faster, safer and easier way: Download Opera 9 at http://www.opera.com Powered by Outblaze ------------------------------ Message: 3 Date: Wed, 04 Nov 2009 18:01:57 +0100 From: Sven Eschenberg <[email protected]> To: [email protected] Subject: Re: [dm-crypt] Crack a dm-LUKS partition or harddisk Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed The passphrase is iterated (with some sort of key derivation algorithm) as far as I understand it. Usually you can modify the amount of time in ms during keyslot creation which is spent in doing iterations. If you assume you can do n Iterations in 1 second, and some other machine can do 10 times n iterations, then machine two would spend (approx) 1/10 second per passphrase (password) test. But this is only of relevance, where the passphrase universe << key universe - Meaning, when the entropy of your passphrase is bigger than the keyspace, it doesn't matter, since you'd try cracking the actualy key within the keyspace. Regards -Sven
Quoted 2 lines · Si St
Question:
Say we have a dm/LUKS encrypted partition or harddisk. - Do we have a
crack-password-delay-mechanism as a part of the encryption, or is this a feature of the software of the OS?
Quoted 2 lines
I I have understood that with the very rapid crackingspeed (brute-force)
we have nowadays, the new approach to this is to force in a delay for each password enter, as a tool of increased security. Is this feature a block independent software, or is it only a software program of the booted OS?
Quoted 2 lines
If so, attacking the harddisk directly independent of the booted OS will
pass this feature.
Quoted 3 lines
(Have I made myself clear?)
------------------------------
Message: 4
Date: Wed, 4 Nov 2009 18:30:51 +0100
From: Heinz Diehl <[email protected]>
To: [email protected]
Subject: Re: [dm-crypt] Crack a dm-LUKS partition or harddisk
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Quoted 1 line · Si St
Do we have a crack-password-delay-mechanism as a part of the encryption
See the option "--iter-time" in the cryptsetup manual, and look for "iteration count" related to PBKDF2.
------------------------------
Message: 5
Date: Wed, 4 Nov 2009 23:29:53 +0100
From: Arno Wagner <[email protected]>
To: [email protected]
Subject: Re: [dm-crypt] Crack a dm-LUKS partition or harddisk
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Quoted 6 lines · Si St
Question:
Say we have a dm/LUKS encrypted partition or harddisk. - Do we have a crack-password-delay-mechanism as a part of the encryption, or is this a feature of the software of the OS?
Quoted 8 lines
I have understood that with the very rapid crackingspeed (brute-force) we have nowadays, the new approach to this is to force in a delay for each password enter, as a tool of increased security. Is this feature a block independent software, or is it only a software program of the booted OS?
If so, attacking the harddisk directly independent of the booted OS will pass this feature.
I guess this is in response to a recent slashdot article pointing to some people that have cracked a PGP encrupted zip file using Amazon EC2.
Forst, this is only relevant if you have low entropy in your passphrase. An exapmple would ba an [a-z] 8 char passphrase, which has (if it is random) about 37.6 bits of entropy. This is of course far less than a 128 bit or 256 bit key and in a brute force attack it may be beneficial to run though all possible passphrases instead of through all possible keys.
LUKS uses PBKDF2, which is specifically designed to be resilient in case such low-entropy passwords are used. The hash is SHA-1 (the recent discoverd weaknesses do not matter for this application) and it determined by a benchmark system, which basically benchmarks PBKDF2 and then uses the number of iterations that give a specific checking time. As fas as I can tell, the LUKS spec does not give a default.
cryptsetup 1.0.6 (the version in Debian Stable) seems to use a default value of 1 sec (line 28 in src/cryptsetup.c:
static int opt_iteration_time = 1000;).
Incidentially this gives a cost > 10 Billion USD for Amazon EC2 if the key setup was done on reasonably fast hardware. If you do it on a linux running in a bochs emulator, e.g., the security may be a bit worse ;-)
The passphrase and the iterations are needed to derive the key that unlocks the master key. This means the delay feature is a cryptographic feature of the key-derivation mechanism and cannot be bypassed by anyone. It is not just a static delay, it is a computation that has to be done since its result is needed.
What the OS can do, if it is corrupt, is to just store the key somewhere when you unlock your crypto-container. This requires an attacker to have access to your OS two times and yoy to open the container in between. It has recently gotten some limited fame as an "Evil Maid Attack". However an easier attack installs a keyboard sniffer or a physical bug into your computer.
Arno
----
Reference for LUKS:
http://cryptsetup.googlecode.com/svn-history/r42/wiki/LUKS-standard/on-disk-
format.pdf
Signature · 20 lines
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: [email protected] GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F ---- Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans If it's in the news, don't worry about it. The very definition of "news" is "something that hardly ever happens." -- Bruce Schneier ------------------------------ _______________________________________________ dm-crypt mailing list [email protected] http://www.saout.de/mailman/listinfo/dm-crypt End of dm-crypt Digest, Vol 5, Issue 5 **************************************
Quoted 1 line · Hans Hallan
I have tried this command and make new initrd but it did not work.
If it's not a root partition, I would strongly suggest that you use a script in the boot process which asks for the passphrase. You can also use the "--key-file" option to have this done automatically.