Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: PGP scripting...

From: Brian Hatch <secprog(at)ifokr.org>
Date: Thu Jan 09 2003 - 10:57:19 EST

>>The public key is derived from the private key. Anyone in possession of the
>>private key is by definition also in possession of the public key. The same
>>is not true in reverse, a party can possess the public key without the
>>ability to (reasonably) discover the matching private key.

> Not true, there is no relation between the keys in that way, you can't find

It is true, you can't algorithmically derive one from the other. However OpenPGP secrets contain the public key in the private keyring just in case.

From http://www.gnupg.org/(en)/documentation/faqs.html#q4.21


4.21) I still have my secret key, but lost my public key. What can I do?

   All OpenPGP secret keys have a copy of the public key inside them, and in a worst-case scenario, you can create yourself a new public key using the secret key.

   A tool to convert a secret key into a public one has been included (it's actually a new option for gpgsplit) and is available with GnuPG  versions 1.2.1 or later (or can be found in CVS). It works like this:

Do you need help?X

   $ gpgsplit --no-split --secret-to-public secret.gpg >publickey.gpg

   One should first try to export the secret key and convert just this one. Using the entire secret keyring should work too. After this has been done, the publickey.gpg file can be imported into GnuPG as usual.


So yes, having only the private *keyring* you can recover the public key.

--
Brian Hatch                  "Wonderful lady.  Talks
   Systems and                more and says less than
   Security Engineer          anyone I've ever met."
www.hackinglinuxexposed.com

Every message PGP signed

  • application/pgp-signature attachment: stored
Received on Fri Jan 10 08:27:21 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:45 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library