Solved

keytool and private key

Posted on 2014-04-13
3
542 Views
Last Modified: 2014-04-14
On a previous post I wrote

Could some one please post an example of a keytool creating a private key (and please explain what about the command makes the key private instead of public)

Open in new window


I was given an excellent reply


there is no such command. you always generate a keypair, which generates both a private and a public key. the difference is that in the standard sun keytool, there is no way to extract the private key, you can merely export either a certificate or a CSR with the public key. 

Open in new window


But this led me to wonder....   What if I need to export a private key.  How do I do it.  

Also, when I use the keytool to create a certificate, can I assume the certificate contains the public key ?

Thanks
0
Comment
Question by:Anthony Lucia
  • 2
3 Comments
 
LVL 28

Assisted Solution

by:becraig
becraig earned 500 total points
ID: 39997828
So the comment you got is correct.

Once you have the Key "Pair" public and private you can extract the "public key portion"

You can also export the private key for use with a system that will validate ssl communications.

But this led me to wonder....   What if I need to export a private key.  How do I do it.  
You can use several tools to do this including the mmc in microsoft windows, openssl commands among other things (it will be exported in pkcs / pfx format [password] protected])

Also, when I use the keytool to create a certificate, can I assume the certificate contains the public key ?
Yes once a certificate is created you will have a matching pair public / private since that is what drives the SSL certificate concept key pairs.
0
 
LVL 28

Accepted Solution

by:
becraig earned 500 total points
ID: 39997833
0
 
LVL 33

Expert Comment

by:Dave Howe
ID: 39998490
easiest is the keytool iui gui tool
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
OfficeMate Freezes on login or does not load after login credentials are input.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now