Questions tagged [gnupg]

GNU Privacy Guard (GnuPG / GPG) is a cryptography suite implementing secret-key cryptography and public-key cryptography. GnuPG is the GNU project's complete and free implementation of the OpenPGP standard as defined by RFC4880. Use this tag for programmatic use of the GPG tool or its library. Questions about direct usage of the GPG tool or its graphical pendents belong on Super User.

GNU Privacy Guard (GnuPG) is a cryptography application. It implements a combination of conventional symmetric-key cryptography for speed, and public-key cryptography for ease of secure key exchange.

GnuPG is the GNU project's complete and free implementation of the OpenPGP standard as defined by RFC4880.

GnuPG allows encryption and signing of data and communication. It features a versatile key management system as well as access modules for all kinds of public key directories. The gpg command line tool has features for easy integration with other applications. A wealth of front-end applications and libraries are available.

See also:

1783 questions
19
votes
1 answer

What are the meaningful differences between .gpg, .sig., & .asc?

I’m aware that .asc signatures are output as a text file, while .sig & .gpg are binary. That aside: Are .sig and .gpg the same file with different extensions? If not, why use one over the other? Between text files and binary files, what are the…
CuriousCat
  • 205
  • 1
  • 2
  • 5
19
votes
3 answers

Get fingerprints of OpenPGP keys

I'm trying to get the fingerprints from the public OpenPGP keys of ActiveMQ. They are published at http://www.apache.org/dist/activemq/KEYS. Unfortunately, not all the keys have fingerprints listed next to them. Do you have any idea how to proceed?
Mazzy
  • 13,354
  • 43
  • 126
  • 207
18
votes
1 answer

Which private key file in private-keys-v1.d directory belongs to which key?

Since GnuPG 2.1 (https://www.gnupg.org/faq/whats-new-in-2.1.html), private keys of GnuPG are stored in the private-keys-v1.d subdirectory. After experimenting with key creation etc., I found that I have several *.key files in this directory: $ ls…
Matthias Lohr
  • 1,696
  • 2
  • 20
  • 32
18
votes
10 answers

gpg: decryption failed: No secret key

I am not able to decrypt my file without secret key. I know this question is asked on this before, solutions on this question did not help me. This is my problem's scenario. This error I receive on command prompt while using --decrypt command.…
Mangesh Sathe
  • 1,987
  • 4
  • 21
  • 40
18
votes
2 answers

What data is being signed when you `git commit --gpg-sign=`?

I'm trying to figure out how to sign/verify commits by hand, but I can't figure out what data is being signed to create the signature. In other words, I can't figure out what in gpg --verify needs to be. Here's the…
danneu
  • 9,244
  • 3
  • 35
  • 63
17
votes
4 answers

How to get expiration date from a gpg key

Below is an exported public gpg key generated by gpg --armor --export heinrichh@duesseldorf.de (email taken from gpg man ;) ) How can I get the expiration date from that key? Is there available open project or maybe a function that I can use for…
Grzegorz
  • 3,207
  • 3
  • 20
  • 43
17
votes
2 answers

Where can I find the public key for commits done from GitHub.com?

Git supports signing commits using GPG, and GitHub shows these commits as being ‘Verified’. When you click the Verified tag, you'll see something like: This commit was signed with a verified signature. my username My name GPG key ID:…
ErikHeemskerk
  • 1,623
  • 14
  • 30
17
votes
3 answers

How to get public key from an OpenPGP smart card without using key servers?

I am working on a use-case where OpenPGP is being used to generate a public key pair on a smart card (Yubikey). The smart card is then to be shipped off to the user. Trying to emulate this locally the following is being done: generate keys on smart…
Stelios
  • 1,294
  • 3
  • 12
  • 28
16
votes
2 answers

Signing commits with Git doesn't ask for my passphrase

I was trying to sign my commits with the command git commit -S but it fails without prompting my passphrase for my GPG key. The error is: error: gpg failed to sign the data fatal: failed to write commit object I noticed that if I run the following…
Oscar
  • 1,071
  • 13
  • 26
16
votes
1 answer

Verify a file against .asc using gpg without importing KEYS file.

I'd like to create script, that downloads and GPG-verifies files to my docker image. From apache docs I see, that for verification, I need to do: gpg --import KEYS gpg --verify downloaded_file.tgz.asc downloaded_file.tgz I'd like to ommit the…
kub1x
  • 3,272
  • 37
  • 38
16
votes
1 answer

Why do I have to kill gpg-agent to sign my commits?

GitHub recently announced verified commits, so I took this opportunity to implement GPG and start using keys. When I want to start committing, I get the following: $ git commit You need a passphrase to unlock the secret key for user: "John Doe…
Chris Duncan
  • 721
  • 1
  • 6
  • 21
16
votes
1 answer

Change the language of gnupg on a Mac?

I am running OS-X El-Capitan with MacPorts. System language of my Mac is Spanish. How can I tell gnupg to use English as language for any output such as error messages? I have installed gpg 1.4.19 via macports and gpg 2.0.28 via GPGTools. Both gpg…
kinnla
  • 411
  • 4
  • 13
15
votes
3 answers

decrypt encrypted gpg file using external secret key

I encryptd a file using gpg, now I want to decrypt the file. Is there any way to decrypt the file without need to import the secret file? We have the secret key in a file called key.sec; can we pass the secret file to gpg as a parameter (when we run…
Mohammed Shannaq
  • 806
  • 3
  • 8
  • 21
15
votes
2 answers

Purpose of gpg-agent in gpg2

I have been using gpg for encryption for a while. Someone suggested that I should use gpg2 instead. When I went to use gpg2, I could do almost nothing; it would complain that access to private keys was required, but I could not seem to get it to use…
inetknght
  • 4,300
  • 1
  • 26
  • 52
15
votes
4 answers

gpg: decryption failed: Bad session key

I'm trying to decrypt a file using gpg and getting this error: $ gpg --no-tty --batch --verbose --decrypt --passphrase foo file.enc Version: GnuPG v1.4.11 (GNU/Linux) gpg: armor header: gpg: CAST5 encrypted data gpg: encrypted with 1…
yegor256
  • 102,010
  • 123
  • 446
  • 597