Problem decrypting large file.

Peter C. Chapin pchapin at
Mon Mar 20 18:14:17 CET 2006

Hello! I've googled a bit on this problem but I have not so far found
anything helpful.

I am using gpg v1.4.2 on Windows (*not* the Cygwin version of gpg). I
recently encrypted a rather large archive file... over 6 GBytes. However,
when I tried to decrypt it using exactly the same gpg program, I get
errors. Specifically the first 2.whatever GBytes decrypts fine and then I

gpg: [don't know]: invalid packet (ctb=0d)
File `backup.rar' exists. Overwrite? (y/N) y
gpg: [don't know]: invalid packet (ctb=07)
gpg: WARNING: message was not integrity protected
gpg: packet(6) with unknown version 205
gpg: fatal: cipher_decrypt: invalid mode 0
secmem usage: 1408/2208 bytes in 2/5 blocks of pool 2208/32768

In the screen capture above I selected "y" in response to the "Overwrite?"
prompt. The additional lines were printed afterwards. After selecting "y"
the output file was a small binary file with content that was meaningless
to me. In other runs when I select "n" in response to "Overwrite" my
output file is incomplete but otherwise fine. That is, the Rar program can
extract the files without any problems but complains about an "unexpected
end of file" when it finds the archive cut off.

I'm not sure what this error is telling me or if there is a way to force
gpg to move past it and attempt to decrypt the rest of the file. I can
live with a corrupt file or two, but I'd like to get at the other 4 GBytes
or so of my archive (I'm trying to restore my system after a hard drive

If gpg can't move past the error is it feasible to reach into the
encrypted file and "manually" modify the packet type to get gpg through
it? I'm prepared to write a program to do this and to study RFC-2440 to
figure out what such a program would need to do. Obviously I'd rather not
go through that trouble if it's not necessary. I understand it might not
even be possible.

Any advice you folks can offer would be much appreciated.



More information about the Gnupg-users mailing list