Questions tagged [gnupg]

GNU Privacy Guard (GnuPG or GPG) is an open source implementation of PGP, a file encryption and signature tool widely used for emails

1
vote
1answer
139 views

Use GPG smartcard and gpg-agent to protect multiple SSH keys

I have a Yubikey acting as a GPG smartcard. SSH is configured to use the smart card socket for authentication, and authenticating with the GPG key with Authentication capabilities work fine. ssh-add -...
0
votes
0answers
52 views

How to verify a binary correctly even if my github account is hacked by someone

I have a binary file and saved it on github release page. https://github.com/zono/bolt8/releases To allow users to verify it, I saved sha256sum and signature(.asc). However I have a concern that if ...
-6
votes
1answer
123 views

How can I get rid of the MDC packet in OpenPGP?

I want to get rid of the MDC packet in OpenPGP because I view SHA1 as a catastrophic threat. If one can invert SHA1, then all plaintext in OpenGPG is ... open. If one tries to go back to RFC 2440 ...
5
votes
1answer
114 views

Superceding a passphrased key with a token-based key

I've been using a GPG key for awhile (mostly with the pass password manager but also some with mail). Since it's now in use, a few years old, and entering the passphrase is getting tiresome, I ...
3
votes
1answer
239 views

Does it defeat the purpose to create an OpenPGP authentication subkey that is not password-protected?

I'd like to be able to log into and out of my ssh servers freely without entering a password. Previously, I did this with ssh-keygen, storing the key file under my ~/.ssh directory. Since I also have ...
0
votes
0answers
28 views

How can I input a raw session key into GnuPG?

How can I input a raw session key into GnuPG? I presume that I will have to use --sk2-cipher-algo and --sk2-digest-algo at the same time so as to accommodate the length of my chosen session key. ...
1
vote
0answers
32 views

--s2k-mode 0 session key from equal-length passphrase

In gpg2, how exactly does --s2k-mode 0 go from the passphrase to the session key in this example: gpg2 --armor --s2k-mode 0 --s2k-digest SHA256 --s2k-cipher-algo CAMELLIA256 --symmetric [file path] ...
0
votes
2answers
73 views

Should I delete lost GPG key from GitHub?

I've been using GPG key for a while to sign commits on GitHub. However, I recently lost it by accident when moving data around. It haven't leaked anywhere and signed commits can be trusted, I just don'...
6
votes
1answer
333 views

When should I sign a PGP key with a non-revocable signature?

GnuPG allows the user to sign a key with a non-revocable signature. I have done this when I’m signing one of my own keys—signing my personal key with my work key, for instance. Is there any other ...
3
votes
2answers
187 views

How can I verify signed commits made by other people?

As identified in this related question, github signs commits made from their application with their GPG key 4AEE18F83AFDEB23. Online, I can see commits tagged as 'verified'. But when I attempt to ...
1
vote
1answer
80 views

GnuPG can see a card under root user, but not under normal user

When under an unprivileged user: $ gpg --card-status gpg: selecting openpgp failed: No such device gpg: OpenPGP card not available: No such device With sudo or under a root user: $ sudo gpg --card-...
4
votes
1answer
170 views

Is it safe to share an encrypted GPG private key?

I use the pass password manager, and I am trying to come up with a convenient way to bootstrap new machines with access to the git repository. I also have a GPG smartcard (Yubikey) with a different ...
0
votes
2answers
55 views

Confused about GitHub's GPG key association and authenticity

I'm not sure I understand GPG, and something on GitHub has left me wondering. In git, a GPG private key can then be used to sign commits, which allows someone who is in possession of the public key ...
1
vote
1answer
426 views

PGP encryption for the server based app

Here is context: I am using PGP to encrypt messages in a chat web app. After going through some articles, I get brief idea how PGP works and here is how I am doing it with openPGPJs : Client(web ...
1
vote
1answer
231 views

Methods to work with offline primary keys

I created a number of profiles with separate subkeys for authentication, signature, and encryption while primary keys are saved on USB Stick. It's working alright but I was wondering if there are some ...
0
votes
0answers
26 views

Import/Register GPG keys from a SmartCard/Yubi

I used my desktop to setup my GPG keys, added them to my Yubikey, and then removed them from my desktop so that when I am prompted for the key it asks me to use my Yubikey --instead of asking for a ...
40
votes
3answers
6k views

How safe are signed git tags? Only as safe as SHA-1 or somehow safer?

How safe are signed git tags? Especially because git uses SHA-1. There is contradictory information around. So if one verifies a git tag (git tag -v tagname), then checksouts the tag, and checks that ...
27
votes
1answer
26k views

GnuPG decryption not asking for passphrase

I've some stuff encrypted with GnuPG using gpg -e. When I decrypt them, the system does not ask for the passphrase, it decrypts it straight away. Does it store the secret key somewhere and uses it (I ...
2
votes
1answer
341 views

gpg --armor --export-secret-key differ on last 4 characters

I created a backup of a gpg key by doing: gpg -a --export-secret-keys foo@bar > private.key gpg -a --export foo@bar > public.key Then on another system, I import them: gpg --import private....
1
vote
1answer
228 views

How do I delete secret subkeys correctly?

I tried to use gpg --delete-secret-keys to delete some revoked subkeys but ended up accidentally deleting my primary key instead. I was able to reproduce my mistake with the following commands: $ ...
6
votes
1answer
1k views

How to encrypt, sign and decrypt a file with gpg?

I am using gpg to encrypt and decrypt a file. Here are the steps I am doing taking reference from this question: # Sender gpg --encrypt --recipient recipient@gmail.com --output confidential.pgp ...
2
votes
2answers
142 views

Is it permissible to use GPG without an encryption key?

Will I be disapproved of or get frowned upon a lot if I choose to deploy and use GnuPG without an encryption key? E.g. I generate keys manually and skip the encryption key entirely. The reason is ...
8
votes
2answers
1k views

Multiple encryption subkeys on hardware smart cards

I've created a PGP key set which consists of the following: A master RSA key with only signing capabilities, stored offline. Multiple OpenPGP cards, each with three RSA keys: An encryption key A ...
-2
votes
1answer
94 views

Is GPG symmetric (decryption) vulnerable?

Suppose a file (say, a text file source.txt) was encrypted into danger.gpg using GPG symmetric encryption on a compromised device. Since the device is compromised, danger.gpg could have been created ...
1
vote
1answer
152 views

How do I interpret output that produces gpg listing keys?

Correct me where I'm wrong. There are public and private (or secret) keys. A public and a private key make up a keypair. Some keypairs are bound to the other ones. The former are called subkeys, the ...
0
votes
0answers
54 views

Import ssh keys into gpg (openpgp) as mutliple authentication subkeys?

I have successfully converted ssh keys to gpg primary keys and then converted them to authentication subkeys using pem2openpgp. Unfortunately there is only one primary key and only one authentication ...
1
vote
1answer
118 views

How do I create a detached plain text signature?

If I use gpg --detach-sig file, then I get a small file.sig, but it is not plain text, so this is not useful if you wish to send the signature in a plain text format. If I use gpg --clearsign file, ...
1
vote
1answer
77 views

Can I decrypt a .gpg file by using Windows CNG store/ProtectedData?

I'm creating this tool in C# that would take a .gpg file and decrypt it using Windows CNG. I get a .gpg file as my input parameter and it is encrypted with my key using WinPT. Decrypting it works with ...
6
votes
2answers
3k views

How to change (sub)key usage of a PGP key?

gpg2 generates keys with one or several of the (S)igning, (E)ncryption, (C)ertification usages set. However, e.g. Enigmail creates a primary key also set for (A)uthentication, which GnuPG then shows. ...
0
votes
0answers
84 views

Is gnupg2 --refresh-keys susceptible to any attacks based on fingerprint collisions?

Alice updates her OpenPGP key yearly. Bob updates his copy using: gpg2 --refresh-keys Mallory ensures that Bob uses her keyserver, which offers her own key, which is sharing the 32-bit "short" Key ...
6
votes
2answers
119 views

Is GPG a kind of digital signature?

So I've been using GPG since I've touched Linux&LibreOffice, but I only knew that's its a signature, for identifying the work is created by me. But soon I've been touching some law questions and ...
2
votes
1answer
70 views

Length of a stretched gnupg passphrase that is comparable in strength to an unstretched string of 256 random bits

Assume that we want to encrypt a file with gnupg using AES-256 as the encryption algorithm. (Hence, symmetric encryption.) In this mode, gnupg requires a passphrase from the user. I understand that ...
-1
votes
2answers
158 views

Is that a good idea? - Firefox/Chrome in-content encryption

I'm currently thinking about writing a Firefox/Chrome and Python/PHP/JS plugin to accomplish the following: Assuming you are on a non-SSL secured site or you simply don't trust any CA like Let's ...
2
votes
0answers
64 views

How can I trust a GPG key when I download it based on the fingerprint contained in the file I want to verify?

The instructions at https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu#3 suggest that you can download an ISO for installing an OS, along with the checksums and a signature. You then ...
0
votes
1answer
312 views

RSA 4096 vs. ECC Curve 25519

I want to use GPG to encrypt files before storing them as backup in the cloud. I don't care about interoperability or performance/resource consumption during encryption/decription. I only care about ...
0
votes
0answers
51 views

Which encryption algorithm for cloud backup?

I want to backup my data to the cloud. Before that, I want to encrypt it using GPG (gpg (GnuPG) 2.2.11 and libgcrypt 1.8.4). The backup is just for me, so I don't care about interoperability I only ...
3
votes
1answer
149 views

Is there a security difference between GPG signing a file directly or its SHA512SUM file?

I am about to decide what SHA-512 hash sum and / or GPG verification scheme I will choose. Let me present you with two options: Signing the 25 GB ~ 23 GiB (one file fit to a Blu-Ray) directly with: ...
1
vote
1answer
42 views

Decrypting gpg2-symmetrically-encrypted files using non-gpg2 tools

If I encrypt a file using gpg2 and specifying AES256 as my encryption algorithm, can I decrypt it with tools other than gpg2? More generally, does the fact that one tool used AES256 for encrypting a ...
2
votes
1answer
158 views

One GPG key with multiple user identities for my career?

I am trying to work out what is the best approach for managing GPG keys over my career when I change jobs. My understanding is that there are two ways this could be done: Have one main/master GPG ...
1
vote
1answer
299 views

Why does the revocation sent to the OpenPGP keyservers not show up?

I have created a new OpenPGP key pair. So I wish to revoke the former, I have used. Here's what I managed to do so far. This way I found that my email's ID is 3C76732B: gpg --search [email address ...
15
votes
4answers
20k views

Can I specify a public key file instead of recipient when encrypting with GPG

Can I do something like: gpg --public-key my.pub -e file.txt If I can, any reason that I should not do that? P/s: I think I don't need to know about the recipient because my machine only has one ...
2
votes
2answers
87 views

GPG: Change expected card number

I have switched from a YubiKey 4 to a YubiKey 5. Both have the same GPG keys stored. After storing the key on the first YubiKey, I fetched my public key so GPG knows where to look for the private key. ...
190
votes
14answers
70k views

Where do you store your personal private GPG key?

So, I want to start using pass, but I need a GPG key for this. This application will store all of my passwords, which means it's very important that I don't lose my private key, once generated. Hard ...
4
votes
1answer
105 views

I use full-disk encryption. Should I passphrase-encrypt my private key(s) anyway?

Suppose I want to use GnuPG on a GNU/Linux laptop where I've encrypted all filesystems (except /boot) with LUKS/dm-crypt. Backups are encrypted client-side and stored on a physically secure server. ...
7
votes
1answer
297 views

Preparing to change over to new GPG-key - what to do with my old ones?

I've just created a new off-line GPG-key with a sign/certify master-key and two sub-keys - one for signing and one for encrypting. 5 yr expiration for the master, 2 yr for the subs. My master-key got ...
43
votes
7answers
11k views

Is layered encryption more secure than long passwords?

The comments in this question debate about the added security of multi-layered encryption. There seems to be some disagreement, and I thought a proper question would be helpful here. So, to provide ...
6
votes
4answers
2k views

How to use multiple smart cards with gnupg?

I have two smart cards: SCard1 and SCard2. The same keys are stored on both of them. One of the feature I use the most is SSH authentication to access multiple servers. But I cannot use the second ...
1
vote
3answers
2k views

Where can I find the detailed manual page for gpg --list-secret-keys output

I get confused about the terms used in the output of gpg --list-secret-keys For example what is the meaning of following: sec sec# ssb ssb> there are many codes being used in the output. Can ...
0
votes
0answers
25 views

Know the setting used in creating key pair in GNUPG4Win version 3.15

I am using GNUpg4Win version 3.15. For the last few hours I am trying to figure out what default settings are used for Cipher and Hash during key generation. Basically I want to use AES-128, 3DES ...
13
votes
4answers
6k views

Is there a limit on the layers of encryption a file can have?

Consider symmetric GPG encryption of a given file my_file.txt. Something like (in command line) gpg --symmetric --cipher-algo AES256 my_file.txt After suppying the prompt with the new password, the ...