File Encryption in Linux,
In a Digital world most of all out data’s are out of threat, out of all our personal details such as pass-phrase details, digital signatures are prone to a great danger.
But most of you have ever tried to encrypt your files in Linux to keep it secure. if so here come a very sample demo to encrypt and get secured.
gpg – GnuPG (Gnu Privacy Guard) is a command line tool in Linux and Unix-Operating Systems that secure communication data and data storage. It can be used to encrypt data and to create digital signatures. It includes an advanced key management facility.
here is the tutorial of step by step procedure begins
Open Terminal, In Ubuntu (Applications -> Accessories -> Terminal) or keyboard shorcut Ctrl+Alt+T
Now go to the directory in which the file you need to be encrypted is present
In my case i have in the path -> /home/uppili/Downloads/demo
so my terminal command to change the directory is
$ cd Downloads/demo/
then to view my files present in it
to encrypt the file the command is
$ gpg -c file_name
so the file named “file_name” gets encrypted
In my case
$ gpg -c invitation.jpeg
I will now ask for a Pass-phrase, so you need to enter a pass-phrase i.e password to encrypt the file and please remember this password because only using this you can decrypt and get back the original file.
Then you need to retype the same pass-phrase again retype it in-order to provide a confirmation to encrypt the file.
A new file with ” file_name.gpg ” will be created
In my case invitation.jpeg.gpg is created
now you can delete the original file, i.e ”file_name “.
Now your file is secured, and to decrypt back your file to get back the original file use this,
$ gpg file_name.gpg
in my case
$ gpg invitation.jpeg.gpg
This time it will prompt for the Pass-phrase which you used to encrypt this file. This is how you can Encrypt and Decrypt your files, so they are secured.
now its time to get your hands dirty
practice makes a man perfect
lets get hand-on and try