gpg is the main command line tool of the GNU Privacy Guard (GnuPG), implementing the OpenPGP standard for public key cryptography. It allows encryption, (verification of) signatures and trust models like the web of trust. gpg (and its library gpgme) are the base of many FOSS crypto applications ...

learn more… | top users | synonyms

11
votes
1answer
3k views

How are the GPG usage flags defined in the key details listing?

When I list the details of a key I get output like this: $ gpg --edit-key SOMEID pub [..] created: [..] expires: [..] usage:SC [..] sub [..] created: [..] expires: [..] usage: E Or even usage: ...
11
votes
1answer
930 views

How can I find out what keys gpg-agent has cached? (like how ssh-add -l shows you cached ssh keys)

ssh-add -l shows you all ssh-keys that have been added with ssh-add ~/.ssh/id_yourkey. How do I do the analogous thing with gpg and gpg-agent, in other words, ask it to show a list of cached keys?
9
votes
3answers
2k views

Encrypt OfflineIMAP Password

I'm trying to set up OfflineIMAP to authenticate via a gpg encrypted file (that way I can consolidate all my encryption to my gpg-agent process). From the documentation, it seems the only way to ...
9
votes
1answer
738 views

Best Practices for SSH, tmux & GnuPG Agent

I'm attempting to consolidate my encryption software to GnuPG, and I'm running into a confusing problem. My primary unit is a headless server, and I exclusively work in tmux. There is no X session, ...
8
votes
1answer
3k views

How to configure gpg to enter passphrase only once per session

Is it posible to configure gpg in a way that I enter passphrase only once, and it will work for the whole session (I'm using Ubuntu/XFce)? I'm not sure how gpg works, it seems that the default ...
7
votes
2answers
909 views

RSA 2048 keypair generation: via openssl 0.5s via gpg 30s, why the difference?

RSA 2048 keypair generation: via openssl 0.5s via gpg 30s, why the difference There are several programs which can gerate RSA public/private keypairs GnuPG/OpenPGP for instance has a wizzard being ...
7
votes
4answers
2k views

Receive Pop/IMAP email and then forward as encrypted to gmail

Basically, I have an email account I can access as POP3 or IMAP. I want to take all incoming emails, encrypt them, and then forward the encrypted version to my gmail account (so I can see the ...
6
votes
2answers
219 views

Adding “random number entropy” for GPG keys?

In the following video: Linux HOWTO: Secure Your Data with PGP, Part 2, you are shown how to create a key pair with gpg. At about 1:50, the instructor says the following: While the key is being ...
6
votes
1answer
209 views

mutt: Use gpgme or classic gpg?

Mutt's wiki on GnuPG integration and many other places (like default on Debian) use the classic way of connecting mutt to gnupg. That is, one configures a bunch of commands to call gpg directly. On ...
6
votes
2answers
226 views

Cache all gpg subkey passwords at once? Prevent need for multiple gpg password entry?

Can I enter my gpg password just once and unlock all my sub keys (signing, decryption, authentication)? At the moment, I need to enter my gpg password three times (for signing, for decryption, for ...
5
votes
5answers
6k views

gpg asks for password even with --passphrase

I expect the following command to extract the gpg file without asking for password: gpg --passphrase 1234 file.gpg But it asks for the password. Why? This also have the same behavior: gpg ...
5
votes
3answers
1k views

How do I tell which GPG key an RPM package was signed with?

The cryptographic signature of an RPM can be verified with the rpm -K command. This returns a string containing gpg (or pgp) and ending in OK if the signature is in RPM's database and is valid. If ...
5
votes
1answer
759 views

How to edit a .gpg file with vi?

So I created a gpg encrypted file with password: gpg -c passwords.txt.gpg how can I open it with vi, edit it, then close it? (So that no passwords.txt file will be created, the decrypted ...
4
votes
3answers
2k views

When importing a key during a yum installation, where is that key stored?

I'm installing a piece of software for which I had to use a third-party repository. After adding the repository with rpm -Uvh http://[site], I installed with yum install [package]. One of the ...
4
votes
2answers
375 views

Decrypt files encrypted with gpg using xargs

I have a lot of files encrypted with gpg. All files have the same password. Is it possible to use xargs to decrypt files? ls | xargs -n 1 gpg asks for the password for every file.
4
votes
1answer
321 views

GPG key pair generation: What do the plus and minus signs mean?

I just generated a new GPG key pair and gpg displays some random plus, minus, greater than, less than and circumflex signs. I was always wondering what they mean. Can you explain it to me? ...
4
votes
1answer
107 views

measure amount of data read from /dev/random

background I have written a collection of bash scripts (most of them in German only yet but if you are interested; download the archive not the single scripts) which help users create high-quality ...
4
votes
2answers
7k views

CentOS yum repository bad Header V4 RSA/SHA1 signature

I was coping with many problems to get stuck with this one. I have installed yum repository on server (CentOS 5.6) with: createrepo -v -s sha yumrepo/ sha is used due to solution to my earlier ...
3
votes
4answers
1k views

Encrypt multiple files at once

I'm writing a script which creates project archives and then creates 7z archives of them to make it easier on me to save specific versions and keep encrypted backups. After I've generated the ...
3
votes
3answers
651 views

How to use Emacs to recognize and automatically open GPG encrypted file in ASCII armored format?

gpg -ca passwords.txt create encrypted ASCII file passwords.txt.asc. Emacs open the file as a normal text file: -----BEGIN PGP MESSAGE----- Version: GnuPG v2.0.19 (GNU/Linux) ...
3
votes
2answers
1k views

How can I verify that a PGP key is imported into RPM?

One can import a key with: rpm --import /path/to/key But how can you tell later if you have already imported this key? Trying to reimport it will fail with an error and I am trying to avoid this ...
3
votes
1answer
246 views

how to check openpgp (gpg) signature against a set of public key blocks

I have some content that needs to be checked against a predetermined whitelist of OpenPGP (also keyword: gpg) public keys for a valid signature by one of them. The whitelist is maintained separately. ...
3
votes
4answers
3k views

keyserver timed out when trying to add a GPG public key

I am trying to add a public key for installing a program with CPG. But i am pretty new to this but every command i found gave me the same error: gpg --keyserver keyserver.ubuntu.com --recv-keys ...
3
votes
1answer
80 views

Why do I need to add a GPG-key with apt-key before adding URL to sources.list and download-installing an application with apt-get?

I went on to download an application today. It had it's instructions listed, step by step, number one being: adding a GPG-key with apt-key. It was followed by adding the application to apt/sources and ...
3
votes
2answers
2k views

Encode directory with GnuPG

Is there any way to encrypt the whole directory using gpg? It accepts only file as input argument. But I need to encrypt a lot of files on external HDD.
3
votes
1answer
125 views

I fail to fetch GPG keys over HKPS with “gpgkeys: HTTP fetch error 1: unsupported protocol” error

I'm trying to fetch some GPG keys over keys.gnupg.net and hkps.pool.sks-keyservers.net and both fails with: gpg: requesting key 1F41B907 from hkps server hkps.pool.sks-keyservers.net gpgkeys: HTTP ...
3
votes
2answers
612 views

Emacs auto encryption and gpg

Emacs encrypts/decrypts .gpg files automatically. But recently I have lost the ability to decrypt files encrypted by the Linux gpg tool and vice versa. I use: passphrase symmetric encryption gnupg ...
3
votes
1answer
528 views

gpg starting gpg-agent on demand?

The man page of gpg-agent states: The agent is usualy started on demand by gpg, gpgsm, gpgconf or gpg-connect-agent. Thus there is no reason to start it manually. In case you want to ...
3
votes
1answer
48 views

Is there a way to embed a GPG public key in a script without adding it to the keyring?

I have a script that basically needs to do the following: #!/bin/bash GPG_PUBLIC_KEY=<<EOF -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.12 (GNU/Linux) ... -----END PGP PUBLIC KEY ...
3
votes
1answer
246 views

Automated Clonezilla backup and GPG encryption

I have a desktop Linux system which I regularly create clones of to a local RAID-6 array using Clonezilla. It's proven to be quite a hassle to walk through the backup process, which takes quite a few ...
3
votes
1answer
424 views

Gnome keyring issue

I am attempting to restore some files to an OpenSUSE 12.3 machine that was backed up with deja-dup (duplicity). When prompted for the password to decrypt the backup, I enter the correct password and I ...
3
votes
1answer
199 views

What is this file called - doing in my home directory?

In my home directory there is a file called -. Seeing inside it was hard, but I finally managed to do it. At the top was this: -----BEGIN PGP PUBLIC KEY BLOCK----- followed by a bunch of ...
3
votes
3answers
1k views

Skype missing GPG key

I wanted to install Skype on Scientific Linux 6.1: yum install alsa-lib.i686 dbus-libs.i686 e2fsprogs-libs.i686 expat.i686 fontconfig.i686 freetype.i686 glib2.i686 glibc.i686 keyutils-libs.i686 ...
2
votes
4answers
75 views

Parallel pausing and resuming?

I have a pretty strange thing I'm seeing as I run 8 GPG encryption jobs with GNU parallel: The command I've run is this: find . -type f -not -iname "*.gpg" | sort |parallel --gnu -j 8 --workdir ...
2
votes
2answers
74 views

Feed GPG with answers

I wish to do something like: echo -e "trust\n5" | gpg --edit-key "Dor" In order to supply GPG with answers that were made in advance. But it doesn't work. Any idea?
2
votes
1answer
2k views

Encrypt files using gpg (and them symetric encrypting the key) - is it a normal thing to do in the *nix world?

I read a lot of articles about using gpg to encrypt email, but I would like to use it to encrypt some files - mainly a bunch of *.isos. I'm going to describe what I thought I would do, so you can ...
2
votes
1answer
298 views

How to regenerate /etc/apt/trustdb.gpg on Debian?

Suppose one deleted (or damaged) the following file. /etc/apt/trustdb.gpg How to regenerate it?
2
votes
2answers
209 views

Why is scdaemon ballooning out of control?

My system keeps getting wedged because an scdaemon process has been spawned that has grown to consume all free memory on the computer. (I do not use, and have never used, smart cards in the vicinity ...
2
votes
1answer
235 views

If I have a really strong passphrase for my gpg private key, how reckless can I be with my .gpg directory?

The title pretty much explains it all: I have a very (read: very) strong passphrase for my private key. How reckless can I be with my .gpg directory? Put another way, how many bits of entropy would ...
2
votes
1answer
464 views

How long should it take to generate 300 bytes of entropy on a VPS?

I'm running NetBSD on a Xen VPS, and I'm trying to generate a gpg keypair. I've gotten most of the way there, but now I'm getting the following error message: Not enough random bytes available. ...
2
votes
2answers
83 views

GnuPG : representations of key IDs and fingerprints

In gpg's man page, there are examples of key IDs : 234567C4 0F34E556E 01347A56A 0xAB123456 234AABBCC34567C4 0F323456784E56EAB 01AB3FED1347A5612 0x234AABBCC34567C4 and fingerprints : ...
2
votes
1answer
1k views

Invalid signatures when running apt-get update

I'm new to linux and am trying to run an update, I get a lot of "Hit"'s and "Ign"'s but in the end I get these errors, does anybody know what they mean and how I can fix them? W: GPG error: ...
2
votes
1answer
84 views

Checking if a passphrase is able to decrypt symmetrically encrypted files

I have about twenty files symmetrically encrypted with CAST5. I have a single passphrase that is meant to work with all of the files and I wish to confirm that it does. I wrote a script to perform a ...
2
votes
1answer
277 views

How do I specify the keyserver with GPG?

Tutorials online say to use the option --keyserver, like this: gpg --send-keys <keyID> --keyserver 'hkp://keyserver.ubuntu.com:11371' but gpg doesn't recognise the option --keyserver. What ...
2
votes
1answer
400 views

Using GPG to decrypt Symantec PGP encrypted files?

Is this possible? I had an old HD encrypted with Symantec PGP. I attempted to decrypt the disk with Symantec's boot time recovery tool. It stalled 18% in, I let it sit for 16 hours, and the machine ...
2
votes
1answer
863 views

I try to add passwords to the “pass” password manager. But my attempts fail with “no public key” GPG errors. Why?

I am trying to install Pass: the standard Unix password manager, however, when I try to add passwords to the appliation I get these errors gpg: Kelly's Passwords: skipped: No public key gpg: [stdin]: ...
2
votes
1answer
22 views

How close smartcard after sign rpm with GPG2?

Adding to this question: How do I close gnupg V2.0 smartcard after signing an rpm? I tried to execute: gpg-agent --default-cache-ttl 15 --max-cache-ttl 15 --daemon But after 15 seconds, if I ...
2
votes
0answers
12 views

Password dialogs block keybindings

I am using XMonad 0.11, but this might be unrelated. I am using evolution 3.12.2 and this is related but the problem might be more general. After research it appears that the window in question is ...
2
votes
1answer
14 views

What GPG agent does Elementary Luna use?

Whenever I try decrypting or signing files with GPG in Elementary Luna, I see a graphical password prompt come up for my GPG key. The key is then cached in memory for future requests for some time. ...
2
votes
2answers
52 views

Securely viewing an encrypted file

I have a file that is gpg encrypted. I would like to view the content of the file, but leave no trace of the output. Lets say for example that the encrypted file has some passwords, and I don't want ...