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
Solved

keytool and private key

Posted on 2014-04-13
3
552 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 29

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 29

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

February 24, 2017 — On February 23, Travis Ormandy, a vulnerability researcher at Google, reported on Twitter (https://twitter.com/taviso/status/834900838837411840) that massive stores of data have been leaked by CloudFlare, a company that provide…
Ransomware is a growing menace to anyone using a computer or mobile device. Here are answers to some common questions about this vicious new form of malware.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
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…

829 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