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.
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.
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.
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.
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.
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., 2 for two days, 3w for three weeks, 10mfor 10 months, or 0 for no expiration date).
GPG will prompt you to confirm the expiration date. If the correct date is displayed, enter y.
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.
GPG will prompt you to confirm or correct your information. You'll see a prompt something like this:
If the information displayed is correct, enter o to accept the user ID. To correct errors or quit the process, enter the appropriate alternative ( n , c , e, or q ).
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
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.
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).
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· SQL Server 2025 AI相关能力初探
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
2017-09-18 Get file extention in XSLT
2010-09-18 腾讯开放平台初体验