Subject: check for complementary keys

From: "Hasnain Mujtaba" <[email-masked]>
Date: Tue, 13 Jan 2004 14:34:06 -0500

Hi all,

What is a good way to check whether an openpgp public and private key
pair is complementary? One way I can think of is to do an
encrypt/decrypt test with the keypair. But is there another way to
determine this just by looking at the key material of the two keys? 

Thanks
Hasnain.

---

From: David Shaw <[email-masked]>
Date: Tue, 13 Jan 2004 16:00:06 -0500

> determine this just by looking at the key material of the two keys? 

The OpenPGP packet format for private keys contains a complete copy of
the corresponding public key.  If you are not concerned about
manipulation of the secret key packet, you could simply compare this
embedded public key to the public key in question.

David