Help with decrypting gpg file

Erik Lotspeich erik at lotspeich.org
Tue Aug 25 23:37:17 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi John,

What you are talking about sounds like a non-standard PGP feature.  I
would definitely not recommend using this type of "mis-feature" as it
breaks standards and limits compatibility.

I would suggest creating zip archives normally (in the standard way
using pkzip or its equivalent) and then encrypting them separately
(again, in the standard way).  This way, you can decrypt the archive
with GnuPG and then unzip the file with the 'unzip' command afterwards.

As it is now, you may want to use a hex editor like "bvi" (binary vi) or
 even dd (with an offset) to remove the "garbage" and "fix" the file so
you can use GnuPG to decrypt it normally.

Regards,

Erik

John Betz wrote:
> Erik,
> 
> Thanks a lot for your response. I can successfully decrypt files with one
> exception - those that are zipped or archived. In this case the source file
> was created using Power Archiver. When the file is decrypted, there is
> garbage in the first record. It's as if gpg doesn't recognize that the input
> file is an archive file. (When I use PGP, the output file is automatically
> created as a WinZip compatible archive file when it is decrypted.)
> 
> By the way, I did use your recommended command string and got the same
> result. I suspect there is some kind of option that is required so that gpg
> knows that the output file should be created as an archive type file.
> 
> Thank you very much for your help.
> 
> John
> (office) 703-490-3227
> (cell) 703-304-2536
> 
> -----Original Message-----
> From: Erik Lotspeich [mailto:erik at lotspeich.org] 
> Sent: Tuesday, August 25, 2009 4:58 PM
> To: John Betz
> Cc: gnupg-users at gnupg.org
> Subject: Re: Help with decrypting gpg file
> 
> Hi John:
> 
> I would just do this:
> 
> gpg --decrypt input.pgp > output.txt
> 
> Let gpg prompt for your passphrase.  That way, your passphrase is not
> part of bash history.
> 
> If that doesn't work, let us know what error messages are you getting
> from GnuPG.
> 
> Regards,
> 
> Erik.
> 
> John Betz wrote:
>> I was hoping to get some help with decrypting an archived file. I am
>> using the following command:
> 
> 
> 
> 
> 
>> echo "passphrase"| gpg --passphrase-fd 0 -o output.txt -d input.pgp
> 
> 
> 
> 
> 
>> The output file is created with no problem, however, there is garbage in
>> the first record. If I rename the file (or create it) with a .zip
>> extension and try to open it with WinZip it does not recognize the file
>> as an archive file. When I do the same operation with PGP there is no
>> problem.
> 
> 
> 
>> I have scoured the documentation looking for the correct command or
>> option for indicating to gpg that the file is an archive file, but no to
>> no avail. Any help I can get with this would be appreciated.
> 
> 
> 
>> Thanks,
> 
> 
> 
>> John Betz
> 
>> (office) 703-490-3227
> 
>> (cell) 703-304-2536
> 
> 
> 
> 
>> ------------------------------------------------------------------------
> 
>> _______________________________________________
>> Gnupg-users mailing list
>> Gnupg-users at gnupg.org
>> http://lists.gnupg.org/mailman/listinfo/gnupg-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkqUWY0ACgkQY21D/n6bGwc9vwCfbkozbXnTsYODSoDOAx4zmYQD
5MQAn3ckBknw1hfWxn10DIJ+TQEyxrXb
=WkhW
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list