ietf-openpgp
[Top] [All Lists]

Re: Outstanding question - rule on cleartext signing last line

2005-12-28 21:24:04

On Wed, Dec 28, 2005 at 01:34:56PM -0800, Jon Callas wrote:

Which is not to say I care passionately about reversability. I would,
however, like to remove the ambiguity.

Can we say implementations SHOULD always add a newline, but they MAY
omit it if the plaintext ends with a newline (for backwards
compatibility)? That way nothing is broken, but future behaviour is  
defined.

I'm happy to make that change. In fact, I just did.

Forgive me, please, but I understood the rule before.  With this
change, I don't think I understand what is expected any longer.  Is
this added newline hashed into the signature?

Wouldn't "always" adding a newline cause text (with no line ending)
to become:

  -----BEGIN PGP SIGNED MESSAGE-----
  Hash: SHA1

  text

  -----BEGIN PGP SIGNATURE-----
  xxxxxx
  -----END PGP SIGNATURE-----

and text\n (with a line ending) to become:

  -----BEGIN PGP SIGNED MESSAGE-----
  Hash: SHA1

  text


  -----BEGIN PGP SIGNATURE-----
  xxxxxx
  -----END PGP SIGNATURE-----

If someone could post an example of what is now expected for "text"
and "text\n", I'd appreciate it.

GPG never adds a final newline to the hashed data, even if the
original document doesn't have one.  If there is a final newline in
the document, it is removed and not hashed into the signature.

Does this change to the draft make GPG noncompliant?

David