ietf-openpgp
[Top] [All Lists]

Re: check for complementary keys

2004-01-13 14:00:52

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

<Prev in Thread] Current Thread [Next in Thread>