Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
gpg2 patch to support RSA keys > 16384 bits
diff -uNr gnupg-2.0.22/g10/gpg.c gnupg-2.0.22-large-keys/g10/gpg.c
--- gnupg-2.0.22/g10/gpg.c 2013-10-04 12:32:53.000000000 +0000
+++ gnupg-2.0.22-large-keys/g10/gpg.c 2013-10-26 22:14:18.933010862 +0000
@@ -2050,7 +2050,7 @@
#endif
/* Initialize the secure memory. */
- if (!gcry_control (GCRYCTL_INIT_SECMEM, 32768, 0))
+ if (!gcry_control (GCRYCTL_INIT_SECMEM, 131072, 0))
got_secmem = 1;
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
/* There should be no way to get to this spot while still carrying
diff -uNr gnupg-2.0.22/g10/keygen.c gnupg-2.0.22-large-keys/g10/keygen.c
--- gnupg-2.0.22/g10/keygen.c 2013-10-04 13:00:22.000000000 +0000
+++ gnupg-2.0.22-large-keys/g10/keygen.c 2013-10-26 22:14:47.506343401 +0000
@@ -1771,7 +1771,7 @@
static unsigned
ask_keysize (int algo, unsigned int primary_keysize)
{
- unsigned int nbits, min, def = DEFAULT_STD_KEYSIZE, max=4096;
+ unsigned int nbits, min, def = DEFAULT_STD_KEYSIZE, max=65536;
int for_subkey = !!primary_keysize;
int autocomp = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment