What is the easyest way to set encrypted partition under linux?

Basically, what I want is to have fixed size file in my home folder. When I mount it and type password, it should appear as regular folder. I should also be able to umount it.

If it would be possible to prevend other users, including root, to access it while mounted, it would be a bonus.

It shouldn't depend on any kernel featueres or configuration, cause I want to be able to mount it later on another computer.

link|improve this question
1  
This question needs a better title. It has nothing to do with partitions, and it does not say it is about encryption for one user only. I'm inclined to move this one to superuser. – Teddy Jul 9 '09 at 11:08
feedback

4 Answers

up vote 10 down vote accepted

Your last requirement screams 'Truecrypt'. There are some other options (like EncFS and luks / cryptsetup), but I wouldn't exactly call those 'easy' if you do not set them up during installation. A Truecrypt volume is most likely not a partition, it would be a file, but from your question, I guess that would be ok.

If mounted, root would be able to read it though, and I doubt a solution exists where root would be banned from reading the mounted partition / file. After all, root is God. I suppose you would be able to mimic what you want on a system with SELinux in strict mode, but building such a system is opening up a huge can of worms by itself.

So: Truecrypt.

link|improve this answer
Got to agree - truecrypt ticks all the boxes - and if you are using a file as a virtual partition ... it can be copied and mounted on other machines as well. I've used Truecrypt volume files to copy files between Linux and Windows :) – Iain Jun 3 '09 at 14:54
feedback

As an alternative to TrueCrypt, here a nice article from Linux Journal : Protecting Files at Home Using Encrypted Containers.

link|improve this answer
feedback

What you want is not called an encrypted "partition". What you probably meant was "volume". For encrypted actual partitions, LUKS /cryptsetup is by far the more sensible tool.

link|improve this answer
Thanks, title fixed – Marko Kocić Jul 16 '09 at 17:29
feedback

I second the above answer, Trucrypt is definitely your tool of choice.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.