Decryption fails with "No secret key"

Gabriele Pohl civitas at dipohl.de
Fri Jan 3 13:53:00 CET 2020


Hi

After upgrading my PC to Fedora 30 

gnupg2-2.2.17-1.fc30.x86_64
gnupg2-smime-2.2.17-1.fc30.x86_64
gpgme-1.12.0-1.fc30.x86_64
gnutls-3.6.10-1.fc30.x86_64
libgcrypt-1.8.5-1.fc30.x86_64
libgpg-error-1.33-2.fc30.x86_64

a problem with decrypting came up.

Encryption works:

$ gpg --verbose --output test.txt.gpg --recipient contact at dipohl.de --encrypt test.txt
gpg: Note: signature key E747789CEA208551 expired Fri 06 Jun 2014 07:46:32 PM CEST
gpg: using pgp trust model
gpg: using subkey 4BB3049F19616A80 instead of primary key 9C7646202CE0CBB2
gpg: automatically retrieved 'contact at dipohl.de' via Local
gpg: This key belongs to us
gpg: reading from 'test.txt'
gpg: writing to 'test.txt.gpg'
gpg: RSA/AES256 encrypted for: "4BB3049F19616A80 Gabriele Pohl <contact at dipohl.de>"

$ ls -l test.txt*
-rw-rw-r--. 1 gap gap 119 Jan  3 13:04 test.txt
-rw-rw-r--. 1 gap gap 697 Jan  3 13:07 test.txt.gpg

But decrypting fails:

$ gpg --verbose --decrypt test.txt.gpg 
gpg: public key is 4BB3049F19616A80
gpg: using subkey 4BB3049F19616A80 instead of primary key 9C7646202CE0CBB2
gpg: encrypted with 4096-bit RSA key, ID 4BB3049F19616A80, created 2016-09-05
      "Gabriele Pohl <contact at dipohl.de>"
gpg: decryption failed: No secret key

The secret key is available:

gpg> list

sec  rsa2048/9C7646202CE0CBB2
     created: 2012-09-05  expires: 2020-03-16  usage: SC  
     trust: ultimate      validity: ultimate
ssb  rsa2048/51E12CABCB4F0264
     created: 2012-09-05  expired: 2016-09-04  usage: E   
sub  rsa4096/4BB3049F19616A80
     created: 2016-09-05  expires: 2020-03-16  usage: E   
[ultimate] (1). Gabriele Pohl <contact at dipohl.de>
..


My gpg-agent.conf:
 
# Cache settings
default-cache-ttl 10800
default-cache-ttl-ssh 10800
max-cache-ttl 10800

# Environment file
#write-env-file /home/gap/.gpg-agent-info
  
# Keyboard control
no-grab
    
# PIN entry program
#pinentry-program /usr/bin/pinentry
pinentry-program /usr/bin/pinentry-curses
#pinentry-program /usr/bin/pinentry-qt4
#pinentry-program /usr/bin/pinentry-kwallet
#pinentry-program /usr/bin/pinentry-gtk-2
#pinentry-program /usr/bin/pinentry-gtk
#pinentry-program /usr/bin/pinentry-qt

disable-scdaemon
allow-mark-trusted
keep-display
display :0.0
debug-level basic


I hope you can help me to solve the problem.


Thanks and kind regards,

Gabriele



More information about the Gnupg-users mailing list