4
votes

I have a brand new install of Linux Mint 14. Installed Thunderbird & Enigmail.

Generated my key, got a friend's public key, imported it.

Sent my friend an encrypted email, he was able to decrypt it just fine.

However, when he responded, I got "gpg: decryption failed: secret key not available"

I tried deleting my key and reimporting it. I tried changing various settings. But I can't figure out what the problem is. I've used Linux/Thunderbird/Enigmail in the past and never had this error.

3

3 Answers

2
votes

Sounds like your friend didn't encrypt the message to your public key in the first place. That error message just means that you did not possess the secret key for any of the keys the message was encrypted to.

I think you'll find that if you save the encrypted message into a file and run "gpg -v " it will tell you that it can't find a key on your keyring to decrypt it. I'm also willing to bet that running "gpg --list-packets" or "pgpdump" (which just makes the --list-packets option easier to read) on that file you'll find that the message was only encrypted to your friend's key.

0
votes

Sounds stupid, but make sure you are not mixing up gpg keys and ssh keys. That's just the kind of brain fart that will have you tearing your hair out. That's why I keep my hair short :)

See this: Are GPG and SSH keys interchangeable?

0
votes

I just had exactly the same thing happen as the OP but it was a different cause. I eventually noticed that Thunderbird Enigmail was looking in the keyring of gpg2 while I had used gpg to create the latest key pair. You can check if it is in gpg and bring it across:

 gpg2 --list-secret-keys 
 gpg2 --import ~/.gnupg/secring.gpg
 gpg2 --list-secret-keys

It will ask you for passwords of keys after the middle step.