Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sorry for the poor question. Suppose I have a certificate of the following lines:

     //22 Lines of encoded junk

And then this base64 encoded key


Is it possible to get the raw private key, I think something of this nature:

     //15 lines of encoded junk

How can I get that? I thik this was all done with openssl. Thanks

share|improve this question
up vote 6 down vote accepted

The certificate contains only the public key. By construction, it is not feasible to extract or recompute the private key from the public key.

share|improve this answer
Thanks for your response. So from the base64 encoded key, can I not get the private key? – TerrorKid Nov 10 '12 at 13:13
@TerrorKid "it is not feasible to extract or recompute the private key from the public key" – ewanm89 Nov 10 '12 at 13:41
@TerrorKid That's with supercomputers working for a while. – ewanm89 Nov 10 '12 at 13:42
@ewanm89 Ok but what is the base 64 encoded key for? – TerrorKid Nov 10 '12 at 13:44
it's the public key, base64 encoding is to send it as ascii text rather than pure binary so that it can go across any protocol. – ewanm89 Nov 10 '12 at 13:48

Acually it is possible to get the private key from the public key without a supercomputer if the key is less than 256 bits.

You can check this tutorial in French :

share|improve this answer
One has to do some major fiddling to get OpenSSL to generate an RSA keypair less than 1024 bits. But yes, if the key is small enough it is insecure welcome to the world of cryptography. – ewanm89 Nov 10 '12 at 15:27
And any certificate authority willing to sign certs with such small keys shouldn't have root certificates in any use. – ewanm89 Nov 10 '12 at 15:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.