Using GNUPG for data encryption

Source: Internet
Author: User
Tags gnupg

One: Installation GnuPG

wget ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-2.1.1.tar.bz2

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/B3/wKioL1Si_yfSkNMYAAGTVTxkKEY024.jpg "title=" 1.png " alt= "wkiol1si_yfsknmyaagtvtxkkey024.jpg"/> Tar xf gnupg-2.1.1.tar.bz2

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/B6/wKiom1Si_vvDH_OGAAEcGqG_g9g113.jpg "title=" 2.png " alt= "Wkiom1si_vvdh_ogaaecgqg_g9g113.jpg"/>

./configure--prefix=/usr/local/gnupg && make && make check && make install

Here's an error.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/B3/wKioL1SjBHageo8oAAJpfH2vt7Y779.jpg "title=" 3.png " alt= "Wkiol1sjbhageo8oaajpfh2vt7y779.jpg"/>


is due to the lack of appropriate components to download and install on the OK

ftp://ftp.gnupg.org/gcrypt/libgpg-error/
ftp://ftp.gnupg.org/gcrypt/libgcrypt/
ftp://ftp.gnupg.org/gcrypt/libassuan/
ftp://ftp.gnupg.org/gcrypt/libksba/
ftp://ftp.gnu.org/gnu/pth/


Installation steps no more nonsense./configure--prefix=xxx && make && make install

After installing these components, repeat the above steps to install the GNUPG.


Second: After the installation is complete to introduce the basic life of the next GnuPG make

Basic syntax: GPG [options] [filename]

Three: GnuPG How to use

First generate a pair of key pairs using the parameter "--gen-key"

--gen-key

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/B6/wKiom1SjBt_jFKyzAADjaapdumY423.jpg "title=" 4.png " alt= "Wkiom1sjbt_jfkyzaadjaapdumy423.jpg"/>

Select the key algorithm here

General default

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/B3/wKioL1SjCLfiDBEhAAGA5MJp3Uw350.jpg "title=" 5.png " alt= "Wkiol1sjclfidbehaaga5mjp3uw350.jpg"/>

Select Key length

The longer the key is, the more secure it is, but the encryption is very slow. General default 1024 is available

Specify the validity period of the key

General choice for ordinary users never expires

and ask you for sure? Sure, Y.

Then you need to specify an ID to identify the selected key

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/B6/wKiom1SjCQzy81HMAAFjHmF77ro132.jpg "title=" 6.png " alt= "Wkiom1sjcqzy81hmaafjhmf77ro132.jpg"/>

Then enter O to determine

When determined, it pops up.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/B3/wKioL1SjChGQwRd1AABwOmiChT8537.jpg "title=" 7.png " alt= "Wkiol1sjchgqwrd1aabwomicht8537.jpg"/>

Enter the password you want to encrypt

At least 8 people

Then repeat the input again

And then you're sure to wait.

You will then be prompted to generate the key successfully

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/B6/wKiom1SjCq7xh5FaAAEanvsTE3o105.jpg "title=" 9.png " alt= "Wkiom1sjcq7xh5faaaeanvste3o105.jpg"/>


IV: Establishment of revoked certificates

Because when we generate a key that fails or otherwise cannot continue to be used, it is possible to revoke the certificate to declare that the previous key is no longer in effect

Options for generating a recycled certificate--gen-revok

Command: GPG--output lemon_revoke.asc--gen-revok Lemon

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/B3/wKioL1SjDvOR4FiZAACbS3ByQXQ905.jpg "title=" 10.png "alt=" Wkiol1sjdvor4fizaacbs3byqxq905.jpg "/>

Are you sure you want to create a revocation certificate? Of course Y

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/B6/wKiom1SjDqzzBA8kAADouyBut2c689.jpg "title=" 11.png "alt=" Wkiom1sjdqzzba8kaadouybut2c689.jpg "/>

What's the reason for this? And then two straight-down returns.

And ask you, is that OK? Y

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/B3/wKioL1SjECSgTAMNAADKF2dLle8855.jpg "title=" 12.png "alt=" Wkiol1sjecsgtamnaadkf2dlle8855.jpg "/>

Need to provide this user's private key

And then you're done, OK.

Then revoke the certificate to establish success



This article is from the "Champion Small Lemon" blog, please make sure to keep this source http://lemonit.blog.51cto.com/6043645/1597974

Using GNUPG for data encryption

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.