date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,481,718,407,000
Trying to run this: gpg -c --passphrase-file secret somefiletoencrypt But it still asks for a password. How do we make gpg use the password in the secret to do symmetric encryption?
From the gpg manual (man gpg2 on my system), in the section talking about the --passphrase-file option: Note that since Version 2.0 this passphrase is only used if the option --batch has also been given. Since Version 2.1 the --pinentry-mode also needs to be set to loopback. Testing for myself with GnuPG 2.2.12,...
gpg asks for password when supplying it in a file?
1,481,718,407,000
What are the standard ownership settings for files in the .gnupg folder? After doing sudo chown u:u * mine now looks like this: drwx------ 2 u u 4,0K jan 18 22:53 crls.d drwx------ 2 u u 4,0K jan 18 22:33 openpgp-revocs.d drwx------ 2 u u 4,0K jan 18 22:33 private-keys-v1.d -rw------- 1 u u 0 sep 28 02:12 pubring.g...
The .gnupg directory and its contents should be owned by the user whose keys are stored therein and who will be using them. There is in principle no problem with a root-owned .gnupg directory in your home directory, if root is the only user that you use GnuPG as (in that case one could argue that the directory should ...
What are the standard ownership settings for files in the `.gnupg` folder?
1,481,718,407,000
I am migrating from ssh-agent to gpg-agent now and I also have a bunch of ssh keys, which are loaded at startup. The keys do not contain passphrases, but after calling ssh-add <filename>, gpg-agent asks for a passphrase. Just pressing Enter works fine, but could it not ask for passphrases at all? At least for the keys...
Edit: I'm leaving this here for Google, but having bumped into this myself I no longer think this is the real problem. gpg-agent likes to copy your keys and put its own pass-phrase protection on them when you ssh-add them the first time. From https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html SSH Ke...
gpg-agent asks for a passphrase, but ssh private key doesn’t have one
1,481,718,407,000
I'm installing cmake from the cmake.org website and they provide two files that I believe are intended to verify the source code download cmake-3.11.0-rc3.tar.gz On the same page, they have links to download a cmake-3.11.0-rc3-SHA-256.txt file and a cmake-3.11.0-rc3-SHA-256.txt.asc file What I don't understand is: Ho...
Have a look inside the .asc file, you will see it starts with: -----BEGIN PGP SIGNATURE----- So this is a PGP Signature. It means it signs some content with some specific PGP key. 1) The content Based on the name, the content is the file .txt, it is the list of files corresponding to the software to download and eac...
How does providing an asc file ensure I'm downloading the intended source code?
1,481,718,407,000
I've used gpg for minimal things for years now (pass, yadm, etc.) and one thing I consistently have noticed is slow response times from the keyservers (mit, ubuntu, etc) when accessed through the web portals (searching takes absolutely forever). Recently yay seems to have been having trouble importing keys with a No N...
It’s possible that you’re running into keyserver issues, at least for some of the keyservers. WKD is by nature unreliable, or at least unpredictable: it requires support in each domain from which you try to fetch keys, so it’s more likely to fail than to succeed for any given set of user ids (email addresses) from a v...
Are gpg keyservers always unreliable?
1,481,718,407,000
I'm trying to add a kubernetes repo to my Amazon Linux 2 instance and struggle with automatically adding GPG keys. This is my /etc/yum.repos.d/kubernetes.repo... [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://pa...
This is a known issue (see https://github.com/kubernetes/kubernetes/issues/60134). Work around it by disabling GPG checks: set repo_gpgcheck=0 in /etc/yum.repos.d/kubernetes.repo. Credits to drakedevel, who writes: I think this is due to Amazon Linux 2 shipping an old version of GnuPG, and something about the repomd....
Yum in Amazon Linux 2 still asks for GPG key even after "rpm --import" when adding Kubernetes repo
1,481,718,407,000
I have two PGP keys I use to sign and decrypt e-mails in kmail. When doing so, I have to enter the key's password (currently stored in KeePass). Is it possible to save the passwords in my kwallet in a way that automatically unlocks the keys as needed? If so, how can this be achieved? Edit: I have found something simi...
Unlocking Is it possible to save the passwords in my kwallet in a way that automatically unlocks the keys as needed? If so, how can this be achieved? As far as I know this cannot be done in kWallet. Use gpg-agent instead. You can make it's settings as liberal as you like, balanced between security and ease of access...
Can I use kwallet to manage PGP keys?
1,481,718,407,000
I would like to set the expiration date of a GPG subkey in the past, but gpg --edit-key does not allow me to. Is there any workaround to that? Rationale: it is useful to set the expiration date of a subkey in the past in order to temporarily disable it. If you just revoke it, you lose the ability to enable it again la...
A possible workaround is to use faketime to convince gnupg to not complain. See this other question: $ faketime 'last week' gpg2 --edit-key ABCDEF12 and then use ordinary commands to expire the subkey tomorrow. That "tomorrow" will actually be six days ago.
gnupg: set subkey expiration date in the past
1,481,718,407,000
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 1.4.11 emacs 24.0.92.1 Debian sid Decrypting using gpg (encrypted by emacs) gives: gpg: decryption failed: bad key Dec...
The issue was in this (in Russian) solution which manipulates with input method. At present time it affects on passphrase during encryption/decryption.
Emacs auto encryption and gpg
1,481,718,407,000
I have quite some scripts that are still using the apt-key adv command. And I know this command is deprecated. And soon becoming unable to use. Correct me if I'm wrong, but Debian 11 is the last Debian version supporting apt-key. I also know we need to migrate to fetching the .asc file directly and put the file into t...
The apt-key-less equivalent to your apt-key adv command is gpg --recv-keys --keyserver keyserver.ubuntu.com A6616109451BBBF2 gpg --export A6616109451BBBF2 | sudo tee /etc/apt/trusted.gpg.d/somenicename.gpg This assumes that gpg is installed. There’s no general rule regarding the availability of keyring files; if you ...
Migrating away from apt-key adv
1,481,718,407,000
I have Lubuntu 16.04. My problem is similar to this questiuon: sudo apt-get update Get:1 http://it.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Hit:2 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu xenial InRelease Hit:3 http://it.archive.ubuntu.com/ubuntu xenial-updates InRelease ...
The missing key is the key for the Samsung Unified Linux Driver Repository. Following the instructions added to the website yesterday should fix things: wget http://www.bchemnet.com/suldr/pool/debian/extra/su/suldr-keyring_1_all.deb sudo dpkg -i suldr-keyring_1_all.deb (assuming you trust the repository of course!).
Problem with public key on apt-get update
1,481,718,407,000
I've been making my way through what's on the internet concerning gpg lately. And I must say it's pretty confusing. Particularly, the importing/exporting part. When you generate a key, you basically get 4 keys by default. What are possible ways to export the keys (only one key, several keys at once)? What are possible...
What I've managed to find out. Correct me if I'm wrong. There are public and private keys, they go in pairs. There are primary keys and each primary key can have one or more subkeys. By default, when you generate a key, you get four keys ((1) RSA and RSA (default)). One keypair for signing and certification (primary k...
Which keys gpg exports and what is in the keyrings?
1,481,718,407,000
I have a gpg setup started with older gpg versions and I did not use a passphrase back then. I would type enter directly when prompted for it. I'm not sure if that means the key isn't encrypted or if it is encrypted with an empty passphrase. Regardless, when I try to decrypt something that was sent to me recently, gpg...
I solved this by using an older system which had the key. I set a new passphrase on the old system where empty-passphrase input works. Export old system private key and copy it over new system Clean gpg state of new system (move .gnupg to .gnupg.bak) Import the non-empty passphrase private key Here are the commands...
gpg cannot unlock passphrase-less key: "gpg: public key decryption failed: No passphrase given"
1,481,718,407,000
I'm trying to generate a GPG key on Ubuntu 16.10 and GPG is taking forever. I googled a bit and found some websites, including some questions on StackExchange, suggesting to run an entropy generator like rngd to help the system generate random numbers faster. Some of these websites also encouraged to check /proc/sys/k...
I had a similar problem recently after upgrading to Debian 9. Some of the programs that depend on random numbers have had their source code/random generator routines changed in recent Linux versions that make them more dependent on the entropy of the system. Installing the daemon haveged seems to provide a consistent ...
GPG key generator does *not* use entropy
1,481,718,407,000
Is mandatory to use pinentry with gpg2? Why is pinentry better over legacy prompt?
Yes, the use of a pinentry program is mandatory with GnuPG 2 and later. This follows from the updated architecture in use nowadays: GnuPG clients no longer deal with private key material, or with passphrases etc. (as far as possible — as far as I can tell, the only time a passphrase goes through the client is when yo...
About pinentry usage along with gpg
1,481,718,407,000
Here's the scenario, we're using GnuPG to encrypt data between 2 web servers. 1 is on RHEL. GnuPG will be accessed through cgi scripts to encrypt and decrypt. So I need a keyring that the apache user has access to. This has proven to be difficult for me on Red Hat, I was able to get this set up pretty easily on Ubuntu...
Have you tried creating a new user and invoking the command with sudo instead? If fear this might be some permission issue and the easier way would be removing the agent node from /var/www to somewhere we know is accessible to the gpg user, maybe the /tmp directory. You can manually specify the agent node location cha...
Creating a GnuPG keyring for apache
1,481,718,407,000
I am transferring a key from one machine to another and do the following: On Machine A: % gpg --export-secret-key -a [username] > my_private.key Please enter the passphrase to export the OpenPGP secret key: "[username and other data like email]" 2048-bit RSA key, ID [removed-ID], created 2015-11-09. Passphrase: Her...
The attempt in the update I posted clued me in that there are actually 2 (private) keys at play here: a master and a subkey. They are different. This article helped me get that fact even more: https://wiki.debian.org/Subkeys I still don't know how I got into a state where the master has a different password to access ...
importing a gpg private key - will not import
1,481,718,407,000
I received an file encrypted with the public key I generated but I can't get it to decrypt. Steps: gpg --gen-key default options gpg --export -a <email> > pub.key sent the pub.key received the encrypted file cat <file> | gpg The error: $ cat cred.gpg | gpg gpg: key 71980D35: secret key without public key - skipped g...
Note the error message: it doesn't say that the secret key is missing (it isn't), it says the public key is missing. gpg: key 71980D35:secret key without public key- skipped In RSA, some numbers (d, p, q, u) are private and others (n, e) are public. Only the 2 public numbers are required for encryption and signature v...
gpg: "secret key not available" when sec & pub key are in keyring
1,481,718,407,000
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 am prompted repeatedly with no progress. The error given in /var/log/messages is: The gnome keyring socket is not owne...
Install python-oauth to fix this problem.
Gnome keyring issue
1,481,718,407,000
Issue: - The passphrase is repeatedly being requested when I pass show <name of credential>. Doing some Googling, I found you can do that with gpg-preset-passphrase, however I'm not sure where to get it or if it included in the gpg distribution. This is the current version of gpg I'm running. Does anyone know how to g...
Looks like it was installed but just not directly accessible through the gpg-preset-passphrase command, but rather: /usr/libexec/gpg-preset-passphrase: /usr/libexec/gpg-preset-passphrase --version gpg-preset-passphrase (GnuPG) 2.0.22 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 ...
gpg - gpg-preset-passphrase installation
1,481,718,407,000
dirmngr is used by python-apt and is recommended by gnupg and gpgsm. I tried to shutdown dirmngr as shared in the manpage but got this - └─[$] dirmngr -vv --shutdown dirmngr[9494]: error opening '/home/shirish/.gnupg/dirmngr_ldapservers.conf': No such file or directory Can somebody share how to shutdown it ? I tried...
systemctl --user stop dirmngr.socket systemctl --user restart dirmngr.socket
How to shutdown and restart dirmngr?
1,481,718,407,000
I've been using GPG on WSL2 Debian for some time now and everything worked perfectly, but yesterday I started receiving an error about gpg signs when using git. Trying to run echo "test" | gpg --clearsign, I receive the following message: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 test gpg: signing failed: No su...
Turns out that something overwrote my tty variable, which made gpg go crazy, because in my .zshrc I had exported GPG_TTY as $(tty). I managed to solve this issue with export GPG_TTY=`tty`. Edit: After further investigation I found out that the fault lies within Powerlevel10k, for more info see this StackExchange threa...
gpg: signing failed: No such file or directory
1,481,718,407,000
I have the following in my ~/.bash_profile in order to try to make GPG work nicely: export GPG_TTY="`tty`" But when I open a new shell, I get the following: $ echo $GPG_TTY not a tty However, if I then source ~/.bash_profile again it then works and contains something like /dev/pts/2. Is there a way to make this wo...
The GPG_TTY environment variable should hold the path to the TTY device for the current interactive shell. It would therefore make most sense to have this in one's ~/.bashrc file rather than in the ~/.bash_profile file, as the login shell (which parses the profile file) may in fact not be interactive under some circum...
How to make `tty` work in .bash_profile
1,481,718,407,000
I want to use GPG for local encryption only, and after reading the man file, I'm doing the following in order to encrypt a whole directory: I zip the directory with a password "zip -r -e foo foo", then I encrypt it with "gpg -c foo.zip" using a passphrase. Is this an elegant and secure way of encrypting directories? ...
Is this an elegant and secure way of encrypting directories? Elegant -- no. Secure -- as secure as gpg. Am I using GPG's full cryptographic power? Yes. Are there better alternatives? tar the directory first instead of zip. gpg compresses data anyway.
Encrypting directories with gpg [duplicate]
1,481,718,407,000
I followed encrypted netrc file with gpg tutorial. I edited my ~/.profile like this if test -f $HOME/.gpg-agent-info && \ kill -0 `cut -d: -f 2 $HOME/.gpg-agent-info` 2>/dev/null; then GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info | cut -c 16-` else # No, gpg-agent not available; start gpg-agent eval `gpg...
That tutorial is obsolete, and all you should add to your ~/.profile now is GPG_TTY=$(tty). On a modern Ubuntu system, the GPG agent sockets are in /run/user/$UID/gnupg and systemd will start gpg-agent for you automatically when gpg runs and tries to access the agent socket. To confirm this, gpgconf --list-dirs agent-...
How to get more gpg-agent info?
1,481,718,407,000
I am followings instructions Install from Debian, Ubuntu, or Mint using the command line and GnuPG in making Tails, based on Debian, usb stick. All steps done where the failure in the last line gpg: error reading key: public key not found, while expected output sig! 0x9C31503C6D866396 2015-02-03 Stefano Zacchiroli <...
You haven't imported the Tails key that you try to check the signatures on: $ gpg --recv-key A490D0F4D311A4153E2BB7CADBB802B258ACD84F $ gpg --check-sigs A490D0F4D311A4153E2BB7CADBB802B258ACD84F pub rsa4096 2015-01-18 [C] [expires: 2018-01-11] A490D0F4D311A4153E2BB7CADBB802B258ACD84F uid [ unknown] T...
Why this Debian-ex-developer public key not found?
1,481,718,407,000
I'm running something like this: find . -maxdepth 1 -type f -note -iname "*.gpg" | sort | while read file ; do echo "Encrypting $file..." gpg --trust-model always --recipient "[email protected]" --output "$file.gpg" \ --encrypt "$file" && rm "$file" done This runs great, but it seems that GPG is not ...
If you install the GNU Parallel tool you can make pretty easy work of what you're trying to accomplish: $ find . -maxdepth 1 -type f -note -iname "*.gpg" | sort | \ parallel --gnu -j 8 --workdir $PWD ' \ echo "Encrypting {}..."; \ gpg --trust-model alway...
Running up to X commands in parallel
1,481,718,407,000
I run mutt in tmux and when I run gpg to sign or encrypt, gpg shows a blank screen where I would expect to type my passphrase. I've straced gpg and it shows that it's hanging waiting on a socket read() (presumably from gpg-agent. What's going on here?
Short answer If you are using bash, then Chris W.’s wrapper script is the way to go. If perchance you are using zsh, then you can exploit the ~/.zshenv startup script to set GPG_TTY from there, no need for a wrapper. Since bash does not have a similar startup script (cf. Bash Startup Files), you’ll have to use the w...
Why does mutt hang when running gpg in tmux?
1,481,718,407,000
I have my /root mounted as read-only.  I have a script that sends an encrypted email using gpg; something like the following: echo "hello" | gpg --no-verbose -e -a -r [email protected] | mail [email protected] But I get an error: gpg: failed to create temporary file `/root/.gnupg/.#dkflsfj': Read-only file system Ho...
I solved the problem by using --lock-never option, which prevents gpg to attempt to lock the file.
gpg uses temporary files instead of pipe
1,481,718,407,000
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 I need in my passphrase to safely post my .gpg directory on the web? Put yet another way, how strong is the encryption algorithm protecting my secret key?
This is not a statement about the security of public key pairs or gpg encryption, but WRT entropy and passwords, given a password taken from the range of ASCII alphanumeric characters (A-Z, a-z, 0-9), the possible number of combinations in 16 characters is: n = 62^16 = 47672401706823533450263330816 If I have your key...
If I have a really strong passphrase for my gpg private key, how reckless can I be with my .gpg directory?
1,320,296,561,000
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 shoot me or just add some suggestions. I'm going to do tar -cvjf myiso.iso.tar.bz2 myiso.iso and them I plan to encrypt th...
You can use GPG to symmetrically encrypt a file with a passphrase (gpg -c). If the passphrase has enough entropy, you don't need an extra step of generating a secret key. What does “enough entropy” mean? Your encryption needs to withstand offline attacks, where the attacker can make cracking attempts as fast as his ha...
Encrypt files using gpg (and them symetric encrypting the key) - is it a normal thing to do in the *nix world?
1,320,296,561,000
Using the GNU Privacy Guard (GnuPG): for some given key, say 0xDEADBEEF, how can a user readily list only the public keys in their keyring that have a UID that has been signed by that key? It would be helpful if you could specify whether your answer is intended for use with GnuPG Modern (2.1.x), GnuPG Stable (2.0.x), ...
As far as I am aware there is no such option. Yet, it is trivial to script one together: #!/bin/sh KEY=${1:-'C840C4F6'} # that's my key gpg -k | grep 'pub ' | cut -d ' ' -f 4 | cut -d / -f 2 | while read x; do if gpg --list-sigs "$x" | grep C840C4F6 >/dev/null; then echo "$x" fi done And, thanks to ...
List all keys signed by a given key
1,320,296,561,000
I'm trying to understand what happens when verifying a detached gpg signature. Here's an example from the gnupg manual: blake% gpg --verify doc.sig doc gpg: Signature made Fri Jun 4 12:38:46 1999 CDT using DSA key ID BB7576AC gpg: Good signature from "Alice (Judge) <[email protected]>" How does gpg determine that th...
You can use the --list-packets option to get a dump of what's in a gpg file. The description of the file format is RFC 4880 (OpenPGP standard). The signature does not directly contain a hash. It contains information that allows verifying both the hash and the sender: there is a signature verification algorithm, which ...
What happens when you verify a detached signature?
1,320,296,561,000
Running Ubuntu 16.04.4 LTS. On running sudo apt update, the final lines are as follows: W: GPG error: http://download.opensuse.org/repositories/home:/osmc/xUbuntu_16.04 Release: The following signatures were invalid: KEYEXPIRED 1482381670 E: The repository 'http://download.opensuse.org/repositories/home:/osmc/xUbuntu...
After adding a third party repository to a /etc/apt/sources.list.d/* file or /etc/apt/sources.list, you need to make sure the corresponding gpg key is inserted into the apt keystore. wget http://download.opensuse.org/repositories/home:/osmc/xUbuntu_16.04/Release.key -O - | sudo apt-key add - sudo apt update If...
KEYEXPIRED on Opensuse repository
1,320,296,561,000
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. Ideally it would be a concatenation of ascii-armored public key blocks, but a directory with one public key per file w...
The program gpgv / gpgv2 is used for simple checking of signatures. The problem is that exported key files are not recognized as keyring. Thus you have to create a keyring in the first step: cd /some/tmp/dir || exit 1 test -f pubring.gpg && { rm -f pubring.gpg || exit 1; } gpg --no-options --no-default-keyring --keyri...
how to check openpgp (gpg) signature against a set of public key blocks
1,320,296,561,000
How to verify that the CHECKSUM file for the CentOS 8 ISO is real? Download check sum and key: $ wget https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official $ wget http://www.gtlib.gatech.edu/pub/centos/8.0.1905/isos/x86_64/CHECKSUM $ wget http://www.gtlib.gatech.edu/pub/centos/8.0.1905/isos/x86_64/CHECKSUM.asc Veri...
You don't need both CHECKSUM and CHECKSUM.asc. The latter is GPG-signed version of CHECKSUM. GPG is confused because it assumes that if you have somefilename and somefilename.asc, that the .asc file is a detached signature. If you delete the file CHECKSUM, then you can gpg --verify CHECKSUM.asc and get: gpg: Signatu...
How to verify checksum file of centos 8?
1,320,296,561,000
I'm using Arch Linux Linux uplink 4.14.56-1-lts #1 SMP Tue Jul 17 20:11:42 CEST 2018 x86_64 GNU/Linux. I'm trying to solve a problem I'm currently have with GnuPG 2.2.9 (libgcrypt 1.8.3), but I've noticed I have these errors showing up all the time, for any operation I perform with gpg: gpg: bad data signature from ke...
I solved this by editing my key and adding the "Signing" usage to the subkey which was encrypt-only. First edit the key: > gpg --edit-key "<my@email>" gpg (GnuPG) 2.2.10; Copyright (C) 2018 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the ex...
How to solve gpg: bad data signature from key: KEY_ID Wrong key usage (0x19, 0x2)
1,320,296,561,000
Take the following command (real example) : ~$ gpg --edit-key [email protected] showpref quit (...) [ultimate] (1). Foo Bar <[email protected]> Cipher: AES256, AES192, AES, CAST5, 3DES AEAD: Digest: SHA256, SHA1, SHA384, SHA512, SHA224 Compression: ZLIB, BZIP2, ZIP, Uncompressed Features: MDC...
The solution is to use --batch. This will help gpg to send info to standard file handlers. # gpg --batch --edit-key [email protected] showpref quit 2>&1 |grep Com Compression: ZLIB, BZIP2, ZIP, Uncompressed
Is it possible to grep this output from gpg
1,320,296,561,000
I have downloaded Debian installation iso from http://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/. I have also downloaded the MD5SUMS and MD5SUMS.sign . I verified the md5sum of iso matches the entry present in MD5SUMS . Now I want to verify MD5SUMS file against MD5SUMS.sign using GPG. I'm not very familiar ...
You missed the important line above: gpg: Signature made Fri Sep 11 17:13:36 2015 CEST using RSA key ID 6294BE9B gpg: Can't check signature: No public key This tells you that this file is signed with key 6294BE9B. That is the key you need to receive first: gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 629...
How to verify debian cds with gpg?
1,320,296,561,000
The 'pass' password manager uses gpg keys. http://www.passwordstore.org/ However, gpg itself can be used for symmetric encryption of files. Does pass only work using public/private keys, or is it possible to use with symmetric encryption?
The pass password manager requires a public key for encrypting its files (where the managed passwords are stored) - and it requires a private key to decrypt its files. It isn't possible to configure pass to use gpg's 'pure' symmetric file encryption (cf. the -c or --symmetric GPG options). This is due to the design of...
'Pass' password manager - does it require public key?
1,320,296,561,000
How do I distrust an Apt key in Debian Linux, or prevent one from being silently added via apt-key (like most commercial packages tend to do in their postinst scripts)? If I run apt-key adv --edit-key ... trust, it doesn't seem to have any effect: # apt-key adv --edit-key D38B4796 trust Executing: /tmp/apt-key-gpghome...
As far as I’m aware, the trust settings on keys don’t have any effect on apt. Trust in this context refers to the value given to signatures of other keys made with a given key; it’s about transitive trust in the web of trust, not trust in the validity of package signatures (or rather, repository signatures) made with ...
How do I distrust an Apt key in Debian Linux?
1,320,296,561,000
I am thinking if it is possible to autofetch public keys for new recipients from the main gpg/pgp key servers. I was thinking about some setting in $HOME/.muttrc, studying here but did not find a conclusive setting for the target. I tried pgp_verify_sig there but my Mutt says source: errors in /home/users/leo/.muttrc...
In order to do this, add this line to your ~/.gnupg/gpg.conf file: keyserver <keyserver address> keyserver-options auto-key-retrieve
How to autofetch public keys in mutt?
1,320,296,561,000
I'm using mutt, with notmuch-mutt indexing the mail. I have a macro defined in mutt to search multiple mailboxes, using notmuch's integration (as suggested in the man page). macro index <F3> \ "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ <shell-es...
Update as of 2018/03/18: This feature was merged upstream, and released in notmuch 0.26. Please note: The contents of the index are sufficient to roughly reconstruct the cleartext of the message itself, so please ensure that the notmuch index itself is adequately protected. DO NOT USE this feature without consi...
How can I search gpg-encrypted email with notmuch-mutt?
1,320,296,561,000
Whenever i save *.gpg files (symmetric password) using emacs the gcr-prompter displays dialog and asks me for password twice! It's so annoying, especially that my emacs remembers the password i type, and when i press escape twice on the dialog boxes, emacs saves the file properly. How can i disable the annoying dialog...
add this to .emacs: ;; Do not use gpg agent when runing in terminal (defadvice epg--start (around advice-epg-disable-agent activate) (let ((agent (getenv "GPG_AGENT_INFO"))) (setenv "GPG_AGENT_INFO" nil) ad-do-it (setenv "GPG_AGENT_INFO" agent))) source: https://stackoverflow.com/a/16829842/3024945
how to disable gcr-prompter dialogs?
1,320,296,561,000
Is there any way to sign multiple files with GPG when the signing key is stored on a keycard? (Or more specifically in my case, a Yubikey). Currently, I have a script where I loop over a number of files that I want to sign, e.g.: for pkg in html/packages/*.tar; do gpg2 --detach-sign --armor -o $pkg.sig $pkg done ...
If you can get the PIN into a variable your script can use, you can do something like: for pkg in html/packages/*.tar; do echo ${PIN} | gpg --batch --yes --passphrase-fd 0 --detach-sign --armor -o $pkg.sig $pkg done From the man page: --passphrase-fd n Read the passphrase from file descriptor n. Only the fir...
GPG: Generating signatures for multiple files
1,320,296,561,000
I use pass as a password manager. I would like my passphrase to be cached during a certain amount of time to avoid retyping my passphrase every time that I want to clip one of my passwords. Pass is using gpg-agent to decrypt passwords. According to the man page and a previously answered question, the solution is to s...
I solved the problem by upgrading gnupg from 1.4 to 2.1 which seemed to simplify a lot the configuration. However, it generated an error of migration of the secret key between gpg and gpg2. gpg2 generated the following error message when I was requiring password from pass: gpg: decryption failed: No secret key The s...
How to make the default-cache-ttl option of gpg-agent work?
1,320,296,561,000
I just installed Centos 6.7 on Virtualbox and ran yum update with this output: warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 Importing GPG key 0xC105B9DE: Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <[email ...
This update is for installing repository keys, hence asking for confirmation as installing wrong keys has security implications. The error message is because the default is not installing as the capital N shows. As you have pressed ENTER, it displayed the error. Please run yum update again and press Y when presented w...
yum update exits with "Didn't install any keys"
1,320,296,561,000
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 steps: Select Dvorak as the Keyboard Layout Mount the RAID-6 array. Select to backup the entire array and to check it....
This guide from the Clonezilla website shows you how to do unattended runs. excerpt By modifying the boot parameters in syslinux/syslinux.cfg (for live USB) or isolinux/isolinux.cfg (for CD), you can preseed most of the options so that Clonezilla live can do the job for you with less interactive steps, or it's possib...
Automated Clonezilla backup and GPG encryption
1,320,296,561,000
I'm having trouble using gpg (actually, the gpg-agent) on my Debian Bullseye (Stable) system. More precisely, I use the following: gpg --version | head -n2 gpg (GnuPG) 2.2.27 libgcrypt 1.8.8 uname -v #1 SMP Debian 5.10.46-4 (2021-08-03) lsb_release -a 2> /dev/null Distributor ID: Debian Description: Debian GNU/L...
I finally found a solution, although I'm not sure I understand it. Somehow the version of gpg-agent started by systemd was the issue. When performing systemctl --user mask gpg-agent and then restarting the gpg-agent manually, the problem disappeared. I'll try to understand why that was the case and then write an upd...
gpg-agent hanging when trying to access private keys
1,320,296,561,000
The GNU Privacy Handbook says: The command-line option --sign is used to make a digital signature. The document to sign is input, and the signed document is output. alice% gpg --output doc.sig --sign doc You need a passphrase to unlock the private key for user: "Alice (Judge) <[email protected]>" 1024-bit DSA key,...
GnuPG will use the first key found in the secret keyring if neither --default-user nor --local-user is specified. You may also define the default key to be used with default-key KEYID in ~/.gnupg/gpg.conf. Symmetric encryption does not involve any public or private keys. The passphrase that you enter is used to bot...
Why doesn't gpg need us to specify which keys for encryption and decryption?
1,320,296,561,000
I try to upgrade jenkins. I use the new way to use gpg keys: wget https://pkg.jenkins.io/debian-stable/jenkins.io.key gpg --dearmor jenkins.io.key mv jenkins.io.key.gpg /usr/share/keyrings/jenkins-keyring.asc cat /etc/apt/sources.list.d/jenkins.list deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg...
Repository signing keys were changed. Beginning March 28, 2023, the Jenkins weekly releases will use new repository signing keys for the Linux installation packages. The same change will be made in Jenkins LTS releases beginning April 5, 2023. Administrators of Linux systems must install the new signing keys on their...
Can't upgrade Jenkins on Debian11, the public key is not available: NO_PUBKEY FCEF32E745F2C3D5
1,320,296,561,000
I just started using pass of by Jason A. Donenfeld as a password manager. I entered a password (e.g. email/[email protected]). To retrieve it I type pass email/[email protected] I'm being asked the master password. But then if I type again pass email/[email protected], the master password is not being asked and the p...
pass uses GnuPG to handle encryption. Recent releases of GnuPG uses a GPG daemon. This GPG daemon caches your valid authentication for 600 seconds (default-cache-ttl), which may be refreshed to another 600 seconds if you use GnuPG again within that time, up to a maximum of two hours (max-cache-ttl). You have two optio...
Re-ask master password in pass each time
1,320,296,561,000
I generated a PGP key with GnuPG over a year ago. Since I haven't had to really touch it since, I'm extremely foggy on the ins and outs of GPG (though I understand asymmetric key encryption in principle). I had used this key to authenticate SSH logins, right up until accidentally deleted it yesterday. So, today, I set...
OpenPGP (as implemented by GnuPG) and SSH do not share a common key format, although they rely on the same cryptographic principles. GnuPG implements the ssh-agent protocol, though, so you can still use your OpenPGP keys through GnuPG for SSHing into other computers. enable the ssh-agent protocol by adding enable-ssh...
Can't use OpenPGP key exported from GnuPG with SSH
1,320,296,561,000
I am trying to decrypt a file in a script with gpg batch mode, but command is not executed because the passphrase contains a "!" echo "m!pass"|gpg --batch --passphrase-fd 0 --decrypt-file plain.gpg bash: !pass": event not found or gpg --batch --passphrase "m!pass" -d plain.gpg bash: !pass": event not found I guess ...
Use single quotes instead of double: $ echo "m!pass" bash: !pass": event not found $ echo 'm!pass' m!pass This is quite nicely explained in the bash manual (emphasis added): Single Quotes Enclosing characters in single quotes (‘'’) preserves the literal value of each character within the quotes. A single quote may...
Decrypt file using gpg in batch mode when passphrase includes a "!"?
1,320,296,561,000
We can sign a file with gpgp: gpg -s file.pdf Which generates a file signature file.pdf.gpg. It is also possible to make a detached signature: gpg -b file.pdf Which generates file.pdf.sig. I noticed that the *.sig files are always 566 bytes, while the size of *.gpg is proportional to the size of the original file. M...
What is the difference between a GPG signature and a detached signature? By "GPG signature" you mean a signed message. This is the data being signed and the signature combined into one file. In contrast, a detached signature is separate from the file being signed. Why are *.gpg signatures larger? Because it includ...
What is the difference between a GPG signature and a detached signature?
1,320,296,561,000
I encrypted a file with my own gpg key. After reboot, I can view the decrypted content of the gpg file directly with less, but cat/gvim/gedit show binary content. Why does less have this function? Does it automatic decrypt with gnome-keying? ▶ file pw.gpg pw.gpg: PGP RSA encrypted session key ....
less can use a helper program to decode files for display. This is configured using the LESSOPEN environment variable; see echo $LESSOPEN Typically this uses a helper called lesspipe. See the “input preprocessor” section of the less manpage for details. In your case, the helper uses gpg to decrypt the file, and gpg g...
Why can I decrypt a gpg-encrypted file with less?
1,320,296,561,000
Having a hard time figuring out the debugging steps for this behavior. I'll run some gpg command and, typically, about 20 seconds later a GUI Pinentry window will pop up where I type in my password and the command proceeds. Occasionally though, the prompt instantaneously appears in my terminal (without me changing any...
TLDR: I needed to pass the --daemonize flag to gnome-keyring-daemon. I had /usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh in my .xinitrc. Adding the --daemonize argument appears to have resolved this. /usr/bin/gnome-keyring-daemon --daemonize --start --components=gpg,pkcs11,secrets,ssh Below...
Why would GPG Pinentry be slow when opening in GUI but instantaneous when opening in CLI?
1,599,711,376,000
I know there is a gpg-agent config to set how long we can cache a password into gpg-agent. The setting is called --max-cache-ttl n But when a passphrase is cached in gpg-agent for example for 10 seconds, how do I obtain the current cache duration like how many seconds left until it will be expired? Is there a query op...
Not sure about the built-in feature that gpg-agent has. I don't think it is possible but I'm showing a trick how you can get cache duration left: First rule: When you cache a passphrase in gpg-agent, you first store the date in unix timestamp as a variable inside a config file: GPG_MY_CONFIG="~/.gnupg/my-gpg.conf" fun...
How to get passphrase cache duration left in gpg-agent?
1,599,711,376,000
There are many packages on AUR which, when you attempt to install them, result in an error like: ==> ERROR: One or more PGP signatures could not be verified! This is resolved by importing the key with something like gpg --recv-keys 123456789ABCDEF. The AUR discussion will often provide the key. I have a few questions ...
What exactly do these keys do? What is being verified with GPG, and why is it necessary? The keys are used to verify that the software you're downloading is what the author of the package intended it to be instead of trojan-horse malware from a repository server that may have been successfully infiltrated by an atta...
Why is it sometimes necessary to manually import keys?
1,599,711,376,000
I've performed the following test on a docker alpine linux: ole@MKI:~$ docker run --rm -it alpine /bin/ash / # apk add --update duplicity fetch http://dl-4.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz fetch http://dl-4.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz (1/28) Installing libbz2 (1....
The problem seems to be related to pinentry and the tty. The same command works perfectly with Ubuntu. tty in a Alpine Linux container displays /0 while tty in a Ubuntu container shows /dev/console By first exporting a correct tty for gpg (export GPG_TTY=/dev/console) the command works and shows the password dialog.
GPG Key Generation Fails on Alpine Linux Docker Image
1,599,711,376,000
I use Thunderbid, Enigmail, GnuPG and pinentry. When I receive encrypted message, how I can determine which algorithm is used: for encryption for checksuming (SHA1 or not) for compression
I don't know of a method inside thunderbird, but storing the message as a file and dropping to the shell will reveal the information you're looking for. Getting verbose gpg -vv will output very verbose information on the input, including the information you're looking for. An Example An example of the output can be ge...
How to learn encryption type from a mail message?
1,599,711,376,000
My configuration: Centos 6.5 gnugp2-2.0.14-6.el6_4.x86_64 gnupg2-smime-2.0.14-6.el6_4.x86_64 I configured gpg2 to use my signature key in smartcard gnupg V2.0. I imported my gpg signature key to the rpm store. I need to sign an rpm package using rpm --addsign myApp.rpm. It works fine, but rpm prompts once for the sm...
In order for the pin to be cached you need to run gpg-agent and your card should not have the forcesig bit set. AFAIK, by default, the cards are shipped with the forcesig bit set, which is more secure. You can see this using the gpg --card-edit command and look for the entry Signature PIN. According to the manual: Si...
How to configure gpg2 to pass smartcard PIN unless pinentry programm?
1,599,711,376,000
I am trying to install package on Redhat 5.5 using YUM but it always give me this error [root@redhat64 Desktop]# yum install perl-Net-Server-0.97-1.el5.rf.noarch.rpm Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Examining perl-Ne...
You need to install the Repoforge GPG key: # rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
Public key not found for RPM
1,599,711,376,000
I am using the default _gpg completion file for zsh, which came with my zsh version 5.7.1-1 (debian 10). I have pasted the file here: https://ctxt.io/2/AABg86pPFQ When I do gpg <TAB>, zsh completes files and directories in current directory. I would like to change that, so that: a) if I use gpg without further argumen...
I have never edited zsh completion files so there might be some bugs but that does what you want: #compdef gpg gpgv gpg-zip gpg2=gpg local curcontext="$curcontext" state line expl ret=1 local -a args allopts dups extra typeset -A opt_args if [[ $service = gpg-zip ]]; then args=( '--gpg[command to use instead o...
zsh completion for gpg
1,599,711,376,000
I'm using Debian-based Docker image, and I have only one usable key in the keyring: $ gpg -K /tmp/test-keyring/pubring.kbx ------------------------------- sec> rsa2048 2012-01-16 [C] [expires: 2024-05-15] CB522FE0379DDF40A93400D7E4BC91FACDA9A65B Card serial no. = 00nn 00nnnnnn uid [ unknown] Joh...
The problem disappears if I happen to unplug the smart-card, and repeat signing operation. This was a GnuPG bug, and it appears that it is going to be fixed in the next release. Dockerized environment has nothing to do with this.
GnuPG fails to find default key to sign when using a smart card, yet I have only one. What am I doing wrong?
1,599,711,376,000
I've just downloaded a FreeBSD 11.0 iso file from the FreeBSD website. I've also obtained the signed SHA512 and SHA256 checksum files. The website says that the checksum files are PGP-signed. How do I verify the integrity of the downloaded iso? Where do I get the public key to verify the signature in the checksum file...
If you are in a Linux / Unix-like system, sha256sum /path/to/freebsd.iso sha512sum /path/to/freebsd.iso will print the checksums. The public PGP key is likely one of these.
How to verify FreeBSD iso download?
1,599,711,376,000
I would like to use the "pass" password manager. I don't seem to be able to get pass to recognize my public key. $ gpg2 --list-keys /home/johndoe/.gnupg/pubring.gpg ------------------------------- pub rsa4096/3AD31D0B 2011-02-08 [SCE] uid [ unknown] Fedora-SPARC (15) <[email protected]> sub elg4096/A9DA...
You can't compress the two commands into one. You need to first initialise the pass store with your key and then, separately, initialise the git repository. Because, as the manual states, pass git only takes git-command-args. So, the correct approach requires two steps: pass init YOUR_KEY pass git init
gpg problem in using pass password manager
1,599,711,376,000
I'm started to use unix password manager Pass Some passwords are not critical to me and I'm using them very often So it's became very annoying to me to type passphrase to get some password. Is there a way to type passphrase only once?
hymie is right, the question is related to gpg. The solution is tricky for me, so here's one for OSX: Install pinentry-mac brew install pinentry-mac Create file ~/.gnupg/gpg-agent.conf with lines: pinentry-program /usr/local/bin/pinentry-mac default-cache-ttl 86400 max-cache-ttl 86400 When pinentry program requires ...
Pass, how to cache passphrase
1,599,711,376,000
I am using a Debian unstable with Iceweasel (38.2.0esr-1) and the Enigmail plugin (2:1.8.2-3) from the distribution packages. I recently upgraded my system and got a new version of the gnupg2 package (2.1.7-2, previous was 2.0.28-2) and I ran into problems when trying to use my private key (encrypt, decrypt, sign mess...
In fact, the problem is linked to the usage of the gnome3-pinentry software when agent has no default DBUS_SESSION_BUS_ADDRESS. Here is the thread on the Debian BTS (Bug Tracking System) Website about this problem. It finally turned out that the default pinentry software is working as expected, but the Gnome3 version ...
Enigmail plugin does not recognize anymore my private key
1,599,711,376,000
I already have a production version of GPG from a previous installation. I would like to build and test the last version of GPG without interfering with the production one. I am performing this test on MacOS X 10.10.3, but ideally this validation process should be independent of the OS. I created a new repository dire...
Since you're installing in non-standard locations, you'll need to tell each configure script where to find things. ./configure --help should give an indication of the appropriate option; for libgcrypt you'd run ./configure --prefix=/local/gpg2 --with-libgpg-error-prefix=/local/gpg2 Except that because of a bug in lib...
Installation of GPG alongside a running one: configure problem?
1,599,711,376,000
Thunderbird cannot search PGP-encrypted emails. Hence, I was considering copying all my emails from IMAP to local storage, then decrypting them all locally, so that they are searchable. Is this possible? Thunderbird stores email folders as a single mbox file. I attempted gpg -d mbox_file, but this only decrypted a sin...
As of 2020 (sorry, I've no idea when this function was added) enigmail has a "decrypt to folder" option. (At the very bottom of the context menu.) And you can select all messages in a folder, then use it to decrypt all messages in bulk. (My search found your question as I'm wanting to do the opposite: take a directory...
How can I PGP decrypt an entire mbox?
1,599,711,376,000
I've copied .gnupg from machine A to B. Now on the machine B gpg --list-keys lists my key but gpg --list-secret-key won't unlike on machine A.
You should do export and import gpg --export-secret-keys <keyid> > my.key scp my.key remote:~/ # on remote gpg --import my.key gpg --list-secret
gpg --list-secret-keys won't list keys
1,599,711,376,000
I create a pair keyring with the new embedded tool from Thunderbird and export it into a file (.asc by default and readable). Then I import these keys with gpg, finally I export again these keys with gpg --export --armor options. I compare the two readable public key coming from both methods and it appears the first c...
I think the difference between the public key blocks is dis-interesting. You aren't meant to decode, read and understand the ascii contained in the PGP public key block. You certainly aren't expected to compare each individual character of the block. When manually comparing PGP keys, you compare the fingerprint only....
Different PGP public keys vs program used
1,599,711,376,000
I am using gpg - $ gpg --version gpg (GnuPG) 2.2.12 libgcrypt 1.8.4 I am trying to understand the difference between the two commands : $ gpg --list-key and: $ gpg --fingerprint from whatever little I see, I don't see any difference between two outputs. Am I looking at something wrong ?
The --fingerprint option prints the fingerprint into 10 groups of 4 caracters to easily verify the gpg key.
which part is the fingerprint in gpg public key
1,599,711,376,000
So I guess I deleted or corrupted the gpg keys I had for *.debian.org, which makes apt-get update yield Ign http://ftp.fr.debian.org jessie InRelease Réception de : 1 http://security.debian.org jessie/updates InRelease [63,1 kB] Réception de : 2 http://ftp.debian.org jessie-backports InRelease [166 kB] Réception de : ...
Since you already reinstalled the debian-archive-keyring package, the actual key files should now be in place. But the reinstallation failed to re-add the keys as trusted, possibly because of certain conditions in the postinst script in the package that seem to be related to migration from Debian squeeze to jessie. Yo...
How can I recover (or reset) the GPG keys of *.debian.org?
1,599,711,376,000
I missed expiration date of my gpg key and have to generate a new one afterwards. Now I want to establish trust between my old and new key. Naive call like gpg --local-user DE5A457C --sign-key BCBE2B4A ends in error message gpg: skipped "DE5A457C": unusable secret key How do I force gpg to sign a new key with an ol...
I don't know if you can that, it's kind of violating the point of setting an expiry date. But you can probably trick gpg by running it in some kind of virtual machine that allows you to set the time to shortly before the old key expired. I don't know if gpg will let you sign a key that's not yet valid, but then you'll...
Signing new key with an old expired one [duplicate]
1,599,711,376,000
I use a script to decrypt my password for offlineimap, but somehow it's not working anymore ... The file was encrypted with gpg --symmetric password For offlineimap I use this combination. gpg --quiet --batch --no-tty --for-your-eyes-only --decrypt password.gpg On Linux it's working like it should, but on FreeBSD I ...
The --batch option was added in gpg v2. Prior to that, in v1, there is a --no-use-agent option which you might need if you're doing scripted operations. That said, I don't understand how you're entering the key at time of decryption. ...? You're using --no-tty (which prevents gpg from asking you anything) but at least...
Not possible to use batch mode?! FreeBSD gpg 1.4.19
1,599,711,376,000
I just used gpg2 --gen-key to generate a 2048 bit RSA key pair on an OS running on a live cd (Tails). This happened much faster than I expected. When I have done this before on a regular machine it takes a bit of time, and I typically need to wait and briefly do something else. I think that is because it takes some ti...
I found the answer: Tails comes packaged with the random number generator 'haveged'. http://www.reddit.com/r/tails/comments/2oxr7n/how_does_tails_generate_gpg_keys_so_fast/ I have edited the question's title to reflect that this is particular to Tails. Here is some discussion of whether the HAVEGED algorithm is any g...
gpg key generation on Tails live cd - why so quick?
1,599,711,376,000
I am using zsh with oh-my-zsh on OSX. I installed gnupg2 from homebrew giving me the executable gpg2. Unfortunately zsh auto completion appears to only support gpg (even though that executable is not even installed). Is there a way to enable zsh auto completion for gpg2. Is there some sort of oh-my-zsh plugin for this...
Gpg 2.x has almost the same command line options as gpg 1.x, you're unlikely to encounter the very few options that have changed. So declare gpg2 as having the same completions as gpg. In your .zshrc, after the compinit line, add compdef gpg2=gpg If you have no compinit line (it may be somewhere deep in the bowels of...
Zsh gpg2 autocompletion
1,599,711,376,000
From the documentation, I can run gpg-agent with custom config like this and I think this is the official way: The following gpg-agent.conf contains this: allow-preset-passphrase default-cache-ttl 34560000 max-cache-ttl 34560000 and to run gpg-agent with custom config: #!/bin/bash GPG_CONFIG_FILE="/opt/gpg-agent.conf...
This has been more than a year. So, I solved this issue. The problem is caused by bug using the --daemon option as described in here: https://dev.gnupg.org/T5076, In brief, gpg-agent should not spawn another process if an existing process is already there when we try to execute gpg command but it was stubborn not to u...
How to run gpg agent with custom config when the agent starts automatically after running a specific gpg command?
1,599,711,376,000
For (slightly) increased security, I would like to have better control of the lifetime of any unlocked keys, depending on the task being performed. Ideally, I would start an interactive sub-shell, do any tasks involving secrets, then have all unlocked keys be cleared automatically when the sub-shell exits. I know that...
While I do not have a full solution, I did find a workaround: By using an alternate home directory for GnuPG via the --homedir parameter or the GNUPGHOME environment variable, one can force GnuPG to use a different set of key storage files and associated agent socket paths. With that in mind, I can start a shell insid...
Controlling the lifetime of keys unlocked in a GnuPG agent
1,518,116,339,000
When encrypting a file with symmetric key, most common utilities (such as gpg, mcrypt, etc) store information in the encrypted message which can be used to verify integrity of the key during decryption. E.g., if the wrong key is entered during decryption, gpg will retort with: gpg: decryption failed: bad key Supp...
As an alternative to my other answer, I'd like to offer something else. Something beautiful ... dm-crypt. Plain dm-crypt (without LUKS) doesn't store anything about the key; on the contrary, cryptsetup is perfectly happy to open a plain device with any password and start using it. Allow me to illustrate: [root:tmp]# f...
File encryption utility without key integrity check (symmetric key)
1,518,116,339,000
Currently I am using reprepro and inoticoming to maintain a Debian package archive on a remote machine. The repo is configured with this distributions file: Origin: ... Label: ... Codename: squeeze Architectures: i386 amd64 armhf source Components: main Description: ... Log: /home/apt/log/reprepro.log The daemon is r...
The signatures apt uses are on the repo as a whole (specifically on the "Release" file, not on the individual packages. So they have to be generated as part of the process of adding packages to the repo. Normally one creates a key specifically for signing the repository with and keeps that on the machine used to manag...
Keep private key for remote reprepro package archive local
1,518,116,339,000
I am trying to download an update for a piece of software, and my package manager says that the key is invalid and thus warns me. W: Failed to fetch https://deb.torproject.org/torproject.org/dists/buster/InRelease The following signatures were invalid: EXPKEYSIG 74A941BA219EC810 deb.torproject.org archive signing key...
From 2019.www.torproject.org/docs/debian.html.en, you can run these commands to add the key to the trusted apt keys, I only added sudo: curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - ...
Author's GPG subkey has expired, what can I do?
1,518,116,339,000
To encrypt a file using a person's public key, I can use the following command. gpg --recipient [email protected] --encrypt --armor file_name I don't quite understand when this command has multiple --recipient parameters. Below is an example. gpg --recipient [email protected] --recipient [email protected] --encrypt -...
In this case, does it mean file_name.asc can be decrypted by both user's corresponding private key? Yes, any of the recipient keys will be able to decrypt the message. Strictly speaking, the message is encrypted using a common key, and that key is encrypted using each provided public key. Thus any of the correspondi...
What does it mean by gpg encrypting a file with multiple recipients?
1,518,116,339,000
When I apt-get update, the repository for Microsoft's Skype says: W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.skype.com/deb stable InRelease: The following signatures were invalid: EXPKEYSIG 1F3045A5DF7587C3 ...
It seems you need to re-obtain the GPG key, like so: curl https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add - and the warning/error will go away. See discussion of this issue on the Linux Mint Reddit.
Skype repository key expired? [duplicate]
1,518,116,339,000
I am playing with gpg verification on some kernel source, and trying to figure out where the gpg configuration file lives. Specifically, when I run --receive-keys, without providing keyserver, what does gpg do? me@testing:~$ gpg2 -vv --receive-keys 647F28654894E3BD457199BE38DBBDC86092693E gpg: data source: https://37....
The upstream default currently uses the SKS keyservers. The IP you saw is one of those listed for hkps.pool.sks-keyservers.net: $ dig +short hkps.pool.sks-keyservers.net 209.244.105.201 37.191.231.105 192.146.137.98 This is set during compile time via configure.ac: AC_DEFINE_UNQUOTED(DIRMNGR_DEFAULT_KEYSERVER, ...
What is Debian's default GPG keyserver, and where is it configured?
1,518,116,339,000
I have some RNA-seq files need to be decrypted. For example 1672_WTSI-OESO_005_w3.tar.gz.gpg Likely I have key for that in same folder 1672_WTSI-OESO_005_w3.gpgkey I have also have a file name 1672_WTSI-OESO_005_w3.md5 Inside that I have 884f9fa72fb7f6adbba95dc677eb0ec9 1672_WTSI-OESO_005_w3.tar.gz.gpg EDITED ...
The file is, according to the GnuPG output that you show, a file encrypted using the CAST5 algorithm. This is a symmetric encryption algorithm, meaning that you should just be able to use the passphrase in that .gpgkey file with gpg --decrypt to decrypt it (without importing it into your keyring; it's not that kind o...
Decrypting GnuPG-encrypted files
1,518,116,339,000
I am trying to install Hexinator on Linux sudo apt-key adv --keyserver keys.gnupg.net --recv-keys A04A6C4681484CF1 Executing: /tmp/tmp.jHAVvyUasz/gpg.1.sh --keyserver keys.gnupg.net --recv-keys A04A6C4681484CF1 gpg: requesting key 81484CF1 from hkp server keys.gnupg.net gpg: keyserver timed out gpg: keyserver receive...
You are probably behind a firewall. Try this: sudo apt-key adv --keyserver hkp://keys.gnupg.net:80 --recv-keys A04A6C4681484CF1 It worked for me (I'm behind a firewall. The original one didn't work).
gpg: keyserver receive failed: keyserver error
1,518,116,339,000
So far while surfing web I've discovered nice addition to my gpg password generator and I've decided to adjust my alias with these commands. Here is the code gpg --gen-random 1 20 | perl -ne'print "Your password: ";s/[\x00-\x20]/chr(ord($^N)+50)/ge;s/([\x7E-\xDB])/chr(ord($^N)-93)/ge;s/([\xDC-\xFF])/chr(ord($^N)-129)...
You have the alias statement when you don't need it, what you're actually creating is a function, replace the word alias with function and it will work as expected. You also don't actually need function either, you could just have the following and it will work as expected; genpass() { gpg --gen-random 1 $1 | perl...
Alias for perl script
1,518,116,339,000
Here on a Debian system I use mainly gpg2. Some (Debian packaging/signing) tools use gpg1 internally, and changing them as it should be would be infeasible. Both my gpg versions are using the same work directory (~/.gnupg) and their databases / configuration seem mainly compatible. An exception for this is the handlin...
GnuPG 1.4, 2.0 and 2.1 all support the "good old" pubring.gpg file for storing public keys. As long as a pubkey.gpg exists, also GnuPG 2.1 will continue to use it and not create a public keyring in the new keybox format. There are differences with respect to private keys, though. While GnuPG 1.4 and 2.0 both store pri...
Can I use GnuPG 2 and GnuPG 1 concurrently, seeing the same keys?
1,518,116,339,000
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?
echo -e "trust\n5" | gpg --edit-key "Dor" doesn't work because gpg does not read the answers from stdin, but opens /dev/tty directly for reading. This can be worked around with expect, a tool for automating interactive applications.
Feed GPG with answers
1,518,116,339,000
Like under an average Linux distribution - are there any checkings that the downloaded packages are really the packages that are on the mirror server?
Packages fetched by pkg_add from the official mirror sites are signed and the pkg_add utility will automatically check the signatures against the keys available on your system. From the pkg_add manual: If a package is digitally signed: • pkg_add checks that its signature is valid and that the signature was e...
Are there any GPG checks in OpenBSD when installing an application?
1,518,116,339,000
The problem UPDATE: Currently investigating with strace. It seems problem is a HTTP 400 error when accessing the repository UPDATE2: More weird errors in the server (a .so lib file corrupted, database engine displaying 'Unknown error') so it seems this problem is due to a hardware error. Unknown error executing apt-ke...
After a reboot with a rescue disk I used fsck to check the EXT4 filesystem: there were hundreds of errors. Then, I reinstalled every installed packaged to fix any corrupt binary file. After this, the apt error is gone. It was due to a corrupted file related to some package used by apt. UPDATE SSD was dying ad finally ...
Suddenly a server refuses to 'apt update' because an 'Unknown error executing apt-key'
1,518,116,339,000
I have searched the whole universe this error but i could not find any helpful tips. I have created a key using keybase and added my public key to github gpg my gpg --list-secret-keys --keyid-format LONG is this -------------------------------- sec rsa4096/7E8*******60B47B 2021-03-06 [SC] [expires: 2037-03-02] ...
i resolved my issue by adding gpg-agent plugin to my zshrc config file.
gpg failed to sign the data, failed to write commit object
1,518,116,339,000
Is it good/common practice to store the gpg private keys on my local machine, even if I intend to use them for pass, which obviously encrypts sensible data. Is there a sensible alternative, like storing it on a usb stick? I am on a Debian Buster Machine. Edit: Please tell me if this question is misplaced here. I will...
Common practice ? Definitely. Good practice ? It depends on your threat model and how sensitive the data you are trying to protect is. I for example like to use PGP with smart cards and use a reader with a PINpad. Thus, a keylogger cannot steal the passphrase. If the computer is stolen, the subkeys are not stored loca...
Keeping GPG Private Keys on Local machine?
1,518,116,339,000
I just installed Kali NetHunter and I'm trying to do a simple apt update but it looks like a public key is missing root@kali:~# apt-get update  0% [Waiting for headers] [Connected to packages.microsoft.com (13.8Get:2 https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease [3232 B]  Hit:1 h...
The workaround solution I found is to delete /etc/apt/sources.list.d/microsoft.list and to make sure the kali repo is uncommented and is inside the main /etc/apt/sources.list
GPG error when I want to apt update
1,518,116,339,000
There is an option named default-cache-ttl that controls how long the agent will remember the password to the private key. However, when I put it in the config file it doesn't work - instead, gpg complains: gpg: /home/jan/.gnupg/gpg.conf:8: invalid option My version of GPG is $ gpg2 --version gpg (GnuPG) 2.1.11
Wrong config file. This option concerns gpg-agent only, and (somewhat surprisingly) it has a separate configuration file - .gnupg/gpg-agent.conf. Put the option there and it works (configuration for GPG 2.1, earlier versions use different option names): $ cat .gnupg/gpg-agent.conf # remember the password longer (1 hou...
GPG cache options don't work
1,518,116,339,000
I have the following problem. I'm currently need to store my backup on a cloud solution like dropbox since my local nas is broken. That's why I have to encrypt my backup. I'm using rsnapshot to generate it. On the NAS I didn't encrypt it so I'm not experienced with it. What I've done is, I've zipped the latest backup...
The time it takes to encrypt is proportional to the size of the data, plus some constant overhead. You can't save time for the whole operation by splitting the data, except by taking advantage of multiple cores so that it takes the same CPU time overall (or very slightly little more) but less wall-clock time. Splittin...
how to efficiently encrypt backup via gpg
1,518,116,339,000
We host some of our own software packages as debs in a repository of our own. For prototyping purposes, we’ve been running “unauthenticated”. Now we're trying to do things more correctly and do the whole GPG thing. What I’ve tried, just for test run is the following: 1) Make a key with gpg-gen ~$ gpg --list-keys /home...
An up-to-date Debian stretch install no longer accepts SHA1 signatures. However, Aptly used SHA1 until v0.9.7 (relevant PR, note that it was also backported to v0.9.6.1). I suspect the version of Aptly you're using is older than that. If so, consider adding their repo to your sources.list.
Frustrated with aptly and GPG signing