Seven key tools for encryption/decryption and password-protected files in Linux (1)

Source: Internet
Author: User
Tags gnupg

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.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.