I'm trying to figure out which size of encryption key should I use for my SSL certificates (2k, 4k?)

Is a 2k key "sufficient"? is it crackable...? and if so, is a 4k key not crackable?

Also, how does a large (such as a 4k key) affect the speed of the connection? is it just the first hand shake that is slower or does it also slow down all traffic as well?

Thanks in advance.

  • 1
    (0) you don't say if you mean RSA or DSA where your numbers make sense or ECDSA where they don't (1) keylength.com and numerous sources and research linked from there. (2) It only affects handshake, not data. It is possible though not very common to have multiple handshakes on one connection, in which case the asymmetric key affects (usually) all handshakes not just the first. – dave_thompson_085 Jun 24 '16 at 13:34
  • i'll probably get beaten for over-simplifying, but pretend the 2k will take a million years to crack and the 4k will take a billion years: who cares? to wit: If someone can break a 2k, they can probably break a 4k as well. – dandavis Jun 25 '16 at 7:07

"Anything may be crackable given enough time and resources."

Here is a good article that explains the differences of key size. Now imagine you exaggerate and create a 8192 key can it be cracked? Likely not. Are you safe? This all depends on the security of the system. If someone can compromise your machine and steal the key you made, the encryption strength is a moot point.

Considerations to take when asking a question like this would be to think as an attacker would.

  1. Can I crack this (likely not)
  2. How long would it take?
  3. How much would it cost me (wasted time+resources)?
  4. What would I gain putting in all this time, effort, and resources?

It is far cheaper to try and compromise the key, system, and or organization to get the key (install a keystroke logger, etc) than it is to try and brute force it.

When it comes to encryption, a lot of focus is spent on "can it be cracked" which is often a moot point when you think about the other factors. "Can this 16384 bit key be cracked on this insecure system." While it may not be cracked, it does not take away from the fact that other often overlooked factors may yield the key without the need to crack it. When someone performs penetration testing, if they can, they always copy SSL keys, screenshot them, then explain the dangers of not securing the key.

You are a billion dollar bank. You buy the biggest baddest safe on the planet... and You leave the key right next to the vault.


Convention today is two use 2048 bit RSA for standard certs. If you want to be extra safe (e.g. NSA Suite B) use 3072. Assuming everything else is secure (big if) larger is safer, but introduces issues of performance (larger is also slower and the speed decrease is not linear) and larger is sometimes not compatible.

  • A key length of 3072 is a security recommendation, however often you'll just find that people jump up to the next power of 2 (i.e. 2^12 = 4096 bits) as a common practice. After 4096 bits, the key length is shown to severely impact SSL termination and can slow connections significantly. This will matter less for a blog/personal site than it will a webapp with many users. – Signus Jun 25 '16 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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