Performance is another issue that can influence the choice of a key length. An administrator must find a good balance between the speed and protective strength of an algorithm, because some algorithms, such as the Rivest, Shamir, and Adleman (RSA) algorithm, run slowly due to large key lengths. Strive for adequate protection, while enabling communication over untrusted networks.
The estimated funding of the attacker should also affect the choice of key length. When assessing the risk of someone breaking the encryption algorithm, estimate the resources of the attacker and how long the data must be protected. For example, classic DES can be broken by a $1 million machine in a couple of minutes. If the data that is being protected is worth significantly more than the $1 million dollars needed to acquire a cracking device, then another algorithm should be used. In fact, DES is now considered too weak to use for any application.
For example, the factors of 12 would be 1 x 12, 2 x 6, and 3 x 4. Therefore, a 1024-bit number is a very large number with many factors. Increasing that number to a 2048-bit number creates even more factors. Of course, this advantage is lost if an easy way to factor large numbers is found, but cryptographers consider this possibility unlikely.
The rule “the longer the key, the better” is valid, except for possible performance reasons. Shorter keys equal faster processing, but are less secure. Longer keys equal slower processing, but are more secure.