Don't think this is actively maintained, but figured I could spare someone some pain if they need to use this in the future. The fingerprint(and subsequently key_id) for version 4 key packets is calculated incorrectly. According to the RFC 4880 only the public key packets are supposed to be used in SHA1 to get the fingerprint, but the code uses the entire packet content(including the secret key material).