Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

keytool and private key

Posted on 2014-04-13
3
Medium Priority
?
599 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Assisted Solution

by:becraig
becraig earned 2000 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 29

Accepted Solution

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

Expert Comment

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

Featured Post

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Check out what's been happening in the Experts Exchange community.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

722 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