Subject: [ISSUE] End-of-line whitespace in 0x01 sigs

From: David Shaw <[email-masked]>
Date: Tue, 26 Oct 2004 17:10:28 -0400

In section 5.2.1, the text currently reads:
 
   0x01: Signature of a canonical text document.
       This means the signer owns it, created it, or certifies that it
       has not been modified.  The signature is calculated over the
       text data with its line endings converted to <CR><LF> and
       trailing spaces (0x020) and tabs (0x09) removed.
  
I suggest:
 
   0x01: Signature of a canonical text document.
       This means the signer owns it, created it, or certifies that it
       has not been modified.  The signature is calculated over the
       text data with its line endings converted to <CR><LF>.
 
This is the same as before but trailing whitespace is not removed.
Note that I'm only talking about 0x01 signatures here.  Cleartext
signatures, and the trimming therein, are unchanged by this.
 
Rationale: As much as possible, I feel that the data that you get out
during decryption should be the same as the data that you put in to be
encrypted, and the current behavior violates this.

There are good reasons to do whitespace trimming for cleartext
signatures (mail mangling, cut and paste mangling, etc).  These
reasons do not apply to an 0x01 signature as it is *not* cleartext -
rather, it is protected inside the binary or ascii armor shell.  In
general, if we have no good reason to tamper with user supplied input,
I think we should keep hands off.

Speaking about PGP and GnuPG, there is no real impact to this change.
The only messages that are affected are detached 0x01 signatures, and
since those don't interoperate now (never did), we can hardly make it
worse...

David

---

From: Jon Callas <[email-masked]>
Date: Tue, 26 Oct 2004 14:35:43 -0700

I made this change, and I'll also make a comment that's my opinion:

If you have an implementation that's trimming, you don't have to change.

If you think that trimming is a good idea, go right ahead.

There is nothing in OpenPGP that says that an implementation can't make 
reasonable transformations on text. This includes trimming, but also 
things like reformatting paragraphs with line ends into paragraphs 
without. Your user base might howl, but that's between you and them.

I hope this finally puts this to rest. I apologize to the working group 
for the whole mess.

	Jon