V4 Key ID Mismatch - Check Me?
V Alex Brennen
vab at cryptnet.net
Tue Jul 24 18:36:01 CEST 2001
On Tue, 24 Jul 2001, Justin Wienckowski wrote:
> For the life of me, I can't figure out why the key ID I compute
> (0A9A90AC3971FE26) doesn't match gpg's computed value. To compute the
> key id, I'm doing the following:
> 1) Hash the public key packet (tag 0x99, 2-octet length, 6-octet
> public key header, and the MPIs [mpi headers and data]) through SHA-1
> (using cryptlib's SHA1 stuff) 2) Use low-order 64 bits of the hash
> value as the key id.
IIRC, you shouldn't hash the 0x99 and 2-octet length in with the
You may find an easier time looking at the keyserver code I wrote
which is simpler and more linear than the GnuPG code.
You can download the code here:
Make sure you get the snapshot and not the release. There's been
allot of changes and improvements since the release.
More information about the Gnupg-devel