gpg writes junk forever when decrypting

Henry Hertz Hobbit hhhobbit at securemecca.net
Tue Dec 12 19:57:10 CET 2006


"Gou Yang" <mega408 at hotmail.com> wrote:

> Hello,
>
> I think I've hit a bug in gpg. When I try and decrypt a corrupt
> pgp file, it  looks like it is working but when it hits the
> corrupt part of the file, I see this error pop up:
>
> gpg: no valid OpenPGP data found.
> gpg: block_filter 0x80e8ac0: read error (size=11072,a->size=27456)
> gpg: block_filter 0x80e8a98: read error (size=14947,a->size=39523)
>
> When this error pops up, gpg goes out of control and starts
> appending junk to the decrypted file and never stops appending
> junk.
>
> I've let it sit up to 50GB before I killed gpg. The original file
> is only about 1GB but I wanted to see if it would ever stop. I've
> looked around but  I didn't see anyone else who had this problem
> and resolved it.
>
> I could verify the signature prior to attempting to decrypt the
> file but the file isn't signed.
>
> Any suggestions? Any workaround? Anyone else have this problem?

I have tried this with the following combinations (my default
symmetric cipher is TWOFISH).

1. Encrypted symmetrically with TWOFISH, AES192, AES256, DES,
   and BLOWFISH ciphers.

   gpg -a -c --force-mdc --cipher-algo ${CIPHER} \
      < ReadMe.txt > ReadMe.txt.asc

   Twiddled two characters in ReadMe.txt.asc.  Tried to decrypt with:

   gpg -d < ReadMe.txt.asc > ReadMe.txt

   Result: decryption stopped, output file size ZERO.

2. Encrypted and signed asymmetrically to myself with TWOFISH,
   AES, and AES256 used for the symmetric ciphers.

   gpg -a -r hhhobbit at securemecca.net -e -s \
      < ReadMe.txt > ReadMe.txt.asc

   Twiddled two characters in ReadMe.txt.asc.  Tried to decrypt with:

   gpg -d < ReadMe.txt.asc > ReadMe.txt

   Result: decryption stopped, output file size ZERO.

3. On a file that is just a text file I get the following message:

gpg: no valid OpenPGP data found.
gpg: decrypt_message failed: eof

I have tried the use of several more symmetric ciphers and the
result is always the same.  The instant I twiddle just two
characters in the encrypted [ / signed ] file I can't decrypt
and the output file size is ZERO.  The failure given for the
asymmetric encryption is this for one of them:

gpg: CRC error; 2DC30B - 9AAB55
gpg: encrypted_mdc packet with unknown version 255

And the one I get for symmetric encrypion is this for one
of them:

gpg: CRC error; 404350 - 94DB54
gpg: encrypted_mdc packet with unknown version 255

In all cases if it failed, I end up with the output file
being of size ZERO.  I am using 1.4.6 with keys that were
created with 1.4.2 (at least I believe that was what it was).

I suspect you have either a damaged file system or damaged
keys.  But without more particulars I don't know what you are
looking at, because in all cases, I end up with a file size of
ZERO.  That also happens when I delete quite a few characters.

HHH



More information about the Gnupg-users mailing list