no secret key

editninja's Avatar

editninja

09 Feb, 2012 09:35 PM

I am trying to decrypt some ascii-armored plain text messages. Very basic, no email clients involved. When I select a text file that is encrypted/ascii-armored, the Services-->Decrypt menu option just gives me "decryption failed". If I try to change the .txt file extension to .asc I get the same error.

I am new to GPG but have figured out how to successfully encrypt my outgoing messages. Decryption is proving to be harder. Running GnuPG/MacGPG2 v2.0.17 (Darwin) on OSX 10.7.2.

I understand the difference between a public and a private (secret) key. My secret key is very clearly visible in GPG Keychain Access. In the following example, "unknown.txt" is the the ascii-armored file that I am trying to decrypt.

So I open Terminal, cd into the proper directory (I barely get the command line at all but I can do this much) and type:

gpg -d unknown.txt

I get an error that says "Decryption failed, no secret key." I have the public key of the sender on my system. The sender also has my public key. My secret key is on my system. So what is the problem? Did the sender make a mistake? Did I make a mistake?

Thanks for any help.

  1. Support Staff 1 Posted by Luke Le on 09 Feb, 2012 10:16 PM

    Luke Le's Avatar

    Hi,

    could you further describe how you received the encrypted file?

    It basically works like this: if you encrypt a file to someone else, you'll be using their public key. As a consequence, if you don't add the option to gpg to encrypt the file to you as well, you'll not be able to decrypt it afterwards. (I wonder if that's what's happening here)

    If you've received the encrypted file from someone else, there's the possibility the sender didn't encrypt to you (out of mistake) or they might have used an old public key which you no longer have the secret key to (in case you have different private keys).

    Either way, we'll get to the bottom of this :)

  2. 2 Posted by editninja on 09 Feb, 2012 10:21 PM

    editninja's Avatar

    Problem solved, it was the sender's mistake. Sorry for the newbie question. :)

  3. Support Staff 3 Posted by Luke Le on 09 Feb, 2012 10:23 PM

    Luke Le's Avatar

    No worries, that's what we're here for :)
    Great it works for you now!
    Feel free to open a new discussion if you run into problems again

  4. Luke Le closed this discussion on 09 Feb, 2012 10:23 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac