Large keys

When generating a new key pair, advanced users can choose the bitlength for the RSA algorithm.

From GnuPG version 2.2.22 (August 2020) the default is an 3072 RSA keypair. (Before, GnuPG's default was an 2048 bit RSA keypair and the FAQs on keysize (accessed 2020-08-28) still has the old reasoning.)

The recommendation is made to serve most users best.

On the gnupg-users mailing list it is discussed sometimes what the future default length should be and what sizes should be supported.

Note that the principle author of GnuPG, Werner Koch recommends to not use private keys larger than 4 KiB when using RSA. He believes 8 KiB to be a practical upper limit that GnuPG should technically support. See, for instance, his statement in Debian Issue739424. Since version 2.0.27 and 1.4.19 GnuPG can be compiled with --enable-large-secmem to offer an --enable-large-rsa option that can create keys up to 8 KiB. Some elder versions supported creating of keys up to 16 KiB.

The main arguments (TODO needs more checking of completeness) are:

LWN on Werner Koch's talk at Kernel Recipies 2017 has:

RSA, he said, is not likely to stay secure for much longer without really large keys. Support for 4096-bit RSA keys has been in GnuPG for some time, but Koch contends [Note by editor: disputes] that real security will require 16Kb keys; that makes keys, fingerprints, and signatures all unusably long, particularly for embedded devices and hardware security modules (HSMs).

Koch showed examples of digital signatures of comparable security, one made with RSA-4096 and one with Ed25519 [..] HSM timing data showed that RSA is about 60 times slower than Ed25519 for signing.

Other rationales

History

LargeKeys (last edited 2024-10-07 08:13:25 by bernhard)