Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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.

share|improve this question
    
@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. –  user2071506 Feb 15 at 22:58
1  
@HenrickHellström, user2071506: These are different keys! –  Gilles Feb 15 at 23:42
    
@Gilles: Right, the question makes more sense if the second key is a public key server side, and is used for client auth. –  Henrick Hellström Feb 16 at 1:47

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer

and 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.

share|improve this answer
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  rath Feb 23 at 0:44
3  
@rath It's a partial answer, just like mikeazo's answer is only partial as well. This one describes the strength of the confidentiality, mike's the strength of the authentication. (Assuming it's correct, I'm no SSH expert) Key size is actually more important for confidentiality than it is for authentication, since confidentiality should last forever, authentication only needs to be secure as long as the key is valid. –  CodesInChaos Feb 26 at 9:25
    
@CodesInChaos I stand corrected. The answer popped up in my review feed if I recall correctly, I didn't even see mikeazo's post. –  rath Feb 26 at 16:02
    
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. –  mikeazo Feb 26 at 18:58

Your Answer

 
discard

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.