First, be aware that key sizes larger than 4096 bits don't buy you any further security. I am not a cryptographic expert, but there are quite some discussions going on that claim that if you use larger keys, the weak point is not the key size, but the hashfunctions. And this is said to be true for signatures AND for encryption.
If you want to go for larger keysizes anyway, you have 2 options:
1.
Use openssl instead:
Code:
openssl genrsa -out extralong.key 16384
This will take quite some time...
2.
Modify the gpg-sources (that's the great thing about open source: you have access to the sources
).
In g10/keygen.c you will find the following lines:
Code:
static unsigned
ask_keysize( int algo )
{
unsigned nbits,min,def=2048,max=4096;
[...]
You might want to adjust max, but I never tried it, perhaps it won't work.