TAB at EOL (GPG and PGP interoperability)

David Shaw
Thu Jan 9 22:55:02 2003

On Thu, Jan 09, 2003 at 12:02:04PM -0800, Knut Forkalsrud wrote:
> I'm using GPG version 1.2.1 and some files signed using PGP 7.0.4 have
> caused problems.  It turns out that the problem files have trailing
> TAB characters on some lines.  All PGP versions I have tried can
> verify the signature easily, but GPG insists it's a BAD signature.  Is
> this a feature or a PGP bug or a GPG bug?  I have briefly looked at
> the FAQ, but I didn't find the answer there.

This is a bug in PGP.  The OpenPGP standard dictates that "...any
trailing whitespace (spaces, and tabs, 0x09) at the end of any line is
ignored when the cleartext signature is calculated."  PGP only ignores
spaces and includes tabs.

GnuPG can automatically detect and fix this problem in PGP 2 messages,
but there is no way to tell with PGP 5.x and later.


   David Shaw  |  |  WWW
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson