Subject: V4 Sig. incomplete?

From: Erron Criddle <[email-masked]>
Date: Tue, 13 Jun 2000 12:01:55 +0800

To all concerned:

With reference to 5.4; the second last paragraph states that a version 4 
signature has a final trailer of 6 octets, being:

0x04 or 0xFF, a four octet big endian number

This is only 5 octets...does anybody know what the 6th octet is? ...or is a 
V4 signature final trailer only 5 octets?

TIA for the clarification.

PS: Can anyone please confirm the following (hashed data is appended by the 
| symbol)

1) V4 Sig., type 0x10. Hash then concatenate the following for feeding into 
the DSA (assuming DSA sig):

public DSA keys (this line not hashed)

0x99					|
2 octet length				|
MPI of DSA prime p			|
MPI of DSA grooup order q		|
MPI of DSA group generator g		|
MPI of DSA public key value y		|

+

user id (this line not hashed)

0xb4					|
4 octet length				|
username data			|

version field to end of hashable data	|

0x04					|
4 octet length				|
? (see previous question re 5.4)	|

2) V4 Sig., type 0x18. Hash then concatenate the following for feeding into 
the DSA (assuming DSA signature keys and ElGamal encryption keys):

public DSA keys (this line not hashed)

0x99					|
2 octet length				|
MPI of DSA prime p			|
MPI of DSA grooup order q		|
MPI of DSA group generator g		|
MPI of DSA public key value y		|

+

public ElGamal keys (this line not hashed)

0x99					|
2 octet length				|
MPI of ElGamal prime p		|
MPI of ElGamal grooup order q		|
MPI of ElGamal public key value y	|

version field to end of hashable data	|

0x04					|
4 octet length				|
? (see previous question re 5.4)	|

Once again, thanks for any clarification.

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, 13 Jul 2000 08:41:20 -0700

> >Yes, this all looks fine now.  The one thing I'd add is that there is no
> >need to parse out the key and subkey packets as you have done.  After the
> >0x99 and two-octet length, you just hash the key or subkey packet body.
> >The specific contents of the key/subkey packet are irrelevant to the
> >signature algotihm, it's just data to feed the hash.
>
> So you're saying that (1) is OK, however in the case of 2), it would be 
> best to structure it this way:

No, I didn't mean that.  All I meant was that you don't have to worry
about the contents of the public key packets, the version and time and
MPIs.  Just hash the key packet data as a block.  It makes it much
easier to see what is going on:

header data

0x99                                    |
2 octet length                          |
key packet body data                    |

user id data

0xb4                                    |
4 octet length                          |
username data                           |

signature trailer

V4 signature trailer

0x04                                    |
0xFF                                    |
4 octet length                          |