GPG No secret key
by marozsas from LinuxQuestions.org on (#6QZJQ)
I have a file that I am unable do decrypt it, because GPG does not ask for the passphrase:
Code:$ file Documentos/electrum_wallet.md.gpg
Documentos/electrum_wallet.md.gpg: PGP RSA encrypted session key - keyid: 77E15F7D CCAD3E7E RSA (Encrypt or Sign) 3072b .
$ LC_ALL=C gpg --decrypt Documentos/electrum_wallet.md.gpg
gpg: encrypted with RSA key, ID 77E15F7DCCAD3E7E
gpg: public key decryption failed: No secret key
gpg: decryption failed: No secret keyEverything else looks fine.
1. I can export both my public and private keys with gpg --export-secret-keys --armour and gpg --export --armour.
2. both gpg --list-keys and gpg --list-secret-keys or gpg --fingerprint miguel@rozsas.eng.br show my key.
3. I can encrypt a new file with gpg --encrypt a.txt > a.txt.pgp and decrypt with gpg -d a.txt.gpg
4. The passphrase is asked once if the pgp-agent is not running. If a kill the gpg-agent with gpgconf --kill gpg-agent the passphrase is asked again as expected. I typed my passphrase once and it is not asked anymore until I kill the gpg-agent.
The encrypted file above (electrum_wallet.md.gpg) was created in July 2021. I am not sure how I created that file, I mean, if I used a special flag of any kind that explain this problem.
What I am doing wrong ??!?!
I am running opensuse tumbleweed now, but in 2021 I suppose I was running Ubuntu.
Code:rpm -qa | grep -iE "gpg2|pinentry"
pinentry-1.3.1-1.2.x86_64
gpg2-2.4.5-2.2.x86_64
pinentry-gnome3-1.3.1-1.2.x86_64
pinentry-qt6-1.3.1-1.2.x86_64I appreciate any help !
Code:$ file Documentos/electrum_wallet.md.gpg
Documentos/electrum_wallet.md.gpg: PGP RSA encrypted session key - keyid: 77E15F7D CCAD3E7E RSA (Encrypt or Sign) 3072b .
$ LC_ALL=C gpg --decrypt Documentos/electrum_wallet.md.gpg
gpg: encrypted with RSA key, ID 77E15F7DCCAD3E7E
gpg: public key decryption failed: No secret key
gpg: decryption failed: No secret keyEverything else looks fine.
1. I can export both my public and private keys with gpg --export-secret-keys --armour and gpg --export --armour.
2. both gpg --list-keys and gpg --list-secret-keys or gpg --fingerprint miguel@rozsas.eng.br show my key.
3. I can encrypt a new file with gpg --encrypt a.txt > a.txt.pgp and decrypt with gpg -d a.txt.gpg
4. The passphrase is asked once if the pgp-agent is not running. If a kill the gpg-agent with gpgconf --kill gpg-agent the passphrase is asked again as expected. I typed my passphrase once and it is not asked anymore until I kill the gpg-agent.
The encrypted file above (electrum_wallet.md.gpg) was created in July 2021. I am not sure how I created that file, I mean, if I used a special flag of any kind that explain this problem.
What I am doing wrong ??!?!
I am running opensuse tumbleweed now, but in 2021 I suppose I was running Ubuntu.
Code:rpm -qa | grep -iE "gpg2|pinentry"
pinentry-1.3.1-1.2.x86_64
gpg2-2.4.5-2.2.x86_64
pinentry-gnome3-1.3.1-1.2.x86_64
pinentry-qt6-1.3.1-1.2.x86_64I appreciate any help !