GPG corruption

Bill Broadley bill at cse.ucdavis.edu
Fri Feb 11 02:23:10 CET 2005


On Fri, Feb 11, 2005 at 12:28:54AM +0000, Neil Williams wrote:
> On Thursday 10 February 2005 10:22 pm, Bill Broadley wrote:
> > This is with [root at csebeo v]# gpg --version
> 
> Why as root???? 

Because as a user I didn't have enough space to keep multiple copies
of a 4GB file around for debugging.  Fixed.

> > gpg (GnuPG) 1.2.1
> >
> > I put 12 files into a .tar:
> > tar cvzf b.tar bp*
> 
> If you use -z, you will get a compressed archive - it could be confusing to 
> give this the name .tar which usually refers to an uncompressed archive:
> .tar.gz for -z

Agreed, I'm reconstructing this from my command history, the original
files are gone, er well encrypted.  I had tried z, but after realizing I
was getting a significant slow down and zero compression I reran the
command without the z and ended up with just a .tar file.

> > The resulting file is partially there:
> > $ ls -alh b.tar
> > -rw-r--r--    1 root     root         103M Feb 10 14:16 b.tar
> >
> > Tar seems to think it's valid:
> > tar tvf bg-s01-s12.tar
> 
> Now you've stopped using -z - what's going on?

Sorry, I pasted the wrong command from my history, the .tar is not 
compressed.

> > drwxrwxr-x root/root        0 2005-01-28 17:51:28 bpdata/
> > -rw-r--r-- root/root 36955832 2005-01-16 17:47:40 bpdata/bd.001
> >
> > Any ideas?
> 
> Make absolutely sure what you are doing and use names that help others see 
> what you are doing, also avoid using root whenever possible.

I encrypted a tar file using gpg -c, and now when I try to decrypt
I get:
[bill at csebeo v]$ /opt/pkg/gnupg-1.4.0/bin/gpg --output b.tar b.tar.gpg
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
<pause for several seconds>
gpg: [don't know]: invalid packet (ctb=75)
gpg: uncompressing failed: unknown compress algorithm
<pause for many seconds>
gpg: WARNING: message was not integrity protected
[bill at csebeo v]$ ls -alh
total 4.2G
drwxr-xr-x    2 bill     root         4.0K Feb 10 16:44 .
drwxr-xr-x    5 bill     root         4.0K Feb  8 01:38 ..
-rw-rw-r--    1 bill     bill         103M Feb 10 16:44 b.tar
-rw-r--r--    1 bill     root         4.1G Feb  1 23:25 b.tar.gpg

b.tar seems intact for the first 103MB, and b.tar.gpg seems populated
with random looking binary stuff all the way out to 4.1GB.  I.e. it's not
zero filled over the (possible) 2GB limit.  
 
-- 
Bill Broadley
Computational Science and Engineering
UC Davis



More information about the Gnupg-users mailing list