Subject: Re: pgp-6.5.8 secret key keyID export bug? / rfc doesn't specify keyIDs

From: [email-masked]
Date: Fri, 23 Mar 2001 20:14:37 -0800

Adam writes:
> actually it looks like gnuPG does the same thing as PGP.
>
> I'm presuming the keyID includes the private key components for private
> keys, so the private key has a different keyID even though the gui doesn't
> display it that way, if you display the contents of the private key file.
>
> So I guess you have to compute the keyID rather than reading it in form the
> secret key file if you're working from a secret key and not a public key.

The keyID is not present as a field in key packets.  It must be computed
from the key data.  For DSA keys it is defined as the last 64 (or 32)
bits of the fingerprint, which is itself a hash of the data in the public
key packet.

Probably that packet-dump program you were using computes keyids
incorrectly for private key packets.  It is probably hashing too much
data.

Hal

---

From: Adam Back <[email-masked]>
Date: Sat, 24 Mar 2001 00:27:47 -0400

Yes you are right.  I'll see if I can fix pgpacket.pl.  (It is internally
computing hashes using some perl sha1 code.)  It has an option not
to do it even because the hashes are slow, I should have remembered
that as Mark Shoulson was telling me about it.

Adam