Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 568
  • Last Modified:

How to check the keysize of private/public key?

Hello, I have a paired private/public key.. I would like to know what key strength I am using. Whether it is 1024 or 2048 bit, please let me know how can I check it using openssl command.

Is is always true that if a private key is of 1024 bit then public key would be also 1024 bit? Thanks!
0
beer9
Asked:
beer9
  • 3
  • 3
  • 2
2 Solutions
 
chqshaitanCommented:
what package did you create the key with?
0
 
beer9Author Commented:
I am not sure.. But I have public/private key pair but I think it was openssl
0
 
chqshaitanCommented:
0
NEW Internet Security Report Now Available!

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out this quarters report on the threats that shook the industry in Q4 2017.

 
Dave HoweSoftware and Hardware EngineerCommented:
on windows? just look at the certificate in certificate manager and under "public key" it will tell you the key size (firefox offers similar views of the certificate)
0
 
Dave HoweSoftware and Hardware EngineerCommented:
note if you have the certificate as a cer file (or .pem) You can just double click it in windows to get the same view.
0
 
beer9Author Commented:
I see information like below as the output of "openssl x509 -in 1.pem -noout -text | less", so does it mean that it is 1024 bit? what is the difference of Modulus and Public key. Are they both same? Thanks!

            Public Key Algorithm: rsaEncryption
            RSA Public Key: (1024 bit)
                Modulus (1024 bit):

Open in new window

0
 
Dave HoweSoftware and Hardware EngineerCommented:
They are effectively the same.

an rsa key consists of two parts, a public exponent (usually 65537 for most ssl certs) and a modulus (which is what is usually considered "keysize" as it is the product of the secretly generated primes that form the secret key)
0
 
beer9Author Commented:
Thank you! :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now