LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   gpg decrypt problems (https://www.linuxquestions.org/questions/linux-newbie-8/gpg-decrypt-problems-753569/)

bic 09-08-2009 10:04 AM

gpg decrypt problems
 
When trying to decrypt a file I just encrypted, I get:

gpg: encrypted with 2048-bit ELG-E key, ID ABC, created 2001-11-01
"myfriend@home.com"
gpg: decryption failed: secret key not available


I do a gpg --list-keys and gpg --list-secret-keys and can see both my public and secret keys.

The permissions appear to be ok in /home/myuser/.gnupg

This is version gpg (GnuPG) 1.2.6, RHEL 4.2.

Any other things I can try?

kbp 09-08-2009 09:01 PM

Are you running the decryption as yourself or sudo ?

Also, is your secret key actually there ?

cheers

kbp

plumm 09-08-2009 10:03 PM

Hi,

You can try from the command line GPA & (GNU Privacy Assistant), under the Keyring Editor tab you should see details: "The key has a both a public and private part." After generating your key, you should have backed up both your private and public keys to some external storage media (CD-ROM, USB), otherwise one day you will not be able to recover your files. You do not want to export your private key to a key server or share with anyone else for that matter. If both are present you should be able to run 'gpg --decrypt-files' and see a prompt for your passphrase. In some cases you can also have the passphrase cached, so you don't have to type it every time, but you should disable this option if you share your computer with anyone else.

Regards,

plumm


All times are GMT -5. The time now is 07:57 PM.