<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://www.linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Mon May 20, 2013 7:23 am by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Mon May 20, 2013 7:23 am</pubDate>
  <lastBuildDate>Mon May 20, 2013 7:23 am</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://www.linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>HDD encryption, expert guru help needed.</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=898#898</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=-1'&gt;Anonymous&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Apr 23, 2005 8:43 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Alrighty, I have a lot to say, but not a great deal of time, so Im going to get right to it.&lt;br /&gt;
A while ago I purchased 3 external maxtor 200 gig usb2 hdd's. I have them set up in a raid array, which is encrypted on 2 levels.&lt;br /&gt;
&lt;br /&gt;
This is how it works,&lt;br /&gt;
Each disk is individually encrypted at the io level, then the 3 disks are mapped into a raid0 partition, which is again fed through dmcrypt to produce the final partition which I can format and mount as such.&lt;br /&gt;
&lt;br /&gt;
WHY ?&lt;br /&gt;
Because I dont trust AES, or any one cipher. AES is especially suspect,  because like the now broken DES the NSA are reccomending it, and because it uses a very questionable algebra system. Clearly they want a breakable cipher, that only they can crack, no perhaps not today, but within 10 years.&lt;br /&gt;
Of the remaining 4 candidates I most prefer serpent. AES , anubis and twofish are my io level choices, and the final raid partition is mapped with serpent.&lt;br /&gt;
&lt;br /&gt;
Does it work at an acceptable speed ?&lt;br /&gt;
YES.&lt;br /&gt;
The raid0 increases the bandwidth all things considered and the algorythms were designed with limited resources in mind. I have 600 gig, as fast (auctually faster) than any HDD. The encryption is operative as far as I can tell, and my centrino 1.6 cpu jumps when I move data on to it. It works. Well. &lt;br /&gt;
It should also be noted that I have a gig of ram.&lt;br /&gt;
&lt;br /&gt;
Here is the script I use......&lt;br /&gt;
&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
&lt;br /&gt;
# CYRAX-REF&lt;br /&gt;
&lt;br /&gt;
devlabel add -u S:IBMMemoryKey -s /dev/key&lt;br /&gt;
devlabel add -u S80:uniquenumberishereMaxtorOneTouchII -s /dev/exar0&lt;br /&gt;
devlabel add -u S80:uniquenumberishereMaxtorOneTouchII -s /dev/exar1&lt;br /&gt;
devlabel add -u S80:uniquenumberishereMaxtorOneTouchII -s /dev/exar2&lt;br /&gt;
devlabel start&lt;br /&gt;
&lt;br /&gt;
umount /mnt/key&lt;br /&gt;
mkfs /dev/key&lt;br /&gt;
mount /dev/key /mnt/key&lt;br /&gt;
&lt;br /&gt;
dd if=/dev/urandom of=/mnt/key/cyrax-0 bs=1c count=32&lt;br /&gt;
dd if=/dev/urandom of=/mnt/key/cyrax-1 bs=1c count=40&lt;br /&gt;
dd if=/dev/urandom of=/mnt/key/cyrax-2 bs=1c count=32&lt;br /&gt;
dd if=/dev/urandom of=/mnt/key/lucifer bs=1c count=32&lt;br /&gt;
&lt;br /&gt;
umount /mnt/lucifer&lt;br /&gt;
dmsetup remove lucifer&lt;br /&gt;
mdadm -S /dev/md1&lt;br /&gt;
rm /dev/md1&lt;br /&gt;
dmsetup remove cyrax-0&lt;br /&gt;
dmsetup remove cyrax-1&lt;br /&gt;
dmsetup remove cyrax-2&lt;br /&gt;
&lt;br /&gt;
cryptsetup.sh -c anubis-cbc-essiv:sha256 -s 40 -d /mnt/key/cyrax-0 create cyrax-0 /dev/exar0&lt;br /&gt;
cryptsetup.sh -c aes-cbc-essiv:sha256 -s 32 -d /mnt/key/cyrax-1 create cyrax-1 /dev/exar1&lt;br /&gt;
cryptsetup.sh -c twofish-cbc-essiv:sha256 -s 32 -d /mnt/key/cyrax-2 create cyrax-2 /dev/exar2&lt;br /&gt;
cryptsetup.sh status cyrax-0&lt;br /&gt;
cryptsetup.sh status cyrax-1&lt;br /&gt;
cryptsetup.sh status cyrax-2&lt;br /&gt;
mdadm -Cv /dev/md1 --auto -l0 -n3 -c32 /dev/mapper/cyrax-0 /dev/mapper/cyrax-1 /dev/mapper/cyrax-2&lt;br /&gt;
cryptsetup.sh -c serpent-cbc-essiv:wp256 -s 32 -d /mnt/key/lucifer create lucifer /dev/md1&lt;br /&gt;
cryptsetup.sh status lucifer&lt;br /&gt;
mkfs.reiserfs -f -q /dev/mapper/lucifer&lt;br /&gt;
&lt;br /&gt;
mount /dev/mapper/lucifer /mnt/lucifer&lt;br /&gt;
&lt;br /&gt;
There are many aspects to this script, and I cannot go through everything. I recompiled my kernel too, with supporting options. I am using Slackware 10. Kernel 2.6.11.7, with grsecurity (high+PAX) and an updated vesa patch.&lt;br /&gt;
&lt;br /&gt;
After this script has generated my partition I use a different script to mount it as follows...&lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# CYRAX-IO&lt;br /&gt;
&lt;br /&gt;
devlabel add -u S:IBMMemoryKey -s /dev/key&lt;br /&gt;
devlabel add -u S80:uniquenumberishereMaxtorOneTouchII -s /dev/exar0&lt;br /&gt;
devlabel add -u S80:uniquenumberishereMaxtorOneTouchII -s /dev/exar1&lt;br /&gt;
devlabel add -u S80:uniquenumberishereMaxtorOneTouchII -s /dev/exar2&lt;br /&gt;
devlabel start&lt;br /&gt;
&lt;br /&gt;
mount /dev/key /mnt/key&lt;br /&gt;
&lt;br /&gt;
cryptsetup.sh -c anubis-cbc-essiv:sha256 -s 40 -d /mnt/key/cyrax-0 create cyrax-0 /dev/exar0&lt;br /&gt;
cryptsetup.sh -c aes-cbc-essiv:sha256 -s 32 -d /mnt/key/cyrax-1 create cyrax-1 /dev/exar1&lt;br /&gt;
cryptsetup.sh -c twofish-cbc-essiv:sha256 -s 32 -d /mnt/key/cyrax-2 create cyrax-2 /dev/exar2&lt;br /&gt;
&lt;br /&gt;
mdadm -A --auto /dev/md1 /dev/mapper/cyrax-0 /dev/mapper/cyrax-1 /dev/mapper/cyrax-2&lt;br /&gt;
cryptsetup.sh -c serpent-cbc-essiv:wp256 -s 32 -d /mnt/key/lucifer create lucifer /dev/md1&lt;br /&gt;
&lt;br /&gt;
mount /dev/mapper/lucifer /mnt/lucifer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I store my keys on a usb key. Later I plan to encrypt them too,  with idea over a password.&lt;br /&gt;
&lt;br /&gt;
To answer a few possible questions,&lt;br /&gt;
&lt;br /&gt;
Why not raid 5 ?&lt;br /&gt;
Because then only 2 of the disks would have to have their encryption broken. The parity would generate the third.&lt;br /&gt;
&lt;br /&gt;
Why a memory key ?&lt;br /&gt;
Erasing data from a hard drive is practically impossible, A memory key is much more difficult for the forensic examiner, if the data has been overwritten. Furthermore I can flush it down the toilet for extra fun.&lt;br /&gt;
&lt;br /&gt;
Why Why Why are you doing this ?&lt;br /&gt;
Cause its cool. Like James Bondish. Kinda wish I had something to hide. But hey nobody will auctually know if I do or not, so thats one step closer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OK you have read this far, now I need your help if your an expert guru.&lt;br /&gt;
ReiserFS works just fine, but I was trying other filesystems to see if i could get more speed out of one. XFS crashed my system (amazing it never has happened before) and bfs(?) sucks. Thanks again SCO.&lt;br /&gt;
&lt;br /&gt;
Now I am running a Thinkpad T40p.&lt;br /&gt;
&lt;br /&gt;
Here is my problem. I tried jfs (IBM's contributed super file system) and boy was it fast. UNFORTUNATELY after I rebooted my system, after I formatted using jfs in the first script (the refresh) I was prompted with a bios prompt. Asking for a password. Hmmmmmmm.....&lt;br /&gt;
&lt;br /&gt;
In the IBM bios, the way I have it set up, if you plug in a BOOTABLE external HDD you need to give a password over to allow the system to boot from that.&lt;br /&gt;
&lt;br /&gt;
So what has happened here is that the IBM bios somehow knows there is a jfs file system in my double encrypted raid. Which is in my opinion totally impossible. When I changed file systems, nada.&lt;br /&gt;
&lt;br /&gt;
So my question to anyone not crying of boredom by now is WTF ?&lt;br /&gt;
&lt;br /&gt;
Once again these disk are mapped at the io level, it is NOT possible for this to happen. Consipacy theories ?&lt;br /&gt;
&lt;br /&gt;
By the way nice site. It really took 2 long though.&lt;br /&gt;
&lt;br /&gt;
If anyone is interested in my kernel config I might be willing to let it out... just ask.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=898#898</comments>
                                        <author>Anonymous</author>
                                        <pubDate>Sat Apr 23, 2005 8:43 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=898#898</guid>
                                      </item></channel></rss>