GPG(GnuPG)入门

下载:

https://gnupg.org/download/index.html

或者 http://www.hellopp.cn/page/5b9a1405c3f1f7d4116937ef

[Binary download 部分]

Download

Note that you may also download the GNU Privacy Guard from a mirror site close to you. See our list of mirrors. The table below provides links to the location of the files on the primary server only.

Top of Form

Bottom of Form

Source code releases

These are the canonical release forms of GnuPG. To use them you need to build the binary version from the provided source code. For Unix systems this is the standard way of installing software. For GNU/Linux distributions are commonly used (e.g. Debian, Fedora, RedHat, or Ubuntu) which may already come with a directly installable packages. However, these version may be older so that building from the source is often also a good choice. Some knowledge on how to compile and install software is required.

The table lists the different GnuPG packages, followed by required libraries, required tools, optional software, and legacy versions of GnuPG. For end-of-life dates see further down.

Name

Version

Date

Size

Tarball

Signature

GnuPG

2.2.10

2018-08-30

6503k

download

download

Libgpg-error

1.32

2018-07-12

883k

download

download

Libgcrypt

1.8.3

2018-06-13

2919k

download

download

Libksba

1.3.5

2016-08-22

606k

download

download

Libassuan

2.5.1

2017-12-07

551k

download

download

ntbTLS

0.1.2

2017-09-19

334k

download

download

nPth

1.6

2018-07-16

293k

download

download

Pinentry

1.1.0

2017-12-03

456k

download

download

GPGME

1.11.1

2018-04-20

1385k

download

download

GPA

0.9.10

2016-11-19

745k

download

download

GnuPG 1.4

1.4.23

2018-06-11

3661k

download

download

GnuPG distributions are signed. It is wise and more secure to check out for their integrity.

Remarks:

  • Pinentry is a collection of passphrase entry dialogs which is required for almost all usages of GnuPG.
  • GPGME is the standard library to access GnuPG functions from programming languages.
  • GPA is a graphical frontend to GnuPG.
  • GnuPG 1.4 is the old, single binary version which still support the unsafe PGP-2 keys. This branch has no dependencies on the above listed libraries or the Pinentry. However, it lacks many modern features and will receive only important updates.

GnuPG binary releases

In general we do not distribute binary releases but leave that to the common Linux distributions. However, for some operating systems we list pointers to readily installable releases. We cannot guarantee that the versions offered there are current. Note also that some of them apply security patches on top of the standard versions but keep the original version number.

OS

Where

Description

Windows

Gpg4win

Full featured Windows version of GnuPG

download sig

Simple installer for the current GnuPG

download sig

Simple installer for GnuPG 1.4

OS X

Mac GPG

Installer from the gpgtools project

GnuPG for OS X

Installer for GnuPG

Debian

Debian site

GnuPG is part of Debian

RPM

rpmfind

RPM packages for different OS

Android

Guardian project

Provides a GnuPG framework

VMS

antinode.info

A port of GnuPG 1.4 to OpenVMS

RISC OS

home page

A port of GnuPG to RISC OS

End-of-life announcements

We announce the end-of-life date for a current stable version at the time a new stable version is released. We maintain old branches for at least two years. For GnuPG 2.2 we consider 2.1.0 as the birth of this new stable branch. For the other packages we don't maintain branches and thus there is no end-of-life; always use the latest version.

Package

Ver.

End-of-life

Birth

GnuPG

1.0

2002-09-07

1999-09-07

1.2

2005-01-01

2002-09-21

1.4

none (1)

2004-12-16

2.0

2017-12-31

2006-11-11

2.2

tba

2014-11-06

Libgcrypt

1.5

2016-12-31

2011-06-29

1.6

2017-06-30

2013-12-16

1.7

2019-06-30

2016-04-15

1.8

tba

2017-07-18

  • tba: To be announced.
  • (1): Legacy version; see remarks above.

[下载完Windows版本以后]:

Get started – your next steps:

  1. Check integrity of the downloaded Gpg4win installer!
  2. Install Gpg4win.
  3. Create an OpenPGP key pair with Kleopatra. Sign/encrypt a file and email to yourself for testing.
  4. Read more about the public key method (see chapter 1-5 inGpg4win Compendium).
  5. Ask your questions and report your problems to Gpg4win Community.

[下载完Windows版本后,会提示是否打开Kleopatra], Kleopatra的帮助文件在这里]:

https://docs.kde.org/stable5/en/pim/kleopatra/index.html

Kleopatra是个桌面工具, 应该是用来代替命令行的,

下面看看命令行怎么用:

What is GPG, and how do I use it to encrypt files on IU's research computing systems?

From:  https://kb.iu.edu/d/awio

或者: http://www.hellopp.cn/page/5b99c5311d266bd4494282ea

GNU Privacy Guard (GPG, also GnuPG) is free encryption software that's compliant with the OpenPGP (RFC4880) standard. Using GPG you can encrypt (and decrypt) files that contain sensitive data, such as protected health information (PHI) regulated by the Health Insurance Portability and Accountability Act (HIPAA) privacy and security rules. For more on GPG, see the GNU Privacy Guard website.

At Indiana University, GPG is installed as a command-line application in the default user environments on Big Red IICarbonate, and Karst. To use GPG, you create a unique encryption key, and then use that key to encrypt and decrypt your files. If you need help using GPG on IU's research computing systems, contact the UITS Scientific Applications and Performance Tuning (SciAPT) team.

On this page:


Creating an encryption key

To create a unique key for encrypting and decrypting files with GPG:

  1. Make sure gpg-agent is running; on the command line, enter:
  gpg-agent -s --daemon --write-env-file --use-standard-socket

You will see something like the following (in which username is your Network ID username and Machine is the name of the system):

  GPG_AGENT_INFO=/N/u/username/Machine/.gnupg/S.gpg-agent:22743:1; export GPG_AGENT_INFO;
 
这是gpg-agent没有运行的时候做的, 通常安装完以后会自动运行了,就不用这一步了,执行一下也没有关系,会给出提示gap-agen已经运行了.
  1. On the command line, enter:
  2. You will see something like the following (in which username is your Network ID username and Machine is the name of the system):
  gpg --gen-key
  gpg (GnuPG) 2.0.14; Copyright (C) 2009 Free Software Foundation, Inc.
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  
  gpg: keyring `/N/u/username/Machine/.gnupg/secring.gpg' created
  gpg: keyring `/N/u/username/Machine/.gnupg/pubring.gpg' created
  Please select what kind of key you want:
     (1) RSA and RSA (default)
     (2) DSA and Elgamal
     (3) DSA (sign only)
     (4) RSA (sign only)
  Your selection?

Enter 1 to select the default key.

  1. GPG will prompt you to choose a keysize (in bits). Enter 1024.

You will see:

  Requested keysize is 1024 bits
  Please specify how long the key should be valid.
           0 = key does not expire
          = key expires in n days
        w = key expires in n weeks
        m = key expires in n months
        y = key expires in n years
  Key is valid for? (0)

Enter a value to specify how long the key should remain valid (e.g., for two days, 3w for three weeks, 10mfor 10 months, or for no expiration date).

  1. GPG will prompt you to confirm the expiration date. If the correct date is displayed, enter y.
  2. GPG will prompt for information it will use to construct a user ID to identify your key. At the prompts, enter your name, email address, and a comment.
  3. GPG will prompt you to confirm or correct your information. You'll see a prompt something like this:
  4. If the information displayed is correct, enter to accept the user ID. To correct errors or quit the process, enter the appropriate alternative ( n e, or ).
  5. If you accept the user ID, GPG will prompt you to enter and confirm a password. Afterward, GPG will begin generating your key. You'll see:
  You selected this USER-ID:
      "Full Name (comment) <username@iu.edu>"
 
  Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit?
  We need to generate a lot of random bytes. It is a good idea to
  perform some other action (type on the keyboard, move the mouse,
  utilize the disks) during the prime generation; this gives the
  random number generator a better chance to gain enough entropy.

This process may take several minutes to complete. When it's finished, you will see something like:

  gpg: key 09D2B839 marked as ultimately trusted
  public and secret key created and signed.
  
  gpg: checking the trustdb
  gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
  gpg: depth: 0  valid:   4  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 4u
  gpg: next trustdb check due at <expiration_date>
  pub   1024R/09D2B839 2013-06-25 [expires: <expiration_date>]
        Key fingerprint = 6AB2 7763 0378 9F7E 6242  77D5 F158 CDE5 09D2 B839
  uid                  Full Name (comment) <username@indiana.edu>
  sub   1024R/7098E4C2 2013-06-25 [expires: <expiration_date>]

You can now use the key (until it expires) to encrypt files in your account (for instructions, see the next section).

我执行2-9步的时候,只要求输入名字和邮箱,

然后会弹出对话框让输入密码,应该就是所谓的私钥.

然后就提示文件已经创建成功了以及文件所存的路径,是一个rev文件,打开会,里面存的是公钥.

Back to top

Encrypting a file

To encrypt a file using a GPG key you created, on the command line, enter (replace user_id with the email address you specified when you created the key and my_file with the name of the file to encrypt):

  gpg -e -r user_id my_file

GPG will create an encrypted version of the file you specified; the encrypted file will have a .gpg file extension (e.g., my_file.gpg). After confirming the encrypted version has been created, you can delete the original unencrypted file.

这里输入的user_id就是创建key的时候输入的邮箱.

创建出来的加密文件是原有的文件名加上.gpg

Back to top

Decrypting a file

To decrypt a .gpg file (e.g., my_file.gpg), on the command line, enter:

  gpg my_file.gpg

GPG will prompt you for the password associated with the key you used to encrypt the file. When you enter the correct password, GPG will recreate the original, unencrypted version of the file (e.g., my_file). This process does not delete or alter the encrypted version of the file (my_file.gpg).

执行这个命令的时候会弹出创建key的时候要求你输入的密码,这个应该就是所谓的私钥.

Back to top

Related documents

Useful GPG commands

This is document awio in the Knowledge Base. 
Last modified on 2017-12-12 15:08:56.

GPG(GnuPG)入门的更多相关文章

  1. gpg 使用入门

    1. 生成秘钥 gpg --full-generate-key 等价于 gpg --full-gen-key Real name: yellowconvict为该秘钥的名字,也称为 USER-ID 在 ...

  2. GPG入门教程

    原文地址:http://www.ruanyifeng.com/blog/2013/07/gpg.html 作者: 阮一峰 日期: 2013年7月12日 前两篇文章,我介绍了RSA算法. 今天,就接着来 ...

  3. tarball安装GnuPG (gpg) 2.2.10

    https://www.gnupg.org/download/ mac 方式一:推荐 mac $ brew install gpg pinentry pinentry-mac $ echo " ...

  4. GnuPG 的PGP使用

    1. 生成秘钥对(此处采用默认的RSA, 2048位) $ gpg --gen-key gpg (GnuPG) ; Copyright (C) Free Software Foundation, In ...

  5. linux gpg 使用笔记

    http://linux.chinaunix.net/techdoc/system/2009/04/30/1109541.shtml 一.GnuPG的简介     我们在网上的发送的邮件是明文的,可以 ...

  6. 改动已有gpg密钥的用户标识及凝视

    /*********************************************************************  * Author  : Samson  * Date   ...

  7. gpg签名用法

    – 在CentOS 6上生成公钥/私钥对 [root@localhost ~]# gpg --gen-key gpg (GnuPG) ; Copyright (C) Free Software Fou ...

  8. centos7(debian,manjora,freebsd)命令及安装mysql、git、gpg、gogs,安装docker,zsh,chrome

    最小安装: 1. 选择English 2. DATE & TIME 修改好本地时间 SOFTWARE SELECTION默认的Minimal Install就好 INSTALLATION DE ...

  9. 加密和数字签名工具GPG

    转载: 源文件位置:http://blog.chinaunix.net/uid-9525959-id-2001824.html GPG [功能]  GPG是加密和数字签名的免费工具,大多用于加密信息的 ...

随机推荐

  1. 事件监听addEventListener----attachEvent

    第一:简单的通用方法(IE && FF) window.onload = function(){ var oDiv = document.getElementById("J_ ...

  2. TMS320DM642学习----第一篇(硬件连接)

    DSP设备型号:SEED-DTK-VPM642(目前实验室用途:视频处理,图像处理方向,预计搭载目标跟踪以及云台防抖等算法) 官网链接:http://www.seeddsp.com/index.php ...

  3. hust 1010 The Minimum Length(循环节)【KMP】

    <题目链接> 题目大意: 有一个字符串A,一次次的重写A,会得到一个新的字符串AAAAAAAA.....,现在将这个字符串从中切去一部分得到一个字符串B,例如有一个字符串A="a ...

  4. ECMAScript6 入门 Module

    目的:将大程序拆分成互相依赖的小模块文件.CommonJS 和 AMD 两种,前者用于服务器,后者用于浏览器.他俩都是运行时才确定 :ES6 模块的设计思想是尽量的静态化,使得编译时就能确定模块的依赖 ...

  5. Service Discovery And Health Checks In ASP.NET Core With Consul

    在这篇文章中,我们将快速了解一下服务发现是什么,使用Consul在ASP.NET Core MVC框架中,并结合DnsClient.NET实现基于Dns的客户端服务发现 这篇文章的所有源代码都可以在G ...

  6. ASP.Net Core中使用jquery-ajax-unobtrusive替换Ajax.BeginForm

    在大潮流下,大家都在研究MVVM框架,但是做面向搜索引擎的外网项目还是得用服务器渲染. 在.Net中肯定就是用Razor模板引擎了. .Net Core断臂式重构后,很多在老得Mvc中使用得好好的一些 ...

  7. Misunderstood-Missing-逆向DP

    Misunderstood … Missing 记忆深刻......打铁没做出来的题 题意 : 打怪,有 A 的攻击力,有 D 的成长,初始均为 0,有 n 轮. 同时有三个数组 a[1:n],b[1 ...

  8. 本地创建 Git 仓库并关联 Phabricator

    前提条件: 1.熟悉 Git 操作. 2.在搭建好的 Phabricator 上已注册账号,并开通相关权限. 方法一: 1.在本地创建Git仓库. 2.ssh-keygen -t rsa生产公钥私钥, ...

  9. 一道有意思的找规律题目 --- CodeForces - 964A

    题目连接: https://vjudge.net/problem/1502082/origin 这一题第一眼看过去貌似是模拟,但是根据其范围是1e9可以知道,如果暴力解基本上是不可能的(不排除大佬级优 ...

  10. 在Node.js中在保持目录结构的情况下压缩指定目录

    最近在做一个文件升级的功能,需要从下载服务器中指定目录下的文件.在学习了zlib后发现这个模块达不到这个功能 在查找资料后发现后发现 archiver 模块很好用,不过我也发现大部分中文资料没有如果查 ...