gpg --encode / gpg --decode round-trip breaks my files

Ed Halley
Thu Jun 6 21:31:02 2002

I'm having trouble with encryption of binary files on Linux.

If I understand correctly, the round-trip through --encrypt and
--decrypt should be identical.  I would do this sort of encryption with
PGP on Windows many times, but cannot with GPG and the same key, or even
a newly generated key.  GPG gives no error messages, but breaks the

	$ gpg --encrypt -r -o wells.gif.gpg wells.gif

	$ gpg --decrypt -o wells.gif.out wells.gif.gpg
	You need a passphrase to unlock the secret key for
	user: "Ed Halley <>"
	2048-bit ELG-E key, ID A669777F, created 1998-11-09
		(main key ID 683D30B4)
	gpg: encrypted with 2048-bit ELG-E key, ID A669777F,
		created 1998-11-09
		"Ed Halley <>"

	$ md5sum wells.gif*
	9358f8ec41aa54322bddd73502781613  wells.gif
	ea0c56c3ba88a2b176ef330cabfed99f  wells.gif.gpg
	e05e9d647c270af085ad16f745fae72b  wells.gif.out

Upon hexdump inspection of wells.gif.out vs wells.gif, the bytes are
similar, but get out of sync after a few dozen bytes.  This happened
near some 0x09 0x0A bytes, by chance, in this test.  Is this some
strange ASCII newline assumption artifact?  Binary files don't need to
be encoded first, do they?

Other data:  this is Red Hat Linux 7.3 (Valhalla) with all updates,
giving a GPG version 1.0.6.

[ e d @ h a l l e y . c c ]