Can you tell me that how encryption and decryption of files and folders work in linux or Ubuntu 12.04 LTS ? And also tell me how i can implement encryption and Decryption of files and folders in Ubuntu during Log in and Log off?
In essence, you have three main options:
If you did not choose option 1. or 2. during installation of Ubuntu, the simplest solution is to select option 3, or, which is far more complex, migrate your home to an encrypted directory (see this guide).
Option 3, in a simple form, creates an encrypted folder called ".Private" in your home directory, and while you are logged in, you can view your files in a decrypted form in a folder called "Private" (without a dot). To do that, open a terminal window (press CtrlAltT), and copy the following commands:
You will be asked first for your login password, and then for another password to encrypt the directory.
An alternative to the above is using encfs to encrypt just any directory on your disk; however, a little more command line will be necessary.
To setup a directory encrypted in /path/to/encrypted and accessible in decrypted form in /path/to/decrypted, do
The first time you run it for a given directory, you will be prompted for a password and a few setup options. To unmount it (such that no decrypted files are visible), type
To mount it again ("decrypt" it), type again