Subject: Re: 2.1, 2.2 and 10.2 Clarification re sigs.

From: [email-masked]
Date: Wed, 19 Jul 2000 09:35:18 -0700

> that is, should the specification say:
>
>  Signed Message :- OpenPGP Message, Signature Packet | One-Pass Signed Message
>
> or
>
>  Signed Message :- Signature Packet, OpenPGP Message | One-Pass Signed Message

The spec is correct; it is the latter.  Signature packets have *always*
come at the front, since back in PGP 1.0.  If you have seen messages
that were different (and not one-pass signed messages), you have seen
invalid messages.

With regard to Erron Criddle's earlier question:

> To me, "attached" (as in 2.1 and 2.2) means you add it to the end of 
> something and this contradicts 10.2 explanation of a Signed Message (a 
> signed message implies that it is prepended, not attached).

Not to me.  That word would be "appended".  "Attached" is not meant to
imply any ordering.  2.1 and 2.2 are meant to give a very rough overview
of the steps involved in creating an OpenPGP message, not to be a detailed
specification of the process.  That is for the rest of the document.

> By reading section 10.2, it seems that there are two possibilities for 
> signing a literal message:
>
> 1) You create a signature packet then prepend it to the literal packet
>
> 2) You create a signature packet and a One-Pass Signature Packet then 
> prepend the One-Pass packet to the literal packet and append the signature 
> packet to the literal packet.
>
> Therefore, my final questions are:
>
> 1) Can you create a simple signature packet and attach it to the end of a 
> literal packet as stated in 2.1 and 2.2 and subsequently contradict 10.2 
> regarding the definition of a signed message and:

2.1 and 2.2 don't say that, and you can't do this.

> 2) Why would you need a One-Pass Signature Packet if we conform to 10.2 and 
> simply prepend a normal signature packet to the literal data with a 
> subpacket of type 16 (key id), thus removing the need for a One-Pass packet 
> in the first place?

This is so that the signer can process the message in one pass.
He doesn't know the hash until he comes to the end of the message,
so he can't compute the signature until that time.  With the old-style
signature packets he would then have to go back to the beginning of the
message and put the sig there, preventing one-pass processing.

Hal

---

From: Erron Criddle <[email-masked]>
Date: Thu, 20 Jul 2000 09:44:19 +0800

At 09:35 AM 19/07/2000 -0700, [email-masked] wrote:

<snip>

> > 2) Why would you need a One-Pass Signature Packet if we conform to 10.2 
> and simply prepend a normal signature packet to the literal data with a

Thanks Hal.

Also looked at 2.1 and saw I assumed that "attached" meant "appended" - 
sorry for the wasted bandwidth.

Regards

Erron Criddle
Comasp Ltd.
Level 2, 45 Stirling Hwy
NEDLANDS  WA  6009

Fax: 08 9386 9473
Tel: 08 9386 9534

http://www.comasp.com
[email-masked]

---

From: [email-masked]
Date: Thu, 20 Jul 2000 11:32:45 +0900

From: [email-masked]
Subject: Re: 2.1, 2.2 and 10.2 Clarification re sigs.
Date: Wed, 19 Jul 2000 09:35:18 -0700
Message-ID: <[email-masked]>

> that were different (and not one-pass signed messages), you have seen

i think i must have been looking at a one-pass signed message.  

yes, it looks like that's what i did.  sorry for that, and thanks for
the clarification.