Subject: RE: check for complementary keys

From: "Hasnain Mujtaba" <[email-masked]>
Date: Tue, 13 Jan 2004 18:02:19 -0500

Thanks. This will make it easier for me to read the public key from the
private key and then do a match on the fingerprints of the two public
keys.

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]] On Behalf Of David Shaw
Sent: Tuesday, January 13, 2004 4:00 PM
To: [email-masked]
Subject: Re: check for complementary keys

On Tue, Jan 13, 2004 at 02:34:06PM -0500, Hasnain Mujtaba wrote:
> 
> 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? 

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