<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Encryption &#8211; Phocean.net</title>
	<atom:link href="/tag/encryption/feed" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Computer Security Blog</description>
	<lastBuildDate>Fri, 24 Feb 2017 21:17:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.10</generator>
	<item>
		<title>ESFS, new perspectives for stenography ?</title>
		<link>/2011/01/14/esfs-new-perspectives-for-stenography.html</link>
		<pubDate>Fri, 14 Jan 2011 21:43:21 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Defense]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[stenography]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=952</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=952</guid>
		<description><![CDATA[Tomas Touceda advertised a new project on Full Disclosure. The idea sounds good, so I will keep an eye on this very interesting project. Though I would like to know more about the methods that were used for encryption and stenography. Code and explanations are on the ESFS project homepage. Beyond the pratical usage, I...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2011/01/14/esfs-new-perspectives-for-stenography.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Tomas Touceda advertised a new project on Full Disclosure.<br />
The idea sounds good, so I will keep an eye on this very interesting project.<br />
Though I would like to know more about the methods that were used for encryption and stenography.</p>
<p>Code and explanations are on the <a title="ESFS" href="https://github.com/chiiph/esfs" target="_blank">ESFS project homepage</a>.<br />
Beyond the pratical usage, I wonder if it can offer anyhow better resistance to statistical analysis that usually defeat stenography. The author addresses partialy the point on the mailing list:</p>
<blockquote><p>What I meant with hide is that, since it uses the LSBs, you can pick<br />
any image, and &#8220;find data&#8221; in them, so it makes it a little bit harder<br />
to know where you actually have data, and if you really do.</p></blockquote>
<p>To this, a reader named stormrider pointed out <a title="stenography attacks" href="http://www.ece.cmu.edu/~adrian/487-s06/westfeld-pfitzmann-ihw99.pdf" target="_blank">an interesting research document (PDF)</a>, which is a state of the art of the limitations of stenography and the attacks against it. Is it really a dead-end ?</p>
<p>This is indeed a very interesting field of research.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Cold boot attack, not a threat to Full disk encryption (FDE)</title>
		<link>/2008/02/26/cold-boot-attack-not-a-threat-to-full-disk-encryption-fde.html</link>
		<comments>/2008/02/26/cold-boot-attack-not-a-threat-to-full-disk-encryption-fde.html#comments</comments>
		<pubDate>Tue, 26 Feb 2008 09:53:02 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Cold boot attack]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[FDE]]></category>
		<category><![CDATA[Hard drive]]></category>
		<category><![CDATA[TPM]]></category>
		<category><![CDATA[Vulnerability]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=100</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=100</guid>
		<description><![CDATA[Since the new cold boot attack hack is on the news, touching most of the software encryption solutions, I have wondered if it had any chance to concern also hardware encryption. Hardware encryption is provided by a few laptop makers, generally on high-range an business models. It has much less performance impact than software encryption,...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2008/02/26/cold-boot-attack-not-a-threat-to-full-disk-encryption-fde.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Since the new cold boot attack hack is on the news, touching most of the software encryption solutions, I have wondered if it had any chance to concern also hardware encryption.</p>
<p>Hardware encryption is provided by a few laptop makers, generally on high-range an business models.</p>
<p>It has much less performance impact than software encryption, and protect the data independently from your system configuration and its partitions.</p>
<p>Full disk encryption is the so called hardware encryption technology used by Lenovo on my Thinkpad.</p>
<p><span id="more-100"></span></p>
<p>Mine comes with a Hitachi hard drive. Hitachi names its encryption technology <strong><em>&#8220;Bulk Data Encryption&#8221;</em></strong>.</p>
<p>I know at least Seagate provides the same kind of feature.</p>
<p>The bulk data encryption is based on the<strong> AES algorithm with a 128 bits key</strong>.</p>
<p>Actually, the encryption is not done by the laptop itself but by the hard-drive.</p>
<p>You need both the hard drive and the laptop supporting encryption , for the following reasons :</p>
<ol>
<li>your motherboard must have a TPM chip, which is used for the encryption, as a unique source to derivate the encryption keys.</li>
<li>the BIOS must interface with the hard drive FDE, to set/unset the encryption and to prompt for the password before the real boot (actually, a small OS embedded on the drive take care of this authentication).</li>
</ol>
<p>In reality, the encryption is always active and the password to access to the drive is just another security feature. There is no link between these two functions. That&#8217;s why the fact of setting a password is immediate : no reencryption is done because the password has nothing to do with encryption.</p>
<p>In case of authentication success, the system boots normally.</p>
<p>In case of failure, and if the maximum number of attempt is reached, the data is erased. Instead of initializing the content with 0, which would take a lot of time and could be interrupted by shutting down the machine, just the keys are destroyed within a few seconds.</p>
<p>Anyway, the content is supposed to be very hard to retrieve thanks to the effectiveness of the AES algorithm.</p>
<p>One important thing is that <strong>the key is not a derivate of the password you set</strong>.</p>
<p>The hard drive password is a feature that does not come necessarily with encryption.</p>
<p>It is just there to limit the access of the content, but not its confidentiality.</p>
<p>For instance, you could imagine that if the drive is stolen, someone opens physically the drive, change the ROM to pass over the password and read your data without any pain.</p>
<p>The con of that is <strong>the encryption keys generation is based on your hardware</strong>. A different hardware can&#8217;t decipher the drive.</p>
<p>If your motherboard breaks down, you won&#8217;t be able to read your data from another computer ! Make some good backups&#8230;</p>
<p>To go back to the main topic, <strong>is the cold boot attack a threat for this hardware encryption ?</strong></p>
<p>No. The encryption algorithm is not in the user land, so no key is stored in RAM.</p>
<p><strong> The key hashes are stored directly on the disk.</strong></p>
<p>These documents from Hitachi provide more detailed information :</p>
<p><a title="Bulk encryption white paper" href="/wp-content/uploads/2008/02/bulk_encryption_white_paper.pdf">Bulk encryption white paper</a></p>
<p><a title="HowTo guide for bulk data encryption" href="/wp-content/uploads/2008/02/howtoguide_bulkdataencryption_final.pdf">HowTo guide for bulk data encryption</a></p>
<p><a title="Hardware encryption" href="http://en.wikipedia.org/wiki/Full_disk_encryption">This Wikipedia article</a>, underlining the main points of hardware encryption,  is also interesting.</p>
<p>I guess that at some point it would be possible to read some hash on the hard drive electronic board, but this is not going to be easy. You need to be a hardware expert in hard drives and for sure it can&#8217;t be done as quickly as with the RAM chip.</p>
<p>Of course, even the cold boot attack is extreme. Most of thief won&#8217;t care about your data, or won&#8217;t be the knowledge or the practical possibility to conduct a successful attack.</p>
<p>If you don&#8217;t have FDE support, you should continue to use an encryption solution like dm-crypt or Truecrypt and maybe consider turning off your computer more often.</p>
<p>It anyway remains an excellent solution for external disks, as it is normally not all the time attached to your computer.</p>
<p>Personally, as FDE offers more performance and transparency, I am using it on my laptop but I keep using dm-crypt on all my external drives.</p>
<p>Now the question is : what good workaround can be found to provide more secure software encryption ?</p>
]]></content:encoded>
			<wfw:commentRss>/2008/02/26/cold-boot-attack-not-a-threat-to-full-disk-encryption-fde.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disk encryption methods : hacked !</title>
		<link>/2008/02/25/disk-encryption-methods-hacked.html</link>
		<pubDate>Mon, 25 Feb 2008 21:25:49 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Cold boot attack]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Hard drive]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=99</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=99</guid>
		<description><![CDATA[Damned ! A team of researchers found a way to defeat all the most common disk encryption methods &#8211; including dm-crypt for Linux that I previously described on this blog. All systems are actually concerned, because the attack is low level. It is based on the RAM chips properties. After shutdown, and therefore no more...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2008/02/25/disk-encryption-methods-hacked.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Damned !</p>
<p><a title="disk encryption hackers" href="http://citp.princeton.edu/memory">A team of researchers</a> found a way to defeat all the most common disk encryption methods &#8211; including dm-crypt for Linux that I <a title="dm-crypt tutorial" href="http://http//www.phocean.net/?p=85">previously described</a> on this blog.</p>
<p><a title="disk encryption hackers" href="http://citp.princeton.edu/memory">A team of researchers</a> found a way to defeat all the most common disk encryption methods &#8211; including dm-crypt for Linux that I <a title="dm-crypt tutorial" href="http://http//www.phocean.net/?p=85">previously described</a> on this blog.</p>
<p>All systems are actually concerned, because the attack is low level. It is based on the RAM chips properties. After shutdown, and therefore no more electricity powering, a chip will still contain some readable information during a few seconds.</p>
<p>The data contained is deteriorating, but for example if you cool the chip enough, for example with a computer dry air dust cleaner, you can keep the data several minutes !</p>
<p>The problem concerning data encryption is that the decryption key is kept in RAM, and that way be stolen to read all your data.</p>
<p>The attack would not so easy in practice, if suspend-to-ram did not exist.</p>
<p>But as many users, including me, use heavily suspend-to-ram with their laptop, this issue is rather problematic&#8230;</p>
<p>The team provides a rather impressive video :</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="http://www.youtube.com/v/JDaicPIgn9U&amp;rel=1" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://www.youtube.com/v/JDaicPIgn9U&amp;rel=1" wmode="transparent"></embed></object></p>
<p>I no longer use dm-crypt since my <a title="my thinkpad T61" href="/?p=97">Thinkpad</a> provides hardware encryption, but I wonder now where the key is stored in my case. I don&#8217;t think it is in RAM, but I have to check it to make sure.I will do it tomorrow, since I need to rest now.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Disk Encryption on Linux</title>
		<link>/2007/11/18/disk-encryption-on-linux.html</link>
		<comments>/2007/11/18/disk-encryption-on-linux.html#comments</comments>
		<pubDate>Sun, 18 Nov 2007 17:56:47 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[cryptoloop]]></category>
		<category><![CDATA[cryptsetup]]></category>
		<category><![CDATA[dmcrypt]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Hard drive]]></category>
		<category><![CDATA[Luks]]></category>
		<category><![CDATA[swap]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=85</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=85</guid>
		<description><![CDATA[I finally encrypted some partitions of my hard drive.

An external hard drive that I just bought (320 Gb) that allowed me to back up my entire /home partition and consider encrypting it.]]></description>
				<content:encoded><![CDATA[<p>I finally encrypted some partitions of my hard drive.</p>
<p>An external hard drive that I just bought (320 Gb) that allowed me to back up my entire /home partition and consider encrypting it.</p>
<p>I mainly used <a title="Encryption on Ubuntu" href="http://johnleach.co.uk/words/archives/2006/12/06/245/" target="_blank">this tutorial</a>, but I derived a little from it about the unlocking system : I did not want to input a password while the machine boots, I wanted it to be transparent while I log in. This <a title="dmcrypt" href="http://dev.riseup.net/grimoire/storage/encryption/dmcrypt/" target="_blank">how to</a> provides more complete information, if needed.</p>
<p>So I will summarize here the actions to get an encrypted volume.</p>
<p><strong>The tools</strong></p>
<p><a title="dmcrypt" href="http://www.saout.de/misc/dm-crypt/" target="_blank">dmcrypt</a> is a device mapper supported by the 2.6 Linux kernel. Roughly, this is an abstraction layer between the kernel and the real file system, doing all encrypting / decrypt operations. It is a replacement of <a title="cryptoloop" href="http://tldp.org/HOWTO/Cryptoloop-HOWTO/index.html">cryptoloop</a>, which created a loop device in a file within the file system. It can&#8217;t encrypt a whole partition and can be considered now as less reliable and secured.</p>
<p>The encryption is based on <a title="LUKS" href="http://luks.endorphin.org/" target="_blank">LUKS</a> is a userland tool aiming to simplify the set-up of dm-crypt. It also stores some set-up information related to the encryption in the partition header, to make easy the transportation of the data from a machine to another, changing the passphrase without having to re-encode the entire partition, and even support having multi passphrases for the same device.</p>
<p><strong>What to encrypt and why ? </strong></p>
<p>The first thing is to decide what you will encrypt and how. Of course, I consider that your drive is rightly partitioned with, at least, the /, /home and swap having each a separated partition.</p>
<p>It is the case on my laptop. I chose to encrypt both the /home and the swap partitions.</p>
<p>In my case, there were little interest in encrypting the / partition. It contains only configuration files (without any password hardcoded), the /temp and applications &#8211; nothing to keep secret. But of course it might be different for you, depending on the security level you are looking for.</p>
<p>To the contrary, the /home partitions contains a lot of private data that I wouldn&#8217;t like anyone access in any case.</p>
<p>Then, it is rather important to encrypt the swap, because it is roughly a partial of you RAM and therefore contains all kind of information from your opened session. The annoying thing is that hibernation (suspend to disk) will not work anymore. It is anyway worth to be done, as it is well explained by <a title="Why encrypting the swap" href="http://theworldofapenguin.blogspot.com/2006_12_01_archive.html" target="_blank">this blogger</a>.</p>
<p><strong>Preparing the software</strong></p>
<p>Using Debian Etch or Ubundu Festy/Gutsy, it is easy though the provided kernel (2.6) already supports device mapper, crypt target and AES cipher algorithm as modules :</p>
<pre>$ apt-get install dmsetup cryptsetup libpam-mount</pre>
<p><strong>Encrypting swap</strong></p>
<p><em><strong>UPDATE 2008/04/13 : it is now possible to encrypt the swap in <a title="Encrypting Swap and Suspend to disk" href="http://feeding.cloud.geek.nz/2008/03/encrypted-swap-partition-on.html" target="_blank">a way that preserve suspend-to-disk</a>.</strong></em></p>
<p>It is a good test to start with the swap, as there is no risk that you loose some valuable data.</p>
<p>First, let&#8217;s deactivate the current swap before any operation :</p>
<pre>$ swapoff /dev/hda2</pre>
<p>We suppose that hda2 is your swap partition :</p>
<pre>$ cryptsetup luksFormat -c aes-cbc-essiv:sha256 /dev/hda2</pre>
<p>add this line to the /etc/crypttab file :</p>
<pre>swap    /dev/hda2       /dev/urandom     swap</pre>
<p>It means that we are going to create a mapper named swap for the <strong>/dev/hda2</strong> device. It will use a random key as a passphrase for the encryption.</p>
<p>There is a choice to do between <strong>/dev/random</strong> and <strong>/dev/urandom</strong>. The latter is in theory a little bit less secure (the randomizing is inferior to the /dev/random, as it reuses the internal pool data for the generation), but it is preferable if you don&#8217;t want to be blocked at boot time, while the kernel is trying to get more entropy (you can shorten this by pressing some keys, though).</p>
<p>Now starts this script :</p>
<pre>$ /etc/init.d/cryptdisks start</pre>
<p>It will create a mapper named <strong>swap</strong> to the <strong>/dev/hda2</strong> partition, as set in the <strong>crypttab</strong> file.<br />
This is equivalent to this command :</p>
<pre>$ cryptsetup -y create swap /dev/hda2</pre>
<p>Now, we need to create the file system :</p>
<pre>$ mkswap /dev/mapper/swap</pre>
<p>Now we need to update the /etc/fstab file, commenting the old entry for hda2 and adding a new one for the mapped device :</p>
<pre>/dev/hda2       none            swap    sw              0       0
/dev/mapper/swap        none    swap    sw      0       0</pre>
<p>Now you are ready to test ! Just reboot, and without any user interaction, you should get an encrypted swap with a randomized key.</p>
<p><strong>Encrypting /home</strong></p>
<p>Now let&#8217;s encrypt the /home. Before doing anything, <strong>be SURE that you made a BACK UP of ALL your data</strong>. <strong>The entire /home will be ERASED !</strong></p>
<p>We consider that <strong>hda3</strong> is the /home partition :</p>
<pre>$ cryptsetup luksFormat -c aes-cbc-essiv:sha256 /dev/had
$ cryptsetup -y create home /dev/hda
$ mkfs.ext3 /dev/mapper/home</pre>
<p>We won&#8217;t use neither the <strong>crypttab</strong> file or the <strong>fstab</strong> one, because we don&#8217;t want to be prompted at boot time for a password. And of course we can&#8217;t afford to crypt our data with a randomized key, changing at every boot !</p>
<p>What we want is the encryption to be done at log-in time, without prompting the user for another passphrase. Don&#8217;t we have enough passwords to memorize to add one more !?</p>
<p>We are going to use <strong>PAM,</strong> the Linux authentication mechanism, with its <strong>libpam-mount</strong> module. It is designed to mount some devices while the user log in, exactly what we need ! The user Linux password will be used as the encryption passphrase.</p>
<p>Of course, the security level will depend on your user password &#8211; take a good care on its length and complexity (though it must be already the case, encryption or not). A good compromise is probably an 8 digits password. Of course, if you are looking for the top level security, prefer the boot time passphrase prompting method&#8230;</p>
<p>To activate it, create or edit the <strong>/etc/security/pam-mount.conf.xml</strong> file and add this line :</p>
<pre><code>&lt;volume user="user" fstype="crypt" path="/dev/mapper/home" mountpoint="/home" options="fsck,relatime" /&gt;</code></pre>
<p>Also add this at the end of the <strong>/etc/pam.d/common-auth</strong> file :</p>
<pre># cryptsetup
auth    optional        pam_mount.so use_first_pass</pre>
<p>That&#8217;s done ! Testing is easy : log off, log in and check that your /home partition is well monted. It should not been mounted or readable for other users, including root.</p>
<p><strong>Encrypting a removable device</strong></p>
<p>We assume that you have a usb key (once again BACK UP your data) inserted, corresponding to the <strong>/dev/sda</strong> device :</p>
<pre>$ cryptsetup luksFormat -c aes-cbc-essiv:sha256 /dev/sda1</pre>
<p>We open manually the luks partition :</p>
<pre>$ cryptsetup luksOpen /dev/sda1 usbkey</pre>
<p>We format it with the filesystem of your choice (here ext3) :</p>
<pre>$ mkfs.ext3 /dev/mapper/usbkey</pre>
<p>We close the partition :</p>
<pre>$ cryptsetup luksClose usbkey</pre>
<p>Now every time you insert the key, you will be prompted for the password (at least by Gnome through the keyring manager box, though I haven&#8217;t tested yet with a different window manager).</p>
<p><strong>Conclusion</strong></p>
<p>This was a much easier experience than I previously thought. Much work has been made to hide the complex layers behind that, and it now takes only a few steps to get a pretty well secured hard drive.</p>
<p>However I think it really must become more user-friendly for the masses. Most of people will still be scared to open a terminal and type the commands above, so I am looking forward to seeing some graphical front-end to manage all that. Sure there are coming, and if you already know some project, please let me know.</p>
<p>About performance, if encryption must have a resource cost, I could not notice any slow down on a pretty modest hardware (celeron M 1,5 Ghz).</p>
]]></content:encoded>
			<wfw:commentRss>/2007/11/18/disk-encryption-on-linux.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
