LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-07-2004, 07:35 PM   #1
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 50
Encrypting harddrive


I have a laptop. I have one harddrive in it, and I want to encrypt all data here. I want to encrypt it with a certificate which should be placed on an USB-key. And that USB-key should be encrypted with a password.

Can this be done and how?
 
Old 12-07-2004, 08:38 PM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
with DM-CRYPT.
dm-crypt is a kernel module.. see if dm-crypt is compiled in your system by attempting to "modprobe dm-crypt" if it fails, then you will need to re-compile your kernel with dm-crypt support. (its in the RAID and LMV section, althought you dont need to enable RAID or LMV to use dm-crypt).

also, i would recomend againsed encrypting the whole system, this is pointless... instead, just encrypt your home parttion and swap space.


to encrypt your swap space, just add 2 lines in the boot script before the line that enables swap, make it first setup an encrypted device map using /dev/urandom as the encryption key, then reformat the device map as swap (this takes less than a second)

then mount the home directory in the same way, but use the USB thumb drive as the key instead of /dev/urandom.

this will create a very secure system.
 
Old 12-08-2004, 03:41 AM   #3
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
It's worth mentioning that dm-crypt is only in recent versions of the 2.6 kernel.

For 2.4 kernels, checkout the Disk Encryption HOWTO.

Enjoy!
--- Cerbere
 
Old 12-08-2004, 09:14 AM   #4
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 50
Hm, ok. I uses 2.6-kernel so dm-crypt should be easy to use.

But can I get a reason why I should not encrypt more then just the swap and home-dir? If I have only one harddrive maby I should make a couple of partitions and encrypt all but the one that is the boot-partition?
 
Old 12-08-2004, 12:04 PM   #5
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
Encryption is used to keep your data secret....
whats the point in encrypting all your prpgrams like The Linux kernel and kde and xmms media player ?

whats the point in encrypting programs that are freely available on the internet... encrypting your /usr/ /lib/ /opt and other binary folders is absolutly pointless, it will just make installing linux extremely complicated, slow booting times, and generally.. its useless...

you only need to encrypt your home directory (to keep your own files safe)
you need to encrypt the swap space to keep application data safew after a shutdown (although this is a little paranoid)

you MAY also want to encrypt the /tmp and /var partiton...if you want to keeps your system logs secret.. but again, its a bit paranoid.
 
Old 12-08-2004, 09:16 PM   #6
Krugger
Member
 
Registered: Oct 2004
Posts: 229

Rep: Reputation: 30
look for loopback crypto, I believe there was a program that was losetup tha came with a CryptoAPI patch. I think it was for 2.4 and than was integrated into the kernel source. Anyway I saw it in Gentoo sources.
 
Old 12-09-2004, 07:20 AM   #7
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
Quote:
look for loopback crypto, I believe there was a program that was losetup tha came with a CryptoAPI patch. I think it was for 2.4 and than was integrated into the kernel source. Anyway I saw it in Gentoo sources.
i would recomend againsed this strongly.
for reasons documented in the dm-crypt kernel documentation.

crypto-loop is based on buggy loopback driver code.
its genratlly a sloppy, messy way of doing drive encryption, and requires you to patch many system ptograms like losetup, and mount.

dm-crypt is the replacement to crypto-loop.

its many times easyer to use, and far more functional.

crypto-loop does not allow you to use USB thunmbdrives or floppy disks as encryption keys.. but dm-crypt does.
 
Old 07-26-2005, 04:13 AM   #8
rino.caldelli
Member
 
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181

Rep: Reputation: 31
I have 2.6.12.3 kernel and can't find the dm-crypt module!!!

I enabled all crypto modules, I disabled loopback, enabled multi device support RAID LVM >> device mapper support....

somethiing wrong missing????
 
Old 07-29-2005, 08:11 AM   #9
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Rep: Reputation: 30
what do you think? ( http://linuxreviews.org/howtos/secur...ingToTheFuture)

Quote:
Linux 2.6 also introduces dm-crypt, an encryption layer for the Device-mapper which looks quite elegant. Unfortunately, it's not safe! Hopefully someday it will be fixed, but in the mean time the best course is to stick with loop-AES.
 
Old 07-31-2005, 10:55 PM   #10
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
from your quote source...
Quote:
My recommendation is plain and simple: Do not use cryptoloop, dm-crypt (kernel < 2.6.10), or loop-AES in single-key mode - you don't want to commit security malpractice, do you?
current stable linux kernel is 2.6.12.

so the usual advice sticks, keep your kernel up to date, and use dm-crypt instead of the old broken crypto-loop.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing linux on 2nd harddrive(dual boot) windows on seperate harddrive lysol Linux - Software 25 08-03-2004 09:33 AM
encrypting emails WannaLearnLinux Linux - Security 6 07-12-2004 01:57 AM
Need to replace full harddrive with new, larger harddrive pearlr Linux - Newbie 1 01-02-2004 12:59 PM
Encrypting backups beaucoup Linux - Security 11 11-24-2003 08:09 PM
encrypting im1crazyassmofo Linux - General 1 04-20-2003 09:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration