gpg: overwriting .pdf on encryption => decryption fails

Marius Hofert marius.hofert at math.ethz.ch
Thu Jun 21 11:47:59 CEST 2012


I'm not sure if I found a bug. I asked on stackoverflow where it was recommended
to write to this mailing list. Here is the link to the problem:
http://stackoverflow.com/questions/11134583/gpg-overwriting-pdf-on-encryption-decryption-fails 

For convenience, here is the problem description (as on stackoverflow):

I use gpg (GnuPG) 1.4.11. to encrypt a file foo.pdf via gpg -c foo.pdf. The encrypted file is then foo.pdf.gpg and, additionally, the original file foo.pdf exists. I can then decrypt foo.pdf.gpg via gpg foo.pdf.gpg as expected. However, if I use gpg -o foo.pdf -c foo.pdf and choose to overwrite the existing file on encryption, then use gpg foo.pdf to decrypt the encrypted file, and finally choose to overwrite the existing file foo.pdf (again), the file is still protected and can't be viewed.

I then tried to execute gpg foo.pdf again (I thought decrypting failed the first time, that's why I tried it again). Now the file seems to be corrupted: "gpg: [don't know]: 1st length byte missing"

Cheers,

Marius

PS: I'm working on Xubuntu 12.04





More information about the Gnupg-devel mailing list