2
$\begingroup$

My SSH server has a 2048-bit public key. But my private key, for clients to login, is 4096-bit.

In this case, do I have the brute force protection of 2048 or 4096 bits?

My worry is that someone could brute force the private key and login to the server.

$\endgroup$
  • $\begingroup$ @HenrickHellström I determined the size by importing it into my SSH client. It said the private key size is 4096 bits. And the public key is 2048 bits. $\endgroup$ – BBedit Feb 15 '14 at 22:58
  • 1
    $\begingroup$ @HenrickHellström, user2071506: These are different keys! $\endgroup$ – Gilles 'SO- stop being evil' Feb 15 '14 at 23:42
  • $\begingroup$ @Gilles: Right, the question makes more sense if the second key is a public key server side, and is used for client auth. $\endgroup$ – Henrick Hellström Feb 16 '14 at 1:47
5
$\begingroup$

It appears that based on your description, the server has a 2048 bit key pair and the clients logging in have 4096 bit key pairs.

In this case, do I have the brute force protection of 2048 or 4096 bits?

For someone to impersonate one of your users, they would have to break the 4096 bit key.

For someone to impersonate the server, they would have to break the 2048 bit key.

My worry is that someone could brute force the private key and login to the server.

Unless you work for some huge financial institution or a government, if someone could break either of those key sizes they are likely not going to go after you. ATM, there is no publicly available way to brute force a 2048 bit key. Someone with the ability to do it could easily make millions of dollars. So I'd say you are safe.

| improve this answer | |
$\endgroup$
0
$\begingroup$

And (complementing the answer by @mikeazo)…

For someone to read contents of some past session, they would have to break whatever ephemeral DH key server used, its size depends on server DH parameter size.

| improve this answer | |
$\endgroup$
  • $\begingroup$ The question is specifically about authentication as the OP says "My worry is that someone could brute force the private key and login to the server." Also the 2048 bit and 4096 bit keys that the OP was asking about do not affect an adversary's "after-the-fact" ability to break past session data, that is determined, as you state, by the DH parameters. $\endgroup$ – mikeazo Feb 26 '14 at 18:58

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.