# How to make an encrypted directory

If you want to make an encrypted directory, for instance when you want to store private information, and you want to access it seamless on your computer, this is how to do it. It will be available after mounting it with a password.

*This wiki is not about an encrypted filesystem.*

# Installation

Install the package 'encfs'.

OpenSUSE:

`#zypper in encfs`

# Configuration

Now you have to create 2 directories.

1. One will contain the **encrypted**, unreadable data. The files will be stored here. But do nothing with this directory.
2. The second will be used as a sort of 'mount point', where the **unencrypted** data will appear. You must **read and write** *this location.*

You can use any name. Here I have chosen the following:

`#mkdir ~/.encrypted ~/unencrypted`

I choose a name starting with a period ('.') for the encrypted dir because this will hide it from normal viewing, as there is nothing to see anyway :)

Now start the installation:

`#encfs ~/.encrypted ~/unencrypted`

```
Creating new encrypted volume.
Please choose from one of the following options:
 enter "x" for expert configuration mode,
 enter "p" for pre-configured paranoia mode,
 anything else, or an empty line will select standard mode.
```

Press \[enter\] for standard mode

```
Standard configuration selected.

Configuration finished.  The filesystem to be created has
the following properties:
Filesystem cipher: "ssl/aes", version 2:2:1
Filename encoding: "nameio/block", version 3:0:1
Key Size: 192 bits
Block Size: 1024 bytes
Each file contains 8 byte header with unique IV data.
Filenames encoded using IV chaining mode.
File holes passed through to ciphertext.

Now you will need to enter a password for your filesystem.
You will need to remember this password, as there is absolutely
no recovery mechanism.  However, the password can be changed
later using encfsctl.

New Encfs Password:
Verify Encfs Password:
```

And there you have it!

# Usage

To use the encrypted directory, place some files in the unencrypted directory. You notice that the same amount of files are created in the encrypted directory, but with encrypted names and encrypted contents.

You can use the unencrypted dir as you would with any normal dir.

If you want to stop using the files, you can logout or unmount manually.

Make sure that it is not the current directory.

`#fusermount -u ~/unencrypted`

To use it again:

`#encfs ~/.encrypted ~/unencrypted`

And that's it!