Seven key tools for encryption/decryption and password-protected files in Linux (1)
Encryption refers to the process of encoding a file, so that only authorized persons can access the file. Before the advent of computers, humans began to use encryption. During a war, humans transmit information that can be understood only by their tribe or related personnel.
The Linux release provides several standard encryption/Decryption tools, which are sometimes easy to use. This article describes these seven tools and provides standard examples to help you encrypt, decrypt, and protect your files.
1. GnuPG
The full name of GnuPG is GNU Privacy Guard, often known as GPG. It integrates a set of encryption software. It is written by the GNU project in C programming language. The latest stable version is 2.0.27.
In most Linux distributions today, the gnupg package is installed with it by default, so in case it is not installed, you can use apt or yum to install it from the software library.
$ sudo apt-get install gnupg# yum install gnupg
We have a fuse file (tecmint.txt) located in ~ /Desktop/Tecmint/. This file will be used in the following examples.
View the content of the text file before taking the next step.
$ cat ~/Desktop/Tecmint/tecmint.txt
View File Content
Now, use the gpgencryptiontecmint.txt file. When you run the gpccommand with a letter (completely encrypted using the symmetric encryption algorithm, a file texmint.txt. gpg will be generated. You can list and confirm the contents of the folder.
$ gpg -c ~/Desktop/Tecmint/tecmint.txt$ ls -l ~/Desktop/Tecmint
Encrypted Files in Linux
Note: Paraphrase is entered twice to encrypt the specified file. The above encryption is automatically completed by the CAST5 encryption algorithm. You can specify different algorithms.
To view all the provided encryption algorithms, run this command.
$ gpg --version
View encryption algorithms
Rule. gpg, do not touch it.
$ rm ~/Desktop/Tecmint/tecmint.txt$ gpg ~/Desktop/Tecmint/tecmint.txt.gpg
File decryption in Linux
Note: When prompted, you must provide the same password entered during encryption before decryption.