Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Encrypting filesystem - what and how?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
BeteNoire
Veteran
Veteran


Joined: 25 Sep 2005
Posts: 1827

PostPosted: Sun Feb 07, 2010 3:46 pm    Post subject: [SOLVED] Encrypting filesystem - what and how? Reply with quote

Better late that never - I've decided to encrypt some partitions on my systems.

The questions is - what filesystem and what encrypting utility should I use?

I need to encrypt 150 GiB large multimedia partition with my private data, that for 95% of time is only for reading. What filesystem should I use? Until now it was xfs formatted partition as some benchmark told me is most stable and efficient for large partitions with big files - from few MiB to few GiB. Now I'm in doubt if xfs will work correctly when encrypted.

I want to encrypt /home partitions too, which all are reiserfs formatted. These are mostly small, few GiB partitions used to store configs, emails, docs and some other private data in tiny files.

And the basic thing - what encrypting utility should I use? Which one is the most stable and efficient? I am not a tester so I need trusty solution.
_________________
powered by power plant


Last edited by BeteNoire on Mon Apr 05, 2010 8:44 am; edited 1 time in total
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 12849
Location: Ste-Foy,Canada

PostPosted: Sun Feb 07, 2010 3:53 pm    Post subject: Reply with quote

I will double check this thread for sure, because I have no idea on how to do that :P
_________________
Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec
Back to top
View user's profile Send private message
Rexilion
l33t
l33t


Joined: 17 Mar 2009
Posts: 961

PostPosted: Sun Feb 07, 2010 4:20 pm    Post subject: Re: Encrypting filesystem - what and how? Reply with quote

d2_racing wrote:
I will double check this thread for sure, because I have no idea on how to do that :P


???

BeteNoire wrote:
Better late that never - I've decided to encrypt some partitions on my systems.

The questions is - what filesystem and what encrypting utility should I use?

I need to encrypt 150 GiB large multimedia partition with my private data, that for 95% of time is only for reading. What filesystem should I use? Until now it was xfs formatted partition as some benchmark told me is most stable and efficient for large partitions with big files - from few MiB to few GiB. Now I'm in doubt if xfs will work correctly when encrypted.

I want to encrypt /home partitions too, which all are reiserfs formatted. These are mostly small, few GiB partitions used to store configs, emails, docs and some other private data in tiny files.

And the basic thing - what encrypting utility should I use? Which one is the most stable and efficient? I am not a tester so I need trusty solution.


I use luks for encryption, why?
- Allows you to use your own filesystem (ext{2,3,4}, xfs etc etc) (seems like a important feature to you)
- Not distro specific (i.e. Ubuntu encrypts home directory's with ecryptfs, I have no idea on how to move that to gentoo)
- Luks however works in every distro without having to remember all sorts of parameters and comparing versions (the format is stable/universal).
- All parameters required for decrypting the partition are stored in the partition header (no need for you to specify any unlike ecryptfs)
- It's stable
Back to top
View user's profile Send private message
zyko
l33t
l33t


Joined: 01 Jun 2008
Posts: 617
Location: Munich, Germany

PostPosted: Mon Feb 08, 2010 4:00 pm    Post subject: Reply with quote

Definitely dm_crypt with LUKS. The front end utility you need is sys-fs/cryptsetup. Google for some tutorials, there are a lot.
Back to top
View user's profile Send private message
pdr
Guru
Guru


Joined: 20 Mar 2004
Posts: 548

PostPosted: Mon Feb 08, 2010 4:16 pm    Post subject: Reply with quote

Already supported by baselayout. Check out /etc/conf.d/dmcrypt

For example I encrypt my home directory. File contains:

Code:
target=home
source=/dev/sda5


When booting while you are getting the green "OK" at the right, will stop and prompt for luks passphrase - then do a luksOpen to create (in my case) /dev/mapper/home and then mount that to /home. I think can use a key on a thumb drive or something, but I use pass phrase. You can also uncomment a line in there to encrypt your swap (to, for example, make sure a copy of your passphrase doesn't end up in there unencrypted).


Last edited by pdr on Mon Feb 08, 2010 4:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2277
Location: /home/zach

PostPosted: Mon Feb 08, 2010 4:16 pm    Post subject: Reply with quote

Is TrueCrypt not recommended much anymore?
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 12849
Location: Ste-Foy,Canada

PostPosted: Mon Feb 08, 2010 5:45 pm    Post subject: Reply with quote

Yeah, I don't see it much nowadays.
_________________
Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec
Back to top
View user's profile Send private message
pigeon768
l33t
l33t


Joined: 02 Jan 2006
Posts: 617

PostPosted: Tue Feb 09, 2010 8:11 am    Post subject: Re: Encrypting filesystem - what and how? Reply with quote

BeteNoire wrote:
The questions is - what filesystem and what encrypting utility should I use?
I use ext4 on top of dm-crypt+luks (I use cryptsetup as a frontend) and it works great.

I don't see why xfs or any other filesystem wouldn't work. dm_crypt uses the same block interface that lvm or mdraid use. It shouldn't be any different than a normal block device.
_________________
My political bias.
Back to top
View user's profile Send private message
WastingBody
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2008
Posts: 105

PostPosted: Tue Feb 09, 2010 4:30 pm    Post subject: Reply with quote

If you don't want to enter an extra password to mount an encrypted volume you can use pam_mount. Pam_mount will mount a specified volume when the user logs into via a login manager or a terminal.
Back to top
View user's profile Send private message
zyko
l33t
l33t


Joined: 01 Jun 2008
Posts: 617
Location: Munich, Germany

PostPosted: Tue Feb 09, 2010 5:14 pm    Post subject: Reply with quote

Quote:
Is TrueCrypt not recommended much anymore?


Without going into too much details: There are several peculiarities about the TrueCrypt project. For example, TrueCrypt doesn't seem to have a public bugtracker or viable changelogs, which is strange for such a security-sensitive piece of software. I'd say TrueCrypt is the worst choice among all open-source solutions due to its lack of transparency.
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 12849
Location: Ste-Foy,Canada

PostPosted: Tue Feb 09, 2010 8:36 pm    Post subject: Reply with quote

Thanks for the info, I understand a little bit more why we don't see that much on the forum.
_________________
Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec
Back to top
View user's profile Send private message
bobspencer123
Guru
Guru


Joined: 19 Dec 2005
Posts: 541

PostPosted: Tue Feb 09, 2010 9:25 pm    Post subject: Reply with quote

this looks like a great wiki. I read through it and it is pretty intense and thorough.

http://en.gentoo-wiki.com/wiki/DM-Crypt_with_LUKS
_________________
Increasingly becoming a 2 channel audio nut!
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2277
Location: /home/zach

PostPosted: Wed Feb 10, 2010 12:15 am    Post subject: Reply with quote

zyko wrote:
Quote:
Is TrueCrypt not recommended much anymore?


Without going into too much details: There are several peculiarities about the TrueCrypt project. For example, TrueCrypt doesn't seem to have a public bugtracker or viable changelogs, which is strange for such a security-sensitive piece of software. I'd say TrueCrypt is the worst choice among all open-source solutions due to its lack of transparency.


Thank you very much for the explanation. I had never even noticed these deficits! I will look into LUKS+dm_crypt and further information.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 12849
Location: Ste-Foy,Canada

PostPosted: Wed Feb 10, 2010 12:56 pm    Post subject: Reply with quote

@bobspencer123, thanks, I'm gonna read that wiki for sure :P
_________________
Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2277
Location: /home/zach

PostPosted: Wed Feb 10, 2010 8:08 pm    Post subject: Reply with quote

d2_racing wrote:
@bobspencer123, thanks, I'm gonna read that wiki for sure :P


Me too! ;) Thank you bobspencer123.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
BeteNoire
Veteran
Veteran


Joined: 25 Sep 2005
Posts: 1827

PostPosted: Fri Feb 12, 2010 4:32 pm    Post subject: Reply with quote

Thx for all replies, I'll give a chance to dm-crypt and luks, and if fs doesn't matter I'll stay with those chosen before (xfs, rfs).

I have one doubt more: can I mount and access encrypted partition without giving additional password on boot?
Some howtos recommend using pam for this and all of my three gentoo boxes are pamless.
_________________
powered by power plant
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum