Cannot encrypt/decrypt zip-Files correctly

David T-G davidtg-gnupg@justpickone.org
Tue Jun 4 18:27:01 2002


--D6z0c4W1rkZNF4Vu
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Andreas --

=2E..and then akorthaus@web.de said...
%=20
% Hi!

Hello!


% I=B4ve got a strange problem.  I try to encrypt a gz-file on my Linux Ser=
ver
=2E..
% (17:23:59) [webseite] gpg -o out.txt -a -e --default-recipient akorthaus
% mysql.zip

You're encrypting (binary) a zip file (binary) and saving it as a .txt
(text) file.  That doesn't sound too good right there.  Why not encrypt
to file "out" or "out.gpg" or "out.enc" or just about anything else?


%=20
% in the same way I encrypted html-files which I could decrypt without any
% problems.

Good enough, but not conclusive; HTML does fine with ASCII translations.


%=20
% Now I open out.txt and copied the code to my clipboard. After that I open=
ed

Aha!  How did you get the file from your Linux server to your PC?  If you
used ftp, did you specifically set BINARY mode?  If you used http, did
you figure out a way to set binary (I never have)?


% WinPT and decrypted the code from clipboard, that worked correctly, but t=
he
% result was:
%=20
% Zip!=1A=07

That's the leading magic of a zip file, IIRC, but the rest will be lst at
the first LF that's incorrectly translated to CR+LF.


%=20
% As I allready said - the same way worked with html Files!
%=20
% What could be the problem, or how can I decrypt complete files using WinP=
T?

Transfer your files in binary mode for starters.


%=20
% cu
% Andreas


HTH & HAND

:-D
--=20
David T-G                      * It's easier to fight for one's principles
(play) davidtg@justpickone.org * than to live up to them. -- fortune cookie
(work) davidtgwork@justpickone.org
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!


--D6z0c4W1rkZNF4Vu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD4DBQE8/OqdGb7uCXufRwARAsh1AJj/XDKUD08IISNKwJzI1acY8PNgAKDQT/s8
CpkvvbnW4FPe34eNeQs7sA==
=EQnt
-----END PGP SIGNATURE-----

--D6z0c4W1rkZNF4Vu--