[Ilugc] Private Keys

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Tue Feb 2 12:19:48 2010

On Mon, Feb 1, 2010 at 6:29 PM, kannan manoharan
<scuffy_tomy@xxxxxxxxxxx> wrote:

Hi all,

Anyone please tell me the command to find out a existing private keys


Private keys are usually encrypted with a password.

$ openssl genrsa

openssl genrsa
Generating RSA private key, 512 bit long modulus
....++++++++++++
...++++++++++++
e is 65537 (0x10001)
-----BEGIN RSA PRIVATE KEY-----
MIIBOgIBAAJBAMtmlB7nxT6aUU79yX1+eAN+sj3GNVsqfF6+xffK35tnq+3kSmNm
KOvZTF7QeoO+BkXArRylnEUVgAvvtewC/B8CAwEAAQJAM715Sk9M1nrs2fom6hxk
rQbqklo8Ml+hWXyP4VOjA+WsFxXQHOLAZZ0yK2+ttNB6MKhliOL+c87xvOF7EucX
cQIhAO8eWDkwCqt/87nB8fZ+KCeL/EmGGuYgQB2TBOTiU5BZAiEA2cKyFetmtfjX
KB/fpl2abkGU/1b1uOk3JeFVse+foTcCIQCHvw1MoeZcyA3AFcdcLPB0yvaVcslQ
fVyIrY7otUfFOQIgLl8rlUdfw/iNuNmwwrjEHh6RIB7gjNP9DnAB07Z3g9kCIBw9
P8X0hc7QFNx2jOrlHowUJNSpPg2B+SWdtS8kTevU
-----END RSA PRIVATE KEY-----

With OpenSSL You can derive the public key from the private key.

$ openssl rsa -pubout -in foo.pem

will give you the public key corresponding to the private key.

You also have the ability to generate keys in such a way that one public
key will have multiple private keys and vice versa but those things are not
usually needed.

The other way to list private keys is with the GnuPG command.

$ gpg --list-secret-keys

-Girish


-- 
Gayatri Hitech
web: http://gayatri-hitech.com

SpamCheetah Spam filter:
http://spam-cheetah.com

Other related posts: