# Is unusual (non power-of-two) RSA key size more secure?

On this blog https://blog.josefsson.org/2014/06/23/offline-gnupg-master-key-and-subkeys-on-yubikey-neo-smartcard/ there is a following sentence

Generate master key

Below I will use a 3744 bit RSA key, where the key size is selected based on the assumption that people will focus efforts to crack RSA keys on the usual power-of-two key sizes.

But that leaves me to wonder: do unusual key sizes really pose a disadvantage to a potential attacker? After all, couldn't he just get a key size from a public key?

• From this answer: The difficulty of factoring (thus, as far as we know, the security of RSA in the absence of side-channel and padding attacks) grows smoothly with $n$. So it would appear that there is no real benefit in terms of security. – mikeazo Jul 20 '16 at 17:02
• @mikeazo: want to make that the answer??? – poncho Jul 20 '16 at 17:10
• @poncho, I did. I felt bad basically pasting a portion of another answer here. But better to have an answer, right? – mikeazo Jul 20 '16 at 17:22
• There may be a small benefit if somebody builds hardware which makes power-of-two assumptions or has a fixed key size. If somebody cares that much to crack your key you've got other problems. – David Jul 20 '16 at 19:59
• in general with these sorts of ideas, you're going into uncharted waters by such deviations; you might create something nobody would think of the right way to attack, or you might make something fundamentally flawed that someone smarter than you will recognize. – dandavis Jul 22 '16 at 17:49

The difficulty of factoring (thus, as far as we know, the security of RSA in the absence of side-channel and padding attacks) grows smoothly with $n$.