Werner Koch said:
7.2. Canonical Line Endings
As with binary signatures on text documents, a cleartext signature
is calculated on the text using canonical <CR><LF> line endings.
The line ending (i.e. the <CR><LF>) before the '-----BEGIN PGP
SIGNATURE-----' line that terminates the signed text is not
considered part of the signed text.
Also, any trailing whitespace (the characters <SPACE> (0x20),
<TAB> (0x09), <CR> (0x0D) and <LF> (0x0A)) at the end of any line
is removed and replaced by the sequence <CR><LF> for the purpose
of cleartext signature calculation.
I would modify Werner's proposed text like so, for grammatical clarity:
When calculating a cleartext signature, trailing whitespace
(defined as the characters <SPACE> (0x20), <TAB> (0x09),
<CR> (0x0D) and <LF> (0x0A)) at the end of any line shall be
removed and replaced by the sequence <CR><LF> for the purpose
of calculating the cleartext signature. This protects against
a failure of a valid signature due to many conversions that may
occur in text editing tools or in transport.
I think it is important to clarify both the definition and a little of the
reasoning behind this for readers and implementers of the RFC.
Regards,
- Brian