Re: Outstanding question - rule on cleartext signing last line

hal@finney.org ("Hal Finney") Tue, 27 December 2005 17:51 UTC

Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1ErIyW-00041B-3r for openpgp-archive@megatron.ietf.org; Tue, 27 Dec 2005 12:51:04 -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 MAA20825 for <openpgp-archive@lists.ietf.org>; Tue, 27 Dec 2005 12:49:52 -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 jBRHY3XW055548; Tue, 27 Dec 2005 09:34:03 -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 jBRHY3x8055547; Tue, 27 Dec 2005 09:34:03 -0800 (PST)
X-Authentication-Warning: above.proper.com: majordom set sender to owner-ietf-openpgp@mail.imc.org using -f
Received: from finney.org (226-132.adsl2.netlojix.net [207.71.226.132]) by above.proper.com (8.12.11/8.12.9) with ESMTP id jBRHY02n055538 for <ietf-openpgp@imc.org>; Tue, 27 Dec 2005 09:34:03 -0800 (PST) (envelope-from hal@finney.org)
Received: by finney.org (Postfix, from userid 500) id B2B1A57F5B; Tue, 27 Dec 2005 09:38:05 -0800 (PST)
To: ietf-openpgp@imc.org
Subject: Re: Outstanding question - rule on cleartext signing last line
Message-Id: <20051227173805.B2B1A57F5B@finney.org>
Date: Tue, 27 Dec 2005 09:38:05 -0800
From: hal@finney.org
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>

I'd suggest that clearsigning is aimed more at applications which will
present the signed document to users as it was received "on the wire",
so that they can read it usefully even with the signature in place.
For that purpose the important thing is to know exactly how the signature
will be verified so that signers can create valid documents.  I think
we agree that the spec is adequate for this purpose.

For data interchange, you want to start with a document on one machine
and sign or encrypt it, send it to another machine and verify/decrypt,
getting back the same document.  For that purpose the binary formats
work well.

The problem arises if you want to clearsign but still get data
interchange.  The sender needs to know not only how the data will get
verified, but also how it will be stored if the signature is stripped
away.  We didn't spec this because it didn't seem to fit that well into
the clearsign model, which is oriented around presenting data with the
signatures in place.

So what are the rules for storing a clearsigned message, with signature
stripped away?  Would we just want to store the byte stream that
was hashed (the portion of it that was from the message and not the
signature bytes)?  Or would we want to switch to native line terminators
when we store?  Would we strip or keep trailing whitespace when we store?

If we did spec this, it would then by implication tell a sender how
to at least approximate data interchange.  Problems might arise if line
terminators are getting changed.  And if we strip trailing whitespace when
we store, then it would be impossible to send a document with trailing
whitespace and have it be received that way.  OTOH the reason we strip
trailing whitespace for verification is because some mail systems corrupt
that part, so retaining trailing whitespace on store will not guarantee
data interchange either.

In short, clearsigning is not really appropriate for data interchange
because of how many ways the message could be corrupted in transit.

But if we do spec it, I would definitely NOT then put in the spec that
a sender was FORCED to offer a data interchange option!  That is far,
far outside anything we should be imposing on an implementation, in a
data format spec.

Hal Finney