Decrypt failed! (No public key) Code = 9

Jerrod Thomas's Avatar

Jerrod Thomas

May 15, 2012 @ 02:03 AM

I am having trouble decrypting a file. This is a new 10.7.4 machine that I recently installed GPGTools and imported my secret key onto this fresh box. I decrypted a good 20 files until I got to one very large file (800+MB) which keeps throwing an error:

Decrypt failed! (No public key) Code = 9

I've tried reimporting the key, re-exporting, then deleting the key, then importing again, etc. Everything looks good as far as I can tell. There was an error on stdout when I ran it on the command line stating that it could not connect to the key server. I don't know if this is the problem or not. I changed the GPGPrefs pane to look at pgp.mit.edu where I shared my public key but still the error.

I'm tired and frustrated so I'm going home while my PC tries to slowly churn away at it. I can see the darn thing decrypting the file in the command line: it's right there! Give it to me!!!

Any advice would be much appreciated.
Jerrod Thomas

5/14/12 6:42:38.960 PM GPGServices: inputData.size: 875130385
5/14/12 6:42:39.414 PM GPGServices: GPG: /usr/local/bin/gpg2
5/14/12 6:42:40.155 PM GPGServices: Pinentry: /Library/Services/GPGServices.service/Contents/Frameworks/Libmacgpg.framework/Resources/pinentry-mac.app/Contents/MacOS/pinentry-mac
5/14/12 6:42:40.279 PM GPGServices: gpg --no-greeting --no-tty --with-colons --fixed-list-mode --yes --output - --status-fd 3 --no-batch --command-fd 0 --armor --no-textmode --no-emit-version --keyserver-options timeout=10,no-auto-key-retrieve --decrypt /dev/fd/5
5/14/12 6:42:41.427 PM GPGServices: >> ENC_TO BFD57274396764C6 1 0
5/14/12 6:42:41.434 PM GPGServices: >> USERID_HINT BFD57274396764C6 Jerrod Thomas [email blocked]
5/14/12 6:42:41.434 PM GPGServices: >> NEED_PASSPHRASE BFD57274396764C6 F8A11C748F85BECB 1 0
5/14/12 6:42:42.813 PM GPGServices: >> GOOD_PASSPHRASE
5/14/12 6:42:42.916 PM GPGServices: >> BEGIN_DECRYPTION
5/14/12 6:42:42.917 PM GPGServices: >> PLAINTEXT 62 1322593154 _2011-11-29_10:06:23.tar
5/14/12 6:42:42.917 PM GPGServices: >> PLAINTEXT_LENGTH 1456814080
5/14/12 6:42:58.577 PM GPG Keychain Access: updateKeys:withSigs: start
5/14/12 6:43:56.520 PM GPG Keychain Access: updateKeys:withSigs: end
5/14/12 6:44:09.898 PM Spotify: Media key event tap was disabled by timeout
5/14/12 6:47:32.978 PM GPGServices: >> ERRSIG C06350E9DA0478D5 17 2 00 1322593154 9
5/14/12 6:47:33.272 PM GPGServices: [DEBUG] [STDERR]: gpg: encrypted with 2048-bit RSA key, ID 396764C6, created 2011-10-03

  "Jerrod Thomas <[email blocked]>"

gpg: Signature made Tue Nov 29 10:59:14 2011 PST using DSA key ID DA0478D5
gpg: Can't check signature: No public key

5/14/12 6:47:33.308 PM GPGServices: [DEBUG] [STDOUT]: (null) >>
5/14/12 6:47:33.392 PM GPGServices: >> NO_PUBKEY C06350E9DA0478D5
5/14/12 6:47:33.408 PM GPGServices: >> DECRYPTION_OKAY
5/14/12 6:47:33.408 PM GPGServices: >> GOODMDC
5/14/12 6:47:33.408 PM GPGServices: >> END_DECRYPTION
5/14/12 6:47:33.430 PM GPGServices: [DEBUG] [STATUS]: [GNUPG:] ENC_TO BFD57274396764C6 1 0
[GNUPG:] USERID_HINT BFD57274396764C6 Jerrod Thomas [email blocked] [GNUPG:] NEED_PASSPHRASE BFD57274396764C6 F8A11C748F85BECB 1 0 [GNUPG:] GOOD_PASSPHRASE [GNUPG:] BEGIN_DECRYPTION [GNUPG:] PLAINTEXT 62 1322593154 _2011-11-29_10:06:23.tar [GNUPG:] PLAINTEXT_LENGTH 1456814080 [GNUPG:] ERRSIG C06350E9DA0478D5 17 2 00 1322593154 9 [GNUPG:] NO_PUBKEY C06350E9DA0478D5 [GNUPG:] DECRYPTION_OKAY [GNUPG:] GOODMDC [GNUPG:] END_DECRYPTION

5/14/12 6:47:38.512 PM GPGServices: GPGController: Decrypt failed! (No public key)
Code = 9
5/14/12 6:47:38.512 PM GPGServices: Error text: gpg: encrypted with 2048-bit RSA key, ID 396764C6, created 2011-10-03

  "Jerrod Thomas <[email blocked]>"

gpg: Signature made Tue Nov 29 10:59:14 2011 PST using DSA key ID DA0478D5
gpg: Can't check signature: No public key

Status text: [GNUPG:] ENC_TO BFD57274396764C6 1 0
[GNUPG:] USERID_HINT BFD57274396764C6 Jerrod Thomas [email blocked] [GNUPG:] NEED_PASSPHRASE BFD57274396764C6 F8A11C748F85BECB 1 0 [GNUPG:] GOOD_PASSPHRASE [GNUPG:] BEGIN_DECRYPTION [GNUPG:] PLAINTEXT 62 1322593154 _2011-11-29_10:06:23.tar [GNUPG:] PLAINTEXT_LENGTH 1456814080 [GNUPG:] ERRSIG C06350E9DA0478D5 17 2 00 1322593154 9 [GNUPG:] NO_PUBKEY C06350E9DA0478D5 [GNUPG:] DECRYPTION_OKAY [GNUPG:] GOODMDC [GNUPG:] END_DECRYPTION

  1. 1 Posted by cfraire on May 15, 2012 @ 05:01 PM

    cfraire's Avatar

    Hi, Jerrod.

    Decrypt code 9 happens when you are sent a signed-encrypted file but you do not have the sender's public key in your GPG keychain in order to verify the signature. GPGServices is strict about signature verification when a file has one attached.

    I advise asking the sender for his or her public key and then importing that into your keychain. The GPGServices decrypt should succeed after that.

  2. 2 Posted by Jerrod Thomas on May 15, 2012 @ 08:07 PM

    Jerrod Thomas's Avatar

    Thanks! I got the public key from the signature imported and had to adjust the trust level for it to complete.

  3. Support Staff 3 Posted by Steve on May 17, 2012 @ 03:50 PM

    Steve's Avatar

    Great news. Glad you were able to solve this. Sounds like we need some better error messages for GPGServies.

    Cheers,
    steve

  4. Steve closed this discussion on May 17, 2012 @ 03:50 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