Subject: Decrypting a file with EasyPG

From: Matt Kayala <[email-masked]>
Date: Fri, 7 Aug 2009 13:17:20 -0700

Hello,

Excuse any naivety in the question asking, but any help with the following
will be very much appreciated:

Using Emacs 23, built with NS on Mac OS 10.4..., and gpg built from fink, I
am having the following issue:

I can create a new buffer 'test.gpg', edit it, and save it, which encrypts
the file using one of my keys.

If I close the buffer, then try to open the file, (C-x C-f), I am asked for
my passphrase, then I get the following error in the minibuffer:  'File
exists, but cannot be read'.
This is not a permissions issue (775).  Also, decrypting from the command
line with gpg works fine.

Here are the messages in *Messages*:
/Users/mkayala/org/t: 0% (0/607)
File exists, but cannot be read

Here is the output on " *epg-debug*" for the encryption:
/sw/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter
--command-fd 0 --output /tmp/epg-output61144iH --decrypt --
/Users/mkayala/org/test.gpg
gpg: can't open `/Users/mkayala/org/test.gpg'
gpg: decrypt_message failed: file open error
/sw/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter
--command-fd 0 --output /tmp/epg-output6114XJj --encrypt -r EFAE0C7BEEBB2B1F
[GNUPG:] PROGRESS stdin ? 0 0
[GNUPG:] BEGIN_ENCRYPTION 2 9
[GNUPG:] PROGRESS stdin ? 20 0
[GNUPG:] END_ENCRYPTION

And for the decryption:
/sw/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter
--command-fd 0 --output /tmp/epg-output6114kTp --decrypt --
/Users/mkayala/org/test.gpg
[GNUPG:] PROGRESS /Users/mkayala/org/t ? 0 607
[GNUPG:] ENC_TO 3D22E97EE828E82D 16 0
[GNUPG:] USERID_HINT 3D22E97EE828E82D Matt Kayala (MK) <
[email-masked]>
[GNUPG:] NEED_PASSPHRASE 3D22E97EE828E82D EFAE0C7BEEBB2B1F 16 0
[GNUPG:] GET_HIDDEN passphrase.enter
[GNUPG:] GOT_IT
[GNUPG:] GOOD_PASSPHRASE
gpg: encrypted with 2048-bit ELG-E key, ID E828E82D, created 2009-08-06
      "Matt Kayala (MK) <[email-masked]>"
[GNUPG:] BEGIN_DECRYPTION
[GNUPG:] PROGRESS /Users/mkayala/org/t ? 607 607
[GNUPG:] PLAINTEXT 62 1249671366
[GNUPG:] PLAINTEXT_LENGTH 20
[GNUPG:] DECRYPTION_OKAY
[GNUPG:] GOODMDC
[GNUPG:] END_DECRYPTION

If instead of using the epa-file, I try to directly do 'M-x epa-decrypt-file
RET test.gpg', I get the following error:

Decrypting test.gpg...0% (0/607)
epg-decrypt-file: Wrong type argument: listp, exit

And the corresponding " *epg-debug*" output:
/sw/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter
--command-fd 0 --output /Users/mkayala/org/test --decrypt --
/Users/mkayala/org/test.gpg
[GNUPG:] PROGRESS /Users/mkayala/org/t ? 0 607
[GNUPG:] ENC_TO 3D22E97EE828E82D 16 0
[GNUPG:] USERID_HINT 3D22E97EE828E82D Matt Kayala (MK) <
[email-masked]>
[GNUPG:] NEED_PASSPHRASE 3D22E97EE828E82D EFAE0C7BEEBB2B1F 16 0
[GNUPG:] GET_HIDDEN passphrase.enter
[GNUPG:] GOT_IT
[GNUPG:] GOOD_PASSPHRASE
gpg: encrypted with 2048-bit ELG-E key, ID E828E82D, created 2009-08-06
      "Matt Kayala (MK) <[email-masked]>"
[GNUPG:] BEGIN_DECRYPTION
[GNUPG:] PROGRESS /Users/mkayala/org/t ? 607 607
[GNUPG:] PLAINTEXT 62 1249671366
[GNUPG:] PLAINTEXT_LENGTH 20
[GNUPG:] DECRYPTION_OKAY
[GNUPG:] GOODMDC
[GNUPG:] END_DECRYPTION

Any help or thoughts you could give would be much appreciated!

Thanks,
-Matt Kayala

[email-masked] // [email-masked]
PhD Student
Institute for Genomics and Bioinformatics
School of Information and Computer Sciences
University of California, Irvine