encrypt multiple files into one singlefile and then decrypt backthe original multipe files

Newton Hammet newton@hammet.net
Wed Oct 2 01:14:02 2002


Doug Gorley wrote:
> 
> >
> >   zip - file1 file2 file3 file4 file5 | gpg -eat > outfile.zip.asc
> >
> 
> Interesting.  I'm trying to do this using tar and gzip instead of zip,
> but I'm running into some trouble.  The command I'm trying is:
> 
>   tar -cz *.jpg | gpg -eatr douggorley > files.tar.gz.asc
> 
> Everything appears to work correctly, but once I decrypt the file,
> gunzip won't recognise it.  Any ideas?
> 
> --
> Doug Gorley | douggorley@shaw.ca     OpenPGP Key ID: 0xA221559B
> Fingerprint: D707 DB92 E64B 69DA B8C7  2F65 C5A9 5415 A221 559B
> Interested in public-key cryptography?    http://www.gnupg.org/
> 
>   ------------------------------------------------------------------------
>                        Name: signature.asc
>    signature.asc       Type: application/pgp-signature
>                 Description: This is a digitally signed message part

I would say try the following :::

1. Put all files in one directory, say encrypted_files.

2. In the parent directory:

Cmdln> tar -covf - encrypted_files |gzip >encrypted_files.tar.gz
Cmdln> gpg -sear localid encrypted_files.tar.gz

3. And to decrypt (to test)

Cmdln> gpg -d encrypted_files.tar.gz.asc >decrypted
Cmdln> md5sum encrpted_files.tar.gz decrypted (or diff, to check whether
they match)

I say use any localid for which you have secret to test first this is
what i did doing
the above and it worked for me.

Regards, Newton