<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.hermann-uwe.de" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Uwe Hermann - HOWTO: Disk encryption with dm-crypt / LUKS and Debian [Update] - Comments</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian</link>
 <description>Comments for &quot;HOWTO: Disk encryption with dm-crypt / LUKS and Debian [Update]&quot;</description>
 <language>en</language>
<item>
 <title>Try ATA over ethernet</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-79381</link>
 <description>&lt;p&gt;If you are installing on a slow laptop and have a fast machine on the local network, try ATA over ethernet:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.howtoforge.com/ata_over_ethernet_debian_etch&quot;&gt;ATA Over Ethernet On Debian&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here it depends on the speed of my 100Mb ethernet. I run the urandom on a quad core AMD64 machine and fill the disk partition on a Pentium-M 1.6 GHz laptop.&lt;/p&gt;
&lt;p&gt;Hans&lt;/p&gt;
</description>
 <pubDate>Tue, 12 Jan 2010 08:28:00 +0100</pubDate>
 <dc:creator>Hans Bausewein</dc:creator>
 <guid isPermaLink="false">comment 79381 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>yast</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-79018</link>
 <description>&lt;p&gt;How I can mount my home directory encrypted by yast in opensuse without yast? (my system cann&#039;t start!, now I install kubuntu)&lt;br /&gt;
I have:&lt;br /&gt;
/home/user&lt;br /&gt;
/home/user.img (2Gb)&lt;br /&gt;
/home/user.key (288b)&lt;br /&gt;
?&lt;/p&gt;
</description>
 <pubDate>Sun, 22 Nov 2009 11:27:00 +0100</pubDate>
 <dc:creator>Vladimir</dc:creator>
 <guid isPermaLink="false">comment 79018 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Tutorial for encrypting a working disk with remote access only?</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-78626</link>
 <description>&lt;p&gt;Newbie here that has been looking for a &#039;complete&#039; tutorial how to encrypt a drive that:&lt;br /&gt;
1. Only have remote access to, login is done via SSH, no GUI.&lt;br /&gt;
2. Already existing programs and users on the site&lt;br /&gt;
3. Just want to encrypt sensitive areas not entire disk as told that to do would make it almost impossible for a newbie to do and still be able to login remotely via SSH.&lt;br /&gt;
Sensitive areas?:&lt;br /&gt;
/home/...,&lt;br /&gt;
/jail/glftpd/...&lt;br /&gt;
and logs, etc, don&#039;t really know?&lt;/p&gt;
&lt;p&gt;I&#039;ve been told cryptsetup is great for this and that one would need to make partitions, containers, etc.. completely lost and scared to try anything without a complete tutorial including the partition parts.&lt;/p&gt;
&lt;p&gt;Any chance of this? :D&lt;br /&gt;
Thank you!&lt;/p&gt;
</description>
 <pubDate>Sun, 18 Oct 2009 12:43:09 +0200</pubDate>
 <dc:creator>Mango</dc:creator>
 <guid isPermaLink="false">comment 78626 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>corruption</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-77242</link>
 <description>&lt;p&gt;Good question, I was planning on testing just that on some test image. I guess only some blocks will be affected, but it probably also depends on the type of cipher and mode you use.&lt;/p&gt;
&lt;p&gt;If anybody else does tests, please leave a comment and let us know.&lt;/p&gt;
</description>
 <pubDate>Sat, 11 Jul 2009 04:06:48 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 77242 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>data corruption</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-77128</link>
 <description>&lt;p&gt;Q: what if HDD get some bad blocks/sectors, or any other corruption after being encrypted? How widespread the error will be on the unencrypted view? Will all my data lost or just a file or two?&lt;/p&gt;
&lt;p&gt;Thx, Dolfy&lt;/p&gt;
</description>
 <pubDate>Mon, 29 Jun 2009 17:36:47 +0200</pubDate>
 <dc:creator>Dolfy</dc:creator>
 <guid isPermaLink="false">comment 77128 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>re: multiple passes</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-77056</link>
 <description>&lt;p&gt;The reason behind multiple passes has to do with the physical properties of the storage medium.&lt;/p&gt;
&lt;p&gt;On a hard drive you have physical platters that are coated in a material that holds information through polarization.&lt;/p&gt;
&lt;p&gt;For most intents and purposes the information stored is a true binary data (N or S polarization), but because the density is not 1 bit per molecule, there is a possibility that a particular bit may only be partially polarized, meaning that some of the field may actually be polarized with the old data, meaning that should someone either use specialized forensic software or physically dissect the drive, it may be possible to recover the original information. Each new pass of random information reduces this possibility of recovering the information by compounding the magnetic &#039;echos&#039; to the point that, which echo is valid, becomes nearly impossible to determine. How many passes are taken should be directly related to the sensitivity of the information that was in that area of the disk being wiped. The multiple pass approach normally includes either all 0&#039;s and/or all 1&#039;s as one or more of the passes, before or mixed in with the random passes (not the last pass), just to ensure that every bit changes polarity at least once and in such a way to make it more difficult to recover the information.&lt;/p&gt;
&lt;p&gt;Anything beyond 26 passes is just overkill, and unless the information is TS-SCI, even 26 passes is going to be a bit excessive.&lt;/p&gt;
</description>
 <pubDate>Wed, 24 Jun 2009 02:49:29 +0200</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 77056 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>I find it strange, because</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-76260</link>
 <description>&lt;p&gt;I find it strange, because shred is by default using exactly the same /dev/urandom, which is almost sure to be a bottleneck. Actually, in my case, there&#039;s really no noticeable difference. Maybe if you tell dd to copy more blocks at once, it will go faster?&lt;br /&gt;
e.g.&lt;br /&gt;
dd if=/dev/urandom of=/dev/sdb bs=10240&lt;br /&gt;
(10MiB at once)&lt;/p&gt;
</description>
 <pubDate>Tue, 26 May 2009 00:55:37 +0200</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 76260 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Why use multiple passes at all?</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-64084</link>
 <description>&lt;p&gt;I also can&#039;t imagine how it would be possible to recover data from a disk that was (physically) overwritten (with a random pattern). Not even for these old MFM and RLL drives which Gutmann is talking about in his article from 1996. Just imagine you know that a 1 (or 0) is stored somewhere and you would be able to detect the kind of bit that was stored before, what does it tell you? You would not know whether this previous bit was stored by the erase process or by any of the other (hundreds or thousands) of storage processes applied to this bit. So why waste time with multiple overwrite passes if even one would be sufficient?&lt;/p&gt;
</description>
 <pubDate>Thu, 29 Jan 2009 18:10:41 +0100</pubDate>
 <dc:creator>Jürgen Hestermann</dc:creator>
 <guid isPermaLink="false">comment 64084 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Thanks</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-63290</link>
 <description>&lt;p&gt;Thanks for this howto, I have aplied it to an external harddrive in Fedora 10 without any problems.&lt;/p&gt;
</description>
 <pubDate>Sat, 24 Jan 2009 21:20:21 +0100</pubDate>
 <dc:creator>Jakub</dc:creator>
 <guid isPermaLink="false">comment 63290 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Of course CPU usage is high,</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-52735</link>
 <description>&lt;p&gt;Of course CPU usage is high, the CPU is being used to run the encryption and decryption algorithms.  When combined with SCP, it has to do the usual SSH encryption/decryption, plus the LUKS encryption/decryption.  If you want that done fast, it needs clock cycles.  Duuhhh!!&lt;/p&gt;
</description>
 <pubDate>Wed, 23 Apr 2008 15:40:05 +0200</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 52735 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Yes, wipe would be another</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-51008</link>
 <description>&lt;p&gt;Yes, wipe would be another option. Or shred. I&#039;ll try to find a comparison of all these tools and their effectiveness in regard to &quot;real&quot; random garbage and their speed.&lt;/p&gt;
</description>
 <pubDate>Sun, 09 Mar 2008 18:15:00 +0100</pubDate>
 <dc:creator>drivers</dc:creator>
 <guid isPermaLink="false">comment 51008 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>or
wipe /dev/sdb</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-50833</link>
 <description>&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;wipe /dev/sdb&lt;/p&gt;
</description>
 <pubDate>Sun, 02 Mar 2008 01:17:49 +0100</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 50833 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>off topic</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-50506</link>
 <description>&lt;p&gt;this is not the LUKS way&lt;br /&gt;
it&#039;s just the normal crypt_dm way, which cannot change key or have more than 1 key&lt;/p&gt;
</description>
 <pubDate>Fri, 15 Feb 2008 06:39:24 +0100</pubDate>
 <dc:creator>pnt</dc:creator>
 <guid isPermaLink="false">comment 50506 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Anonymous</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-49837</link>
 <description>&lt;p&gt;dd if=/dev/urandom of=/dev/sdb&lt;br /&gt;
is &lt;strong&gt;VERY&lt;/strong&gt; slow.&lt;/p&gt;
&lt;p&gt;I use this command:&lt;/p&gt;
&lt;p&gt;shred -n 1 /dev/sdb&lt;/p&gt;
&lt;p&gt;This work 100x faster.&lt;/p&gt;
</description>
 <pubDate>Thu, 27 Dec 2007 18:56:06 +0100</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 49837 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>dmcrypt issues with Etch standard kernel</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comment-49610</link>
 <description>&lt;p&gt;I fixed the problem by compiling and running kernel 2.6.23.9.  disk activity is now fast and constant but CPU usage is still high.  Seems like kernel supplied with Etch is not suitable for usage with dmcrypt.&lt;/p&gt;
</description>
 <pubDate>Fri, 07 Dec 2007 19:40:52 +0100</pubDate>
 <dc:creator>andrew henry</dc:creator>
 <guid isPermaLink="false">comment 49610 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>HOWTO: Disk encryption with dm-crypt / LUKS and Debian [Update]</title>
 <link>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian</link>
 <description>&lt;p&gt;A few weeks ago I published a &lt;a href=&quot;http://www.hermann-uwe.de/blog/howto-encrypted-usb-thumb-drives-and-usb-hard-disks-using-loop-aes&quot;&gt;small HOWTO&lt;/a&gt; for using &lt;a href=&quot;http://sourceforge.net/projects/loop-aes/&quot;&gt;loop-aes&lt;/a&gt; to encrypt your hard drive, usb thumb drive etc.&lt;/p&gt;
&lt;p&gt;As I have bought a new 300 GB external USB disk drive on Friday, I have tried something new this time: disk encryption using &lt;a href=&quot;http://www.saout.de/tikiwiki/tiki-index.php&quot;&gt;dm-crypt&lt;/a&gt; / &lt;a href=&quot;http://luks.endorphin.org/&quot;&gt;LUKS&lt;/a&gt;. It has been suggested to me multiple times  that dm-crypt is superior to loop-aes, however I didn&#039;t get a real reason. Yes, it doesn&#039;t require any kernel patches and is easier to setup. But has any serious cryptographer looked at it sharply, yet? Did it withhold his eye contact?&lt;/p&gt;
&lt;p&gt;Anyways, here&#039;s how I encrypted my 300 GB drive. I largely followed the guide at the &lt;a href=&quot;http://www.saout.de/tikiwiki/tiki-index.php?page=EncryptedDeviceUsingLUKS&quot;&gt; EncryptedDeviceUsingLUKS&lt;/a&gt; wiki page...&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
   Make sure you run Linux 2.6.16 or better. Previous versions suffer from an implementation problem which affects the security of dm-crypt, see &lt;a href=&quot;http://www.osvdb.org/22418&quot;&gt;Linux Kernel dm-crypt Local Cryptographic Key Disclosure&lt;/a&gt;.
 &lt;/li&gt;
&lt;li&gt;
   Enable the following options in your kernel:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code maturity level options
&lt;ul&gt;
&lt;li&gt;Prompt for development and/or incomplete code/drivers&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Device Drivers -&gt; Multi-device support (RAID and LVM)
&lt;ul&gt;
&lt;li&gt;Device mapper support&lt;/li&gt;
&lt;li&gt;Crypt target support&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Cryptographic options
&lt;ul&gt;
&lt;li&gt;AES cipher algorithms&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
   Overwrite the whole drive with random data in order to slow down attacks on the encryption. At the same time perform a bad blocks scan to make sure the hard drive is not going to die too soon:&lt;br /&gt;
   &lt;code&gt;badblocks -c 10240 -s -w -t random -v /dev/sdb&lt;/code&gt;&lt;br /&gt;
   Replace &lt;code&gt;/dev/sdb&lt;/code&gt; with whatever is correct on your system. If you&#039;re really paranoid, and are willing to wait one or two days, do this:&lt;br /&gt;
   &lt;code&gt;dd if=/dev/urandom of=/dev/sdb&lt;/code&gt;
 &lt;/li&gt;
&lt;li&gt;
   Install the required packages:&lt;br /&gt;
   &lt;code&gt;apt-get install cryptsetup hashalot&lt;/code&gt;&lt;br /&gt;
   The current cryptsetup in Debian unstable already supports LUKS, which was not the case a while ago, if I&#039;m not mistaken. So Debian testing or stable will most probably &lt;em&gt;not&lt;/em&gt; work!
 &lt;/li&gt;
&lt;li&gt;
   Create one or more partitions on the drive:&lt;br /&gt;
   &lt;code&gt;cfdisk /dev/sdb&lt;/code&gt;&lt;br /&gt;
   I created one big 300 GB partition, &lt;code&gt;/dev/sdb1&lt;/code&gt;.
 &lt;/li&gt;
&lt;li&gt;
   Setup LUKS:&lt;br /&gt;
   &lt;code&gt;cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb1&lt;/code&gt;&lt;br /&gt;
   Enter a good passphrase here. Don&#039;t spoil the whole endeavour by chosing a stupid or short passphrase.
 &lt;/li&gt;
&lt;li&gt;
   Open the encrypted device and assign it to a virtual &lt;code&gt;/dev/mapper/samsung300gb&lt;/code&gt; device:&lt;br /&gt;
   &lt;code&gt;cryptsetup luksOpen /dev/sdb1 samsung300gb&lt;/code&gt;
 &lt;/li&gt;
&lt;li&gt;
   Create a filesystem on the encrypted device:&lt;br /&gt;
   &lt;code&gt;mkfs.ext3 -j -m 1 -O dir_index,filetype,sparse_super /dev/mapper/samsung300gb&lt;/code&gt;&lt;br /&gt;
   I used ext3 with some optimizations, see mke2fs(8).
 &lt;/li&gt;
&lt;li&gt;
   Mount the encrypted partition:&lt;br /&gt;
   &lt;code&gt;mkdir /mnt/samsung300gb&lt;/code&gt;&lt;br /&gt;
   &lt;code&gt;mount /dev/mapper/samsung300gb /mnt/samsung300gb&lt;/code&gt;&lt;br /&gt;
   That&#039;s it. Everything you write to &lt;code&gt;/mnt/samsung300gb&lt;/code&gt; will be encrypted transparently.
 &lt;/li&gt;
&lt;li&gt;
   For unmounting use:&lt;br /&gt;
   &lt;code&gt;umount /mnt/samsung300gb&lt;/code&gt;&lt;br /&gt;
   &lt;code&gt;cryptsetup luksClose /dev/mapper/samsung300gb&lt;/code&gt;
 &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After unmounting, nobody will be able to see your data without knowing the correct passphrase. Drive is stolen? No problem. Drive is broken, and you want to send it in for repair without the guys there poking in your data? No problem. You leave the USB drive at home and some jerk breaks into your house, steals your drive, rapes your wife, and kills your kids? No problem. Well, sort of, but you get the idea ;-)&lt;/p&gt;
&lt;p&gt;There&#039;s more things you can do, thanks to LUKS: have multiple passphrases which unlock your data, change/add/remove passphrases as you see fit, etc.&lt;/p&gt;
&lt;p&gt;Comments?&lt;/p&gt;
&lt;p&gt;&lt;strong style=&quot;color: #ff0000&quot;&gt;Update 2006-04-17&lt;/strong&gt;: You have to use cryptsetup from unstable if you want LUKS support. cryptsetup in testing does &lt;em&gt;not&lt;/em&gt; support this (thanks Ariel).&lt;/p&gt;
</description>
 <comments>http://www.hermann-uwe.de/blog/howto-disk-encryption-with-dm-crypt-luks-and-debian#comments</comments>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1209">crypto</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/49">debian</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1298">dm-crypt</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1300">dmcrypt</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/95">encryption</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/138">howto</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1139">loop-aes</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1299">luks</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/437">paranoia</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1301">random</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/38">security</category>
 <pubDate>Mon, 03 Apr 2006 02:54:56 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">861 at http://www.hermann-uwe.de</guid>
</item>
</channel>
</rss>
