Karmic and Luks: USB drive encryption made (almost) easy
Pubblicato da Luigi il 26 Novembre 2009 in LinuxI discovered today that in Karmic there is an option to format encrypted usb disks.
But first of all you need to install the support for this feature; from the terminal:
$ sudo apt-get install cryptsetup
When you plug in your USB disk, and mount it, you'll see an icon on your desktop. Right-clicking on it and selecting "Format" will let you to specify an encrypted filesystem type:


Clicking to "Format" button will ask you to type the password for the encrypted volume:

At this point the format will proceed and, after, the USB drive will be mounted with an open lock icon:

If you want to change the password it should be possible from the "Disk Utility" (System>Administration>Disk Utility, or type "palimpsest" at the command line), but it seems to be buggy, as it always gives me "Incorrect Passphrase. Try again".
Command line tools always helps in those cases.
First step, add the new password for the volume:
$ sudo cryptsetup luksAddKey /dev/sdb [sudo] password for luigi: (my system admin password) Enter any LUKS passphrase: (any password registered to this volume) key slot 0 unlocked. Enter new passphrase for key slot: (the new password) Verify passphrase: (the new password again) Command successful.
Second step, dump all the key password for the volume:
$ sudo cryptsetup luksDump /dev/sdb
LUKS header information for /dev/sdb
Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 1032
MK bits: 128
MK digest: c8 97 18 80 0c 0a 86 ed 8f 3c 85 03 e1 de de 2d 68 ed 70 a0
MK salt: 16 ae 5b 05 2c 2b 02 d5 af 0d 71 d7 08 ba 51 fd
9f 98 cd 11 52 e8 14 44 71 4f 84 53 99 02 97 c7
MK iterations: 10
UUID: c4ada688-3cae-4053-a1c6-781614ad683f
Key Slot 0: ENABLED
Iterations: 447466
Salt: 63 30 36 1f 87 83 f6 73 75 e9 a2 b2 dc f1 30 4c
09 67 1d e7 82 71 35 6c c4 df ce 10 0e 3b 42 2f
Key material offset: 8
AF stripes: 4000
Key Slot 1: ENABLED
Iterations: 451004
Salt: 55 c4 d0 4f e9 24 d8 c0 2a cb b2 7f 09 a1 80 98
4f 4d 1a 5e 6f 1c d5 ad c2 30 a3 02 15 9d 1e bd
Key material offset: 136
AF stripes: 4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
Third step: remove the old password:
$ sudo cryptsetup luksKillSlot /dev/sdb 0 Enter any remaining LUKS passphrase: key slot 1 verified. Command successful.
Unmount the volume and try the new password. It should work.
Of course it would be better to have the "change password" feature in the context menu of the mounted volume, or at least having the feature working in the "Disk Utility" program. But, you know, it's Linux, and you need to hack it sometimes
It seems also that LUKS is supported on Windows, see here.
Another good, portable, free, and more complete solution to encrypted filesystems is the great TrueCrypt.
For the experts, a useful command-line HOWTO on using LUKS: http://ubuntuforums.org/showthread.php?t=404346.
Cerca
Calendario
| L | M | M | G | V | S | D |
|---|---|---|---|---|---|---|
| « Set | Dic » | |||||
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | ||||||
Archivi
- Gennaio 2010 (2)
- Dicembre 2009 (1)
- Novembre 2009 (3)
- Settembre 2009 (2)
- Agosto 2009 (4)
- Luglio 2009 (1)
- Giugno 2009 (2)
- Maggio 2009 (4)
- Aprile 2009 (2)
- Marzo 2009 (7)
- Febbraio 2009 (5)
- Gennaio 2009 (2)
- Dicembre 2008 (1)
- Novembre 2008 (8)
- Ottobre 2008 (12)
- Settembre 2008 (3)
- Agosto 2008 (2)
- Luglio 2008 (6)
- Giugno 2008 (16)
- Maggio 2008 (2)
- Aprile 2008 (3)
- Marzo 2008 (6)
- Ottobre 2007 (1)
- Settembre 2007 (1)
- Agosto 2007 (5)
- Luglio 2007 (6)
- Giugno 2007 (6)
- Maggio 2007 (1)
- Marzo 2007 (1)
- Febbraio 2007 (2)
- Gennaio 2007 (1)
- Dicembre 2006 (2)
- Novembre 2006 (4)
- Ottobre 2006 (7)
- Settembre 2006 (1)
- Agosto 2006 (2)
- Luglio 2006 (6)
- Giugno 2006 (3)
- Febbraio 2006 (1)
- Gennaio 2006 (1)
- Dicembre 2005 (5)
- Novembre 2005 (2)
- Ottobre 2005 (2)
- Settembre 2005 (7)
- Agosto 2005 (2)
- Luglio 2005 (8)
- Giugno 2005 (12)
Categorie
- Books (7)
- Eclipse (10)
- Errors (2)
- Firefox (7)
- Hardware (14)
- Horror Code (8)
- Internet (17)
- Java (85)
- JavaScript (8)
- Life, universe and everything (29)
- Linux (44)
- Mac (18)
- Software (25)
- Speeches and Conferences (8)
- Web (19)
- Windows (16)
Ultimi Post
- Syntactic sugar and Java arrays.
- 3G USB Stick on Ubuntu
- Ipod touch with Linux
- Karmic and Luks: USB drive encryption made (almost) easy
- Suspend/Resume in Karmic /2
- Suspend/Resume problem in Ubuntu Karmic 9.10 running on MacBook Pro 5.1
- MacBook International Keyboard and Linux
- Mighty Mouse: reverse horizontal scrolling workaround on Ubuntu Linux 9.04
- Skype 2.1.0.47 beta released, and amd64 packages available!
- Linux RAM Disks
My open source projects
Blog License
Blogs I like
Friends' Blogs
- Antonio Terreno & Valter Bernardini
- Bruno Bossola
- Daniele Galluccio
- Domenico Ventura
- Ed Schepis
- Fabrizio Gianneschi
- Filippo Diotalevi
- JavaJournal.it Blog
- Luca Grulla
- Luigi Zanderighi
- Marcello Teodori
- Mida Boghetich
- Muralidharan Chandrasekaran
- Piero Ricca
- Renzo Borgatti
- Simone Bordet
- Uberto Barbini
- Valvolog
- Webtide blogs (Greg Wilkins & Jan Bartel)
Links








Nessun Commento a “Karmic and Luks: USB drive encryption made (almost) easy”
Attendere prego
Lascia un Commento