Encrypt/decript large files

Eric Harlow linuxgeek at yahoo.com
Sun Jun 29 18:40:15 CEST 2003


In my first test, I did

type file.bak | gpg -o output.gpg --encrypt

The 4.799 gig file was cut to 368 meg.

I ran both

gpg -o result output.gpg
type output.gpg | gpg -o result2

The decrypted files ended up being the same at
504,520,704, but this is not the original file as the
size is waaaaay different.  (Perhaps it got rid of
unneeded data? <g>)

Trying to encrypt with -z0 with the original 4.799 gig
file using

type backup.tar | gpg -o backup.gpg -z0 --encrypt

resulted in a file of 504,644,211 - which didn't seem
right. 

When I decrypted it, it was 504,520,704 - which isn't
the original, but there were no errors reported.

If I encrypt using:

gpg -o backup.gpg --encrypt backup.tar

I end up with a 3.222 gig file.

If I decrypt it, I using 

type backup.gpg | gpg --decrypt -o backup5.tar

I end up with errors:

gpg: [don't know]: invalid packet (ctb=00)
gpg: [don't know]: invalid packet (ctb=00)
gpg: WARNING: encrypted message has been manipulated!
gpg: [don't know]: invalid packet (ctb=00)
The process tried to write to a nonexistent pipe.

I haven't done the Linux test due to time and disk
space constraints.  Soon...

--- David Shaw <dshaw at jabberwocky.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tue, Jun 24, 2003 at 09:45:39AM -0700, Eric
> Harlow wrote:
> > 
> > Sorry for the delay in getting back.  It takes a
> while
> > to run the tests and there's so many other things
> > going on.
> > 
> > Using -z0 to encrypt a large file results in
> similar
> > errors - bad packets, message manipulated, etc. 
> The
> > largest file I got to work was a bit over 2.3 gig.
> 
> > Somewhere over that, it fails.  This error
> occurred on
> > a file of 4,799,488,000.  
> > 
> > I have not tried this on Linux due to lack of free
> > space.  Would it be helpful to see if it occurs on
> > Linux too? 
> 
> That would be helpful, yes.  I expect it will work
> on Linux.
> 
> It is not clear whether this is a problem encoding
> or decoding.  Can
> you try this on NT:
>   type (thefile) | gpg -o output.gpg --encrypt 
> 
> If that doesn't work:
> 
>   type (thefile) | gpg -o output.gpg -z0 --encrypt
> 
> That is, try piping the data in rather then giving
> the filename on the
> command line.  Then, try decrypting the output.gpg
> file via both:
> 
>   gpg -o result output.gpg
> and
>   type output.gpg | gpg -o result
> 
> David
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3rc1 (GNU/Linux)
> Comment: Key available at
> http://www.jabberwocky.com/david/keys.asc
> 
>
iD8DBQE++Lcj4mZch0nhy8kRAihhAJoD0SrkbVxwXRwBsmN/GV9aldMd9QCfSuWM
> 3utp+VsxrgvI/9Se5+g4GrA=
> =BrEB
> -----END PGP SIGNATURE-----


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com




More information about the Gnupg-devel mailing list