Re: Outstanding question - rule on cleartext signing last line

David Shaw <dshaw@jabberwocky.com> Mon, 26 December 2005 16:50 UTC

Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1EqvYk-0004qB-4e for openpgp-archive@megatron.ietf.org; Mon, 26 Dec 2005 11:50:54 -0500
Received: from above.proper.com (above.proper.com [208.184.76.39]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id LAA05107 for <openpgp-archive@lists.ietf.org>; Mon, 26 Dec 2005 11:49:44 -0500 (EST)
Received: from above.proper.com (localhost.vpnc.org [127.0.0.1]) by above.proper.com (8.12.11/8.12.9) with ESMTP id jBQGdG3E094022; Mon, 26 Dec 2005 08:39:16 -0800 (PST) (envelope-from owner-ietf-openpgp@mail.imc.org)
Received: (from majordom@localhost) by above.proper.com (8.12.11/8.12.9/Submit) id jBQGdGhd094021; Mon, 26 Dec 2005 08:39:16 -0800 (PST)
X-Authentication-Warning: above.proper.com: majordom set sender to owner-ietf-openpgp@mail.imc.org using -f
Received: from foobar.cs.jhu.edu (foobar.cs.jhu.edu [128.220.13.173]) by above.proper.com (8.12.11/8.12.9) with ESMTP id jBQGdFpD094013 for <ietf-openpgp@imc.org>; Mon, 26 Dec 2005 08:39:15 -0800 (PST) (envelope-from dshaw@jabberwocky.com)
Received: from walrus.hsd1.ma.comcast.net (walrus.hsd1.ma.comcast.net [24.60.132.70]) by foobar.cs.jhu.edu (8.11.6/8.11.6) with ESMTP id jBQGdES03937; Mon, 26 Dec 2005 11:39:14 -0500
Received: from grover.jabberwocky.com (grover.jabberwocky.com [172.24.84.28]) by walrus.hsd1.ma.comcast.net (8.12.8/8.12.8) with ESMTP id jBQGdAX6032110; Mon, 26 Dec 2005 11:39:10 -0500
Received: from grover.jabberwocky.com (grover.jabberwocky.com [127.0.0.1]) by grover.jabberwocky.com (8.13.1/8.13.1) with ESMTP id jBQGd8sp031027; Mon, 26 Dec 2005 11:39:08 -0500
Received: (from dshaw@localhost) by grover.jabberwocky.com (8.13.1/8.13.1/Submit) id jBQGd8n0031026; Mon, 26 Dec 2005 11:39:08 -0500
Date: Mon, 26 Dec 2005 11:39:08 -0500
From: David Shaw <dshaw@jabberwocky.com>
To: Ian G <iang@systemics.com>
Cc: OpenPGP <ietf-openpgp@imc.org>
Subject: Re: Outstanding question - rule on cleartext signing last line
Message-ID: <20051226163908.GC7066@jabberwocky.com>
Mail-Followup-To: Ian G <iang@systemics.com>, OpenPGP <ietf-openpgp@imc.org>
References: <43980274.2080404@iang.org> <20051208104150.GA14918@epointsystem.org> <43981C74.1070403@systemics.com> <87bqzrhj6i.fsf@wheatstone.g10code.de> <20051208145205.GA5943@jabberwocky.com> <43AFE21B.1000102@algroup.co.uk> <20051226153615.GB7066@jabberwocky.com> <43B0184C.6010505@systemics.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <43B0184C.6010505@systemics.com>
OpenPGP: id=99242560; url=http://www.jabberwocky.com/david/keys.asc
User-Agent: Mutt/1.5.11
Sender: owner-ietf-openpgp@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-openpgp/mail-archive/>
List-Unsubscribe: <mailto:ietf-openpgp-request@imc.org?body=unsubscribe>
List-ID: <ietf-openpgp.imc.org>

On Mon, Dec 26, 2005 at 04:20:28PM +0000, Ian G wrote:
> David Shaw wrote:
> 
> > Can you give an example of why you feel this is a bug?
> 
> I think it is a bug if we decide that the
> process of cleartext signing is reversable.

Can you please give an example of how the current system is not
reversible?

As far as I can see, the current system is quite reversible.  For
example, given a document reading "this is a test" (no line ending,
and the last character in the file is the second t from test), here's
a clear signature:

  -----BEGIN PGP SIGNED MESSAGE-----
  Hash: SHA1
  
  test  <<-----  There is a CRLF here, but it is NOT PART OF THE SIG
  -----BEGIN PGP SIGNATURE-----

  blah blah blah
  -----END PGP SIGNATURE-----

Now given a document reading "this is a test<LINEENDING>", here's a
clear signature:

  -----BEGIN PGP SIGNED MESSAGE-----
  Hash: SHA1
 
  test  <<----- There is a CRLF here and it IS PART OF THE SIG
  <<-----  There is a CRLF here, but it is NOT PART OF THE SIG
  -----BEGIN PGP SIGNATURE-----

  blah blah blah
  -----END PGP SIGNATURE-----

In what way is this not reversible?

> So, if the process of verification creates
> a file that is the pre-signed version, then
> it has to decide whether the final CRLF has
> to be preserved or stripped in the unsigned
> output.

The final CRLF is not part of the document.  If a user/implementation
wants a final CRLF in there that is part of the document, they need to
add one.

Think of the "BEGIN PGP SIGNATURE" string as actually being
"CRLF-----BEGIN PGP SIGNATURE".  It's part of the message structure
and not part of the signed text.

David