Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have some data that I want to encrypt in a single folder. I only need it rarely, so I would like to be asked for a pass phrase every time.

Preferably I could still back up the folder encrypted, and open it with the passphrase on another machine.

What approach shall I take?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

If you want a graphical interface that integrates well with gnome, try cryptkeeper.

The home page is here : http://tom.noflag.org.uk/cryptkeeper.html

It is in the ubuntu repositories.

Other options include Truecrypt, ecryptfs, and LUKS.

ecryptfs is also in the ubuntu repository,and should be installed by default, If it is not:

sudo apt-get install ecryptfs-utils

Make an encrypted directory, to be decrytped when you log in with

ecryptfs-setup-private

To make a directory that is not automatically decrypted when you log in you will need root access

mkdir ~/secret
chmod 700 secret

Encrypt the directory

sudo mount -t ecryptfs ~your_user/secret ~your_user/secret

You will be asked to enter a passphrase and a number of additional questions. Go with the defaults (hit enter) but answer y (yes) to "Enable filename encryption (y/n) [n]:" to encrypt file names.

Place any data you wish encrypted in ~/secret .

To encrypt the data

sudo umount ./secret

To decrypt the data, mount the directory again

To make it easier you can give the options you desire to the mount command with the -o flag (all one line)

sudo mount ~your_user/secret~your_user/secret -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=no,ecryptfs_enable_filename_crypto=yes

Either make an alias in ~/.bashrc or make a custom launcher.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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