Subject: Re: Cleartext Signatures

From: <[email-masked]>
Date: Mon, 10 Oct 2005 07:15:07 -0700

On Mon, 10 Oct 2005 03:43:05 -0700 Ben Laurie <[email-masked]> 
wrote:
>Section 7 says that the last bit of a cleartext signature is:
>
>"The ASCII armored signature(s) including the '-----BEGIN PGP 
>SIGNATURE-----' Armor Header and Armor Tail Lines."
>
>This is ambiguous, since in previous sections "Armor Header" has 
>referred to name/value pairs, of which there could be none or more 

>than 
>one, and not the "-----blah-----" line, which is called the "Armor 

>
>Header Line".
>
>Since I have seen signature both with and without headers (i.e. 
>some 
>with no headers do not have a blank line between the header line 
>and the 
>armoured text), I'd like to know what is actually correct here!
>
>Cheers,

also,
could there be a consensus on the maximum length of 
a comment or version line,

long version lines (example the freeware pgp editions)
wrap in gnupg,
and there is an error message of invalid armor heador,
and further attempts at decryption/verification are stopped

would suggest 64 characters, to keep it the same as the rest of the 
pgp armor

vedaa

Concerned about your privacy? Follow this link to get
secure FREE email: http://www.hushmail.com/?l=2

Free, ultra-private instant messaging with Hush Messenger
http://www.hushmail.com/services-messenger?l=434

Promote security and make money with the Hushmail Affiliate Program: 
http://www.hushmail.com/about-affiliate?l=427

---

From: Werner Koch <[email-masked]>
Date: Mon, 10 Oct 2005 16:45:37 +0200

> a comment or version line,

This is not OpenPGP's business.  There is a limit in rfc2822 at (iirc)
998 characters.  The real problem at hand is that some MUAs break
lines when they should not do so.

[To avoid this once and for all, use PGP/MIME.]

Shalom-Salam,

   Werner

---

From: Ian G <[email-masked]>
Date: Mon, 10 Oct 2005 15:52:29 +0100

> and further attempts at decryption/verification are stopped

It is possible to parse for the next empty line,
but I agree this is a pain, as there are other
artifacts that occur when extra empty lines are
inserted by conversions.

> would suggest 64 characters, to keep it the same as the rest of the 

The line length of the armor is not standard
IIRC, so this would not be a good guide.  A
better guide would be to be no longer than any
of the Head/Tail lines, as any slicing that
occurs in the Head/Tail lines will cause more
than normal chaos.

iang

PS:  with a nod to Ben's comment, I mean by
Head/Tail lines those lines that start with
----- in column 1.

---

From: Ben Laurie <[email-masked]>
Date: Mon, 10 Oct 2005 16:21:39 +0100

Ian G wrote:
> 
> [email-masked] wrote:
> 
>> also,
>> could there be a consensus on the maximum length of a comment or 
>> version line,
>>

Sigh. The I-D says armour lines are at most 76 characters.

-- 
http://www.apache-ssl.org/ben.html       http://www.thebunker.net/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

---

From: Ian G <[email-masked]>
Date: Mon, 10 Oct 2005 17:58:04 +0100

> lines when they should not do so.

There is no reason why OpenPGP can't impose a
tighter limit, and a quick scan of the doc did
not reveal mention of rfc2822 anywhere.  Either
way, ascii armor documents are OpenPGP's business,
wherever it got the format from.

> [To avoid this once and for all, use PGP/MIME.]

I for one choose not to, but I'm not religious
about it!

iang

---

From: Werner Koch <[email-masked]>
Date: Mon, 10 Oct 2005 20:00:45 +0200

> tighter limit, and a quick scan of the doc did

That won't help.  Some editors used by MUAs feel too clever and don't
allow a user to enter lines longer than the actual window.  When copy
and pasting an OpenPGP armored message it might get wrapped around.
So even 76 chracters may be too much.

A possible solution to this is to have the MUA (plugin) to cut or
remove such headers.

Salam-Shalom,

   Werner

---

From: Ian G <[email-masked]>
Date: Mon, 10 Oct 2005 19:48:40 +0100

> Sigh. The I-D says armour lines are at most 76 characters.

!IIRC, so replace 'standard' with fixed.

Getting back to the point of vedaal's kindly
provided suggestion, the length of the armour
lines is not fixed, and successive implementations
have wrestled with the length, gradually setting
it less as newer mailer and editor artifacts pop
out of the electronic woodwork.

My point is that the length of the Header/Tail Lines
and/or the Armor lines suggests a more effective
maximum to the length of the headers, as then the
headers themselves won't cause any problems.

If it is a big enough issue, I'd suggest adding
the following guidance:

     The format of an Armor Header is that of a key-value pair.  A colon
     (':' 0x38) and a single space (0x20) separate the key and value.
     OpenPGP should consider improperly formatted Armor Headers to be
     corruption of the ASCII Armor.  Unknown keys should be reported to
     the user, but OpenPGP should continue to process the message.
   ******
     From experience, implementations may limit or warn if the length
     of any Armor Header exceeds the length of other lines.
   ******

Or somesuch, towards end of page 49.  Here's an alternate:

   ******
     As messages may experience various transformations during
     transport, resiliance may be improved if Armor Headers are
     kept short, by for example being no longer than the length
     of other lines (Armor Header Lines or the Armor itself).
   *****

iang

---

From: Jon Callas <[email-masked]>
Date: Tue, 11 Oct 2005 13:26:38 -0700

>     of other lines (Armor Header Lines or the Armor itself).

Okay, but.

OpenPGP is not an email standard. It is a data format standard.

Yes, many uses of OpenPGP are in email. But not all, and possibly  
even not most. (I have heard it asserted that there are more signed  
files than emails.)

I remember a past argument about the comment header, for example,  
noting that an appropriately clever person could make a comment that  
would do something that someone doesn't like because of high-bit  
issues, character sets, etc. Our ending decision was to note that if  
you hurt yourself, you hurt yourself.

The only reason I would prefer not doing anything here is that I  
don't want to keep putting in hints for good interactions with  
mailers in 2440bis. We are a superset of mail.

The spec as it stands is clear, and someone who puts this into mail  
has to deal with long body lines in a cleartext message, anyway.  
They're the mail expert, I'm not.

     Jon

---

From: Ian G <[email-masked]>
Date: Tue, 11 Oct 2005 22:21:34 +0100

Jon Callas wrote:

> The spec as it stands is clear, and someone who puts this into mail  has 
> to deal with long body lines in a cleartext message, anyway.  They're 
> the mail expert, I'm not.

No problem, I withdraw the suggestion.  (I actually
tried to make it more concrete ... but found some
other issues that got into the cross-domain issues
that you mention.)

iang

---

From: Ben Laurie <[email-masked]>
Date: Wed, 12 Oct 2005 10:28:33 +0100

> the mail expert, I'm not.

OK, so what about the original problem (lack of clarity about headers)?