Think-o shows that GPG could helpfully read PGP block headers

Hugh Daniel hugh at road.xisp.net
Thu Dec 13 00:26:02 CET 2001


-----BEGIN PGP SIGNED MESSAGE-----

  So I just make the mistake of trying to decrypt a PGP public key
block and got a message that made me (thinking it was an encrypted
public key block) go trying to figure out where things got crouped.
Here is the example:

ahost$ gpg --decrypt foo
gpg: decrypt_message failed: unexpected data
ahost$ head foo
- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

mQCNAzIGfh0AAAEEAPDl8OmY0l50R1l3JR3BOHVdf04eYcuQaUy4Mnh+fe9ZiQ/o
gIjvfwOM6IR1HwHA7I2jqf4XD9St8wNA4Jd4TvtgdCL9jhoSpC1anJD3dBOqoMPl
BU+vGId8+k3XY4NwL3nsHk9OiRcvbCqFwmVZBcMmd5njwMMlelZpdJR7FBQRAAUR
tCBIdWdoIERhbmllbCA8aHVnaEByb2FkLnhpc3AubmV0PokAlQMFEDovrR9WaXSU
exQUEQEBe98EAM5KeT87O+Tc2P77FCdB3QqrDYv8uk7M8XuluLjurHokvnCHQEwf
wLNARYm1KLekps093rNI6iOgXoihyYDrEEKe03O5+52OqPvUPUPqDPhRqj9oCC/K
ahost$ 

  I would suggest that you change the code to look at the PGP header
and report that the file/pipedata is not an encrypted block but a
public key block and this decrypting is nonsensical.

		||ugh Daniel
		Testing Fool
		hugh at freeswan.org

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: For the matching public key, finger the Reply-To: address.

iQCVAwUBPBfmr1ZpdJR7FBQRAQHZUQQA2YLRfnInkJZo7/z98iL1rILTYWuv3/D2
xR44wXMEcC/gtoKpaHob2uKKGrlKWRBULxSFUezd31HPFVZwCOvQq/KzuUSp8DWw
3hdEx9OSuW59mnS5gBRAlxS4hx2agJ02QBXP9135h78spAvIZy+GcoKJX4I+tMpW
C+6s77r4iTI=
=bPMV
-----END PGP SIGNATURE-----




More information about the Gnupg-devel mailing list