how to recover a clearsigned file?

David Roundy droundy at
Sat Mar 27 19:51:16 CET 2004

Hello everyone,

[Please c.c. me, as I'm not on the list.]

I'm wondering whether there is a correct way to recover the contents of a
clearsigned text file?  The --decrypt command seems to almost do this,
except that it corrupts lines that contain only a space (it removes the
space).  Why is it that --decrypt does this? Is it a bug?

Right now, what I'm now doing is looking for the
"-----BEGIN PGP SIGNED MESSAGE-----" line, and then removing the "- " from
all lines beginning with "- -" after that.  I'm not very comfortable doing
this, since I tend to fear that there might be an attack where someone
could put multiple "-----BEGIN PGP SIGNED MESSAGE-----" lines in a file,
and trick me into using the wrong signed contents.  Also, I'm not sure if
gnupg does anything other than escaping lines beginning with '-'.

In general, it seems like gpg ought to have *some* provision of extracting
the contents of a clearsigned file...
David Roundy

More information about the Gnupg-users mailing list